08-25-2016 09:50 AM
I have a USB=4431 which has analog in and out.
What I'm trying to do is basically use it as an accelerometer amplifier with a real-time voltage output. That is, read data coming in off the accelerometer, then spit the signal back out of the analog voltage out port a different voltage with less than say, 5 ms latency. Max frequency response coming out at 12 kHz to 15 kHz would be fine.
I'm getting it to work, but only with huge latency as it reads, buffers, then writes to the output.
Anyone know of an example code or suggestions? I see lots of analog read and write examples, but nothing similar to what I'm trying to do. Do you think this is this even possible given the hardware?
08-26-2016 09:26 AM
Hi scottrod,
We don't directly spec latency on read/write conversion on those devices, so the latency will be highly-related to how you have the code configured. For the fastest setup (using this hardware) I'd suggest using hardware-timed single point since that effectively avoids the time associated with buffering data. There are a few examples of HWTSP acquisition and output in the example finder (Help >> Find Examples >> Hardware I/O >> DAQmx). Using this would be better and could probably offer latency < 5 ms, but I cannot definitively say that.
The best solution is probably to skip the software involvement and just get a cheap analog operational amplifier. That will offer the least latency and be fairly inexpensive.