LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

configure multiple different type channels in DAQmx

Hi all,
I'm still struggling with trying configure my test system to make essentially simultaneous measurements from a number of different SCXI modules. I have a PCI-6040E multifunction DAQ card connected to an SCXI 1001 chassis. I have a number of SCXI modules with their respective signal conditioning terminal blocks to make thermocouple, voltage and current measurements. I also have modules for analog and digital output. In my initial configuration I created tasks for each of these "functions" and then had individual vi's in an acquisition loop for each of these tasks (t'couples, current, voltage). When the tasks are configured for single measurement, "on demand", each channel performs correctly, but the loop takes 6+ seconds to execute. For the thermocouples this would probably be ok, but I need to see the current, and as importantly, be able to change the analog out, more quickly. When I changed the configuration to any of the other selections (hw timed, continuous) I got the -50103 error that indicates that I'm trying to use resources that already in use. Suggestions are that I use only one task. My question is how to do this? Should I create virtual channels for each channel and put them all in one task? Can this be done with AI, AO, Dig out simultaneously? The documentation suggests that to generate a continuous voltage output on the AO pin that it be configured as single, on demand measurement. If the other channels will work as described (in one task) how might I generate a continuous voltage using one of the other configurations, as I would like to be able to "grab" more samples each time through the loop. I'm about to go back an rewrite it all in traditional DAQ, but want to try to get a little more experience with the "new" stuff as well as have something that would look a little more familiar to my recently LabVIEW basics schooled customer.

Thanks,
Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 1 of 5
(3,679 Views)
To avoid the -50103 errors, and to get the best performance, you'll probably want to combine all of your AI channels into one task. You can't put your AO or Dig channels in the AI task, though, so you'll still need separate tasks for those.

So your program might look like this: outside your loop, create all three tasks. Inside the loop, read all the channels from the AI task, update the AO values and write your digital values. On-demand timing for the AI task should give you decent performance.

Joe
0 Kudos
Message 2 of 5
(3,674 Views)

I'm trying to do something similar; voltage and thermocouple AI channels in a single task.  My voltage channels are for a SCXI-1102C modules (in a SCXI-1001 chassis) and my thermocouple channels are for a NI 9213 modules (in a cDAQ NI 9188).  When I try to add the thermocouple channels to the voltage channels I get error -200855.  I'm just creating a single task for multiple channels.  I haven't even set a sampling rate for the task.  Why could I be getting this error?

0 Kudos
Message 3 of 5
(3,169 Views)
Did you notice that you bumped a 10th year old thread? It would have been better to start a new one.

I don't believe you can use a single task with the multiple chassis that you have.
0 Kudos
Message 4 of 5
(3,138 Views)

My users swap hardware all the time.  Other than trial and error, are there some principles to follow about configuring different hardware into a single task?  Is there documentation of the DAQmx error?

0 Kudos
Message 5 of 5
(3,098 Views)