07-12-2011 04:51 PM
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...
07-13-2011 02:57 AM
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.