08-14-2006 03:17 PM
08-14-2006 04:27 PM
Assuming the ViChar daqmeasure[256] variable contains a floating point double value in binary form (and is not an ascii string) you can convert it by
measurement = *(double*)daqmeasure;
daqmeasure is a pointer, so CVI would not let you cast it to a double directly.
If you want to step through the array use
measurement[i] = *(double*)&daqmeasure[i*sizeof(double)]; in a loop.
If the data in ViChar is really a string value (easy to see by looking at the array in the debugger) you can use atof() to convert the string to a double value or if it is an array of doubles stored in a string use the CVI function Scan().
08-14-2006 06:10 PM
It is a string but your instructions were not clear...
Thanks!
08-15-2006 03:09 AM
Maybe:
measurement = atof (daqmeasure);
will meet your needs?
JR
08-15-2006 09:59 AM
08-15-2006 10:29 AM