LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Must ViSession numbers be thread-safe?

Hi,

I'm using LabWindows/CVI v5.5.1 on Win 98SE with an NI 4351 DAQ and the TBX-68T accessory to continously measure voltages and room temperature (using a K-type thermocouple). DAQ readings are scanned from 8 channels into a Thread-safe array buffer every second in an asynchronous timer thread. Occasionally, I get crazy temperature readings (to thousands of °C). I cannot reproduce this random problem at will. If I stop the data acquisitions, re-configure the scan list and then restart acquisitions (even without an application restart), everything immediately works fine every time, so I've ruled out a faulty thermocouple. I use the following approach in the
asynchronous timer thread:

ViReal64 *
DAQ_Data = GetPointerToDaqArray();
NI435X_Check_And_Read (Global_DAQ_Session, -1.00, &scans, DAQ_Data) ;
ReleasePointerToDaqArray();

DIO lines on the NI 4351 card can be driven in a parallel thread, so must my 'Global_DAQ_Session' ViSession number also be thread-safe?

Thanks in advance,
John.
0 Kudos
Message 1 of 3
(2,867 Views)
Hi John,

I dont think the version of NI-DAQ that are using is Multi-threaded but it is multithread safe (see link bellow for more info).
Hopefully this link will help with some of your other questions as well. As you your spurious readings have you checked all of the connections with the TBX-68T and the CJC on that terminal block.


http://digital.ni.com/public.nsf/websearch/E1C8492854855FA98625689E0072E832?OpenDocument

Regards

Jon Bowers
Applications Engineer
NIUK
0 Kudos
Message 2 of 3
(2,834 Views)
Thanks for the link Jon. It helps to clarify certain issues.

Regards,
John.
0 Kudos
Message 3 of 3
(2,792 Views)