LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

usage of the CNVCreateSubscriber() function

The function CNVCreateSubscriber() can generate a callback function, which used to process the received data. I'd like to know: can call the callback function in another machine ? This machine will be the client application.

 

David

0 Kudos
Message 1 of 5
(3,195 Views)

I don't understand this question. The architecture publisher/suscriber is intended to work between processes one of which is the suscriber, i.e. the one that reads the variable value. The processes can be run on different machines as well as on the same machine. Examples of a publisher and a suscriber applications can be found in samples\networkvariable folder.

Can you detail a little bit more your question?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,182 Views)

Hi Roberto,

 

Due to be the first to study the network variable, so there are some questions to it.  When using CNVCreateSubscriber() to create the subscriber (this is the server, write data to the process), at the same time it also needs to define the callback function, but I need the callback function to be placed into the client (the reader), and the client will be at another machine. I'd like to know when the server writing data, the client on another machine can use that callback function to read data ?

 

 

David

0 Kudos
Message 3 of 5
(3,178 Views)

Take a look at those examples:

 

\samples\networkvariable\publisher\NVPublisher

\samples\networkvariable\subscriber\NVSubscriber

 

The subscriber is the application that reads from the variable (from the help: When the value of the network variable changes, the dataCallback function is called with the new value), while the publisher is the one that writes to it. Those tasks can reside on different machines.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(3,167 Views)

Thanks.

0 Kudos
Message 5 of 5
(3,159 Views)