Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronised input...

I am very new to DAQmx and I need to program my NI USB-6212 DAQ to do the following:

 

Aquire synchronised/simultaneous digital (12x signals) and analog (2x signals) input to the DAQ at a given rate (100Hz) for a certain number of samples.

 

It is fairly important that the digital input/s are read at the same time an analog conversion is completed.

 

I have been reading the LV help files and various tutorials on synchronisation and DAQmx, but the examples not always show the code all the way through to completion.

 

Could somebody please review my attached VI and tell me if this is the correct way to complete the above mentioned task.

 

I imagine there might be a lot of improvements to be made!

 

 Thanks, bye!

0 Kudos
Message 1 of 4
(3,104 Views)

Hi Sammy346,

 

Here is an example that shows start to completion of synchronized analog and digital reads: https://forums.ni.com/t5/NI-DAQmx-Examples/Synchronize-Analog-Input-and-Digital-Input-Channels-Using...

 

Try running that example configured to your specifications and see if that works for you. You will need to implement triggers on the AI which will carry over to the digital as it uses the same sample clock.

DylanC 

 

0 Kudos
Message 2 of 4
(3,095 Views)

I'm not sure if my DAQ supports this feature?

 

I get an error I think that I can only do "sample on demand" for the digital channels...

 

I'll have to check it out??

0 Kudos
Message 3 of 4
(3,072 Views)

Hi sammy346,

 

I apologize, I didn't notice the daq device in your post. The USB 6212 only supports software timing for the Digital I/O. There is no way to accurately synchronize your analog input and digital I/O with that device. 

 

 

You will need a hardware timed analog and digital input device like the https://www.ni.com/en-us/shop/model/usb-6351.html

 

DylanC

 

 

0 Kudos
Message 4 of 4
(3,067 Views)