LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variable

Hi,

I have a shared variable set up and coming from labview. In labview it is set for type double.

 

I am trying to read it and print it in labwindows with "CNVRead (reader, CNVWaitForever, &data);"

 

How can I print it?  I tried printf("Tput Amount = %f",data); seems not to work. It is giving me an error parameter type mismatch...

0 Kudos
Message 1 of 2
(2,723 Views)

A CNVData object is not a direct variable: it's a variant that can hold several types of data in it. To access the content of the variable you must use any of CNVGetX function, in your case possibly CNVGetScalarDataValue secifying a double as the data type to extract. You can query the type of value hold by a shared variable with CNVGetDataType function.

 

For a complete reference on NV you should read the Network Variable Library chapter in the online help, specifically Network Variable Data topic.



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 2
(2,645 Views)