Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple nidaqAICreateTask gives the same task id

I want to read all analog and digital input signals from the modules on a SCXI-chassie continually.
Previously I used one nidaqAISingleScanOp call for each AIN-module. This worked fine until I upgraded the NIDAQ drivers, after which the time for each call increased from 0.1 seconds to 2 seconds. To fix this problem I had to remove the filter settings for each module.
After some discussions with NI, I was recommended to use nidaqAICreateTask instead. I want to set up one task for each module. The problem is that the function returns the same task id every time I call it, even if the connection strings differ. Why?
I have attached a test project. The idea is that you enter up to 5 different connection strings. The
program should then go through the list, get the values from each module and present them.
0 Kudos
Message 1 of 2
(2,877 Views)
Greetings,

Briefly, let's talk about SCXI multiplexed operation. In most cases the SCXI chassis will be set up in multiplexed mode. This means that each, and every, module will be multiplexed through channel 0 of the DAQ card. You will usually assign one module to be the chassis controller in MAX. In parallel operation, each module is cabled individually to a DAQ card. Meaning if you had 4 modules you would need 4 DAQ cards. In this case all channels are routed directly to DAQ card channels and no multiplexor on the SCXI chassis is used.

I will assume that you are running in multiplexed operation. This being assumed, the issue at hand is that each module is multiplexed through the DAQ card channel 0. You cannot create multiple tasks at the exac
t same time. Each task will be fighting for resources on your DAQ card. You will need to either create one task, read, and close the task. Or you will need to create one task which encompasses all desired channels from multiple modules in one scan list.

Here is an example ...
daq::1!(ob0!sc1!md1!0:7, ob0!sc1!md2!0:7)

Regards,
Justin Britten

Applications Engineer
National Instruments
Message 2 of 2
(2,877 Views)