Data from the DAQmx Read functions in LabWindows/CVI can be written to a pointer. For example, the LabWindows/CVI example named ContAcq-IntClk stores the data in a 64 bit floating point pointer named gData. Here are some snippets of the declaration of the pointer and the relevant DAQmx read:
static float64 *gData=NULL;
To access the individual values in this case, you simply index through the memory, starting at the pointer memory location. For the above example, the data read from the DAQmx device is placed starting in memory at the memory location of gData. To get an element at a specific index in the data returned, you can access it in C languages in the following way:
*(gData + index)
Where index is the zero-indexed location of the element you would like to access in the read values, and gData is the name of your pointer to the DAQmx data.
You can then use SetCtrlAttribute or SetCtrlVal to set the value of your user interface objects to the value of the element you accessed.
If you read multiple channels of data, the information is interleaved in the read array.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.