Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Trouble with tasks

Hallo,

I'm running MAX 3.1 on a PXI with Windows XP. I have a PXI-6025 I/O card

plugged in. I have created two different tasks with DAQmx. Task A should

read in the ai0 port, task B should read in the ai1 port.

The thing is that when task A is started, I cannot start task B (neither in

MAX nor in LabVIEW), I'm getting an error like "Resource is used".

The same thing vice versa, only the task that has been launchd as first is

running properly, the second one returns an error when trying to start.

How can I create and run two tasks, that run on two different analog input

pins.

I have created a bunch of other tasks that ouput on digital pins, the're

all fine.

Thank you for your help

Oliver Friedrich

0 Kudos
Message 1 of 4
(3,490 Views)
Hi Oliver,
 
I am afraid that you cannot achieve this in PXI 6025.
 
The Digital i/o channels can be individually configured and used. But the same cannot be done with analog input channels.
 
Note that PXI 6025 has a single ADC to which all channels are multiplexed,
Once you configure a channel or a list of channels in a scan list and start acquiring these channels, The ADC timing sequences are set for acquiring from these channels.
 
so there is no way you can acquire from a channel that was not present in the scan list being executed without stopping the already running ai acquisition.
Instead include both the channels in the same task or scan list and acquire to get a 2 dimensional data in which each row (column if you are using traditional daq) represents respective channel's data.
regards
 
Dev
 
 
0 Kudos
Message 2 of 4
(3,490 Views)
I am having essentially the same difficulty with a PCI 6021 M-Series card. However, I cannot put both channels in 1 task, as I need to sample AI-0 in timed mode (x number of samples at x sample rate, and AI-1 in continouous mode. I have tried several work-arounds, such as branching off the reference between the channel select and the mode select vi's, and putting a second mode select vi for the second channel in the branch. This partially works, but even though I have the two different analog inputs in different threads, I do not get multi-threading functionality. Each of the analog input functions waits for the other to complete before implementhing the other. I could live with a short interruption in the continuous mode sample on AI-1, but I need immediate response on the timed mode sample AI-0, as I am using it as one input to a waveform envelope comparison. I would really love to be able to get these functions to operate independently of each other, but have not been able to figure out how to accomplish this. Any suggetions would be welcome. Dave
0 Kudos
Message 3 of 4
(3,474 Views)
devchander is absoultly right. As the boards have only one A/D converter, it is at no time possible to have two tasks accessing different Analog inputs at a time. You can have one task doing analog input, and for example another task doing analog output in parallel, but never more then one task accessing for example analog input.
0 Kudos
Message 4 of 4
(3,462 Views)