ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel AI Harware config.vi and Labview/DLL exception

I develop with Labview 7.0 an application wih a PCI-6023 and a PCI-4472 (RTSI bus connected).
I had exceptions detected by LabView and by Windows when i called the 'AI Harware config.vi' VI. I think it appends when 'AI Harware config.vi ' is called at the same time for the 2 boards (see the attached file 'test.llb').

In the test.llb file, you can find an extract of my code (init the 2 board in parallel in a loop for test).

I found a solution for my application (init the board one by one). But can someone explain me why exception occured ? I think that if it is not allowed by the driver (NI-DAQ) to init 2 board at the same time, the driver must lock the access and not generate an exception.

Thanks.


Ben.
0 Kudos
Message 1 of 3
(2,818 Views)
Hello,

Your issue is due to the fact that the NI-DAQ Traditionnal driver is not multi-thread. That is to say, you cannot call in parallel NI-DAQ functions in your application (generate exception errors) . The NI-DAQ calls need to be sequentialize by wiring for example the error cluster between the NI-DAQ VIs.
A solution to your issue is to use the same programming techniques as described in the LabVIEW examples (Help menu >> Search examples... then Browse to Hardware Input and Output >> DAQ Traditionnal >> Multi-device synchronization examples.
I join also an example for LabVIEW:
*Synchronizing the NI PXI-4472 with E Series Analog Output
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B8C3238E1CF054DDE034080020E74861&p_node=DZ52007

Another
solution to your issue is to use the NI-DAQmx 7.3 driver which is multi-thread. This release of NI-DAQ supports the PCI-4472 and the PCI-6023E. Multi-threading allows the user to perform different tasks simutaneously (like configuration of 2 devices).

Hope this helps.
Matthieu Gourssies
National Instruments France
0 Kudos
Message 2 of 3
(2,818 Views)
Thanks for your answer.

I was thinking that NI-DAQ was multi-thread. It is so easy with LabView to write Vi with parallel call to NI-DAQ function that lot of pepole may have the same problems.

Regards.

Ben.
0 Kudos
Message 3 of 3
(2,818 Views)