Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can multiple programs control the same board in NI-DAQmx?

Dear all,

 

My customer would like to use sequentially two independent applications that control the same PCI board with NIDAQmx.

 

The programs, which perform very different functions, have to run simultaneously but the usage of the board is exclusive to one program at a time. Switching from one app to another was previously possible when both programs were written in Traditional NI-DAQ, but a change in DAQ hardware is now requiring a rewrite of the apps for NI-DAQmx.

 

I'd like to know what needs to be done under NIDAQmx to ensure that both programs can use the same DAQ hardware. It seems that, in the mixed case where one app uses Traditional and the other NI-DAQmx, one of the programs becomes "disconnected" from the board.

 

Thanks in advance.

 

 

0 Kudos
Message 1 of 4
(3,326 Views)

KimKimBo,

 

As long as there are no timing issues, this should be possible.   However, two tasks (DAQmx) will not be able to access the card at the same time.  To get around this, you need to make sure that you clear the task in one application before starting a task in the other that accesses the same board.  Let me know if this makes sense.

 

And to the obvious question - why two different applicaitons?

 

Cheers, Matt

0 Kudos
Message 2 of 4
(3,302 Views)

KimKimBo,

 

For both programs using DAQmx you will have to ensure that the first program leaves the task in an unreserved state.  This can be done by clearing the task or using the DAQmx Control Task.VI to reserve/unreserve the task.

 

You are right about using both tDAQ and DAQmx (shamelessly stolen from here😞

Q: Can I use Traditional NI-DAQ (Legacy) and NI-DAQmx at the same time?

A:
You can use Traditional NI-DAQ (Legacy) and NI-DAQmx at the same time if you have two DAQ devices and one of them is using Traditional NI-DAQ (Legacy) and the other NI-DAQmx. If you only have one DAQ device, you can still use both Traditional NI-DAQ (Legacy) and NI-DAQmx but only in sequence – not at the same time. You need to reset your device to switch between Traditional NI-DAQ (Legacy) and the NI-DAQmx driver as part of the sequence.

In LabVIEW, use the Device Reset VI at the end of Traditional NI-DAQ (Legacy) sequence and the DAQmx Reset Device VI at the end of your NI-DAQmx sequence. You still need to create a Traditional NI-DAQ (Legacy) virtual channel and an NI-DAQmx Task for use with each driver respectively.

rest.gif

 

 

 

 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 3 of 4
(3,287 Views)

Thanks to all for the replies.

 

As for using the two applications simultaneously, this is a customer request.

 

Best, 

0 Kudos
Message 4 of 4
(3,281 Views)