08-05-2019 12:20 AM
Hello all,
I am trying to read two AI (Analog Input) from DAQ NI-USB 6253 simultaneously. It always shows an error. could anyone share code how I can read and synchronization?
Solved! Go to Solution.
08-05-2019 01:40 AM
What error are you getting? If you are using USB-6259, it multiplexes the input so it is not exactly simultaneous.
If you are using a DAQmx API, you should just do what it says below.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8b1SAC&l=en-US
08-05-2019 03:15 AM
Thank you. It is very useful. Let me explain to you more. MY device is NI USB-6259(BNC). I am trying to read two XY piezo stage AI(Analog Input) signal and one AI from detectors through lock-in amplifier. My goal is to read and synchronize these three signal. Now I did by DAQ assistance through Explorer It is working. But It cannot show simultaneously. and did not show any error.
08-05-2019 03:42 AM
You should use hardware that supports simultaneous analog input such as USB-6353 or NI 9215 when you want to acquire simultaneously, especially when you want to analyze data from a lock-in amplifier.
That being said, if you could attach a screen capture of VI, I could take a closer look.
08-05-2019 10:23 AM
I suspect you're trying to run 3 distinct AI tasks simultaneously. Instead you should include all 3 AI channels in 1 task. There's only 1 timing engine available for AI, so you can't run separate tasks at the same time.
As stated before, those channels will be multiplexed and have a small fixed timing offset for when their A/D conversions are captured. If you sample at 1 kHz, all 3 channels will be updated every 1 msec. But for each msec interval, the individual channels will be converted at a different offset within that msec. These offsets *will* be hardware-timed and consistent.
There are apps where it's ok to ignore this offset, apps where it's sufficient to know about it and compensate appropriately, and apps where you must use a device capable of true simultaneous sampling. Dunno which kind you have.
-Kevin P
(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).