LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous acquisition of multiple analog inputs inputs 9172

Hello all. I am trying to obtain continuous samples of two signals simultaneously using a NicDAQ9172. These signals are acquired from a 9221 module (voltage) and a 9237 (force). Initially I tried to acquire them separatelly and it works with no problems, confirming that the equipment is working propoerly. The problem has been to acquire both at the same time, I have failed in everything I tried and every possible solution I find online gives me new errors.

 

My first attempt was to create two channels wired in series to produce an array with each measurement in a different column, but for some reason I am obtaining the same signal in both columns. (See test2inputs.vi)

 

The second atempt was to create the two channels in two separate independendt tasks. (See test2inputsseparate.vi) In this case only the second signal works, for the first one I am getting the error 200022. Then I found here that it is not possible to create two separate tasks with this chasis, so I got a bit desperate.

 

Then I found some info about synchronization here and I tried to modify the example vi to read from my hardware. None of the synchronization types suggested seem to be supported by my device except for DSA Sample clock timebase, which is giving me the error that you can see in the attached error.jpg and I did not find any way to solve it. 

 

Can you please help me to find a solution to this problem? I am pretty sure it is possible to do continuous multiple channel acquisition as it seems to be working if I use the DAQ assistant, but I need to find a solution using the normal DAQ functions.

 

Thank you very much

Download All
0 Kudos
Message 1 of 4
(2,876 Views)

Also I attach here the vi's with the synchronization in case that is useful, and an example using the assistant which works.

 

Thanks again.

Download All
0 Kudos
Message 2 of 4
(2,874 Views)
Just convert the DAQ Assistant to a VI (right click option) to see how it's done.
Message 3 of 4
(2,841 Views)

Thank you very much, I managed to solve it lloking at the Daqmx code. I think what was missing in my code was to set the "active channels" property in the property node box.

0 Kudos
Message 4 of 4
(2,761 Views)