09-18-2017 04:56 AM
Hi,
I’m using PXIe-4357 with 5xPT100 RTDs, with its A,B,C constants, in CVI2015 environment.
When I read RTD measurements, how do I know to which RTD it actually belongs?
Is it related to initialization order? Or amount of tasks that I run? Should I initialize separate task and samples storage for each RTD?
In example:
Initialization:
DAQmxCreateAIRTDChan (glHnRTDTask1, “RTD/ai0:2”, "RTD1,RTD2,RTD3", glRtdMinTemp, glRtdMaxTemp,
DAQmx_Val_DegC, rtdType, DAQmx_Val_2Wire,
DAQmx_Val_Internal, RTD_EXITATION_CURRENT_AMPS, RTD_ZERO_DEG_RESISTANCE_OHM);
Run the task – etc…
Read:
DAQmxReadAnalogF64 (glHnRTDTask1, RTD_SAMPLES_PER_CHN, 10.0, DAQmx_Val_GroupByChannel, glPtrRtdData, RTD_SAMPLES_PER_CHN*glNumChannels, &numRead, NULL);
My samples stored in glPtrRtdData – if I use the constant DAQmx_Val_GroupByChannel – will my samples be stored respectively with ai0 to ai2 – first 10 values for ai0 in indexes 0:9, than ai1 in indexes 10:19 then ai2 in 20:29?
2nd Question:
In initialization command there is a possibility to give virtual names to physical channels - if “RTD/ai0:ai3” are physical channels, “RTD1,RTD2,RTD3” are virtual names.
Function help says I can use those virtual names – but I can’t find how.
Thanks for the support
Solved! Go to Solution.
09-19-2017 04:36 PM - edited 09-19-2017 04:48 PM
Hi ArtB83
In response to your first question, have you seen the document here? This DAQmxReadAnalogF64 document explains that DAQmx_Val_GroupByChannel is non interleaved, which is described in greater detail at the bottom of the "interleaving" hyperlink. The interleaving document appears to directly answer your question about the indexing behavior in question.
In relation to your second question, you should be able to use those virtual names, what currently happens when you reference these virtual names (try referencing them in parentheses as well).
cblanchard
Applications Engineering
National Instruments
09-21-2017 05:41 AM - edited 09-21-2017 05:43 AM
Hi cblanchard,
Thank you very much for your support. The "interleaving" link was very helpful. I also found an alternative hands-on way of distinguishing between RTDs measurements. You can disconnect specific RTD and trace the values in samples storage array - you should see a group of extreme values - up to 1000 degrees, sequentially ordered, and a group size fits to a samples_per_channel setup settings. Then disconnect another RTD and trace the the array values again. Another corresponding group should be with extreme values.