05-14-2012 01:10 AM
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!
05-14-2012
04:07 PM
- last edited on
05-07-2024
08:22 AM
by
Content Cleaner
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
05-17-2012 06:52 PM
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??
05-17-2012
08:07 PM
- last edited on
05-07-2024
08:23 AM
by
Content Cleaner
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