LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running multiple daqmx task simultaneously

I am trying to run two daqmx task simultaneously. Each task is created for AI, with different AI channels.While , running only one of tasks acquires data. Second task shows no activity. No error is displayed.Is it possible to run multiple daqmx tasks simultaneously?
0 Kudos
Message 1 of 4
(7,319 Views)
Yes it is possible as long as the channels are from different boards. If you try and access the same device at the same time then you get a resource reservation error. It is possible to work around this, but it is more complex and I don't think you will get the "simultaneous" behavior that you were expecting.

Stuart G
Message 2 of 4
(7,317 Views)

Could you give me more info about how to manage several tasks trying to access the same hardware?

I have two people who need to run independent programs accessing the same DAQ card.

I have had no luck getting rid of the resource lock-out errors, despite faking semaphores with global variables and attempting to make use of StopTask.vi, ClearTask.vi and TaskIsDone.vi.

thanks,

matt carson

neah power systems, inc

0 Kudos
Message 3 of 4
(7,083 Views)
Hello Matt,

With all National Instruments Multifunction DAQ devices, only one analog input and one analog output task can be run at the same time.  This is the case for
multiplexed data acquisition boards (E-Series and M-Series) because all analog input channels require use of the same channel mutiplexer and sample clock.  Simultaneous data acquisition boards (S-Series) have dedicated analog to digital converters (ADCs) for each channel and don't have to multiplex the channels, but there is still only one timing engine for analog input and one for analog output on the board that can not be shared among multiple tasks.  Thus, in order to perform multiple channel acquisition or generation, all channels must be included in the same task, with the same timing parameters for all channels.  They only way to get around this would be to add some functionality to your program that would detect when another program is trying to create a task, and stop the original task.  A better solution would be to have one program acquire all the data necessary, and then share it through Shared Variables so that it can be accessed by multiple programs or across a network.

Regards,
Travis G.
Applications Engineering
National Instruments


Message Edited by Travis G. on 04-19-2006 05:36 PM

Message Edited by Travis G. on 04-19-2006 05:36 PM

Message 4 of 4
(7,065 Views)