LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Network Variable example code needed

Hello,

 

I created about 10 shared network variables in my LabVIEW project, and I am trying to access them using CVI code. 

 

I have been reading through the CNVsubscriber, CNVread, and CNVwrite function panels in CVI, but I cannot figure out how to actually extract the data or write the data I'm looking for. 

 

The shared variables show up in the browser on the function panels fine, that was the easy part.  How do I use the subscriber handles that the function panels create to extract the data or write data?

 

Thanks

0 Kudos
Message 1 of 4
(3,444 Views)

There are a number of network variable example programs in the networkvariable folder of the CVI examples (in Windows XP, that would be C:\Documents and Settings\All Users\Documents\National Instruments\CVIxx\samples\networkvariable, assuming you're using CVI 8.5 or later). Please look through those examples and run them. Feel free to come back and ask more questions if it still doesn't make sense.

 

Luis

0 Kudos
Message 2 of 4
(3,433 Views)

Thanks, I was able to find those examples.  It looks like my C code is working as it should, but the shared variable node in LabVIEW isn't actually sending any data out.  I keep getting a NULL as the data from the shared variable in my C code.  I did some quick experiments in LabVIEW and it looks like those variables aren't working yet.

 

Do you know of any LabVIEW examples for those?

0 Kudos
Message 3 of 4
(3,427 Views)

Try this one:

 

C:\Program Files\National Instruments\LabVIEW 8.5\examples\Shared Variable\Shared Variable Client - Server.lvproj

0 Kudos
Message 4 of 4
(3,416 Views)