ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 5 条)
3,270 次查看

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 项奖励
2 条消息(共 5 条)
3,257 次查看

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 项奖励
3 条消息(共 5 条)
3,253 次查看

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 项奖励
4 条消息(共 5 条)
3,242 次查看

Thanks.

0 项奖励
5 条消息(共 5 条)
3,234 次查看