11-29-2017 12:00 PM
Hello! I am new in Labview for data acquisition.
I have a NI USB 6259 DAQ (Labview Ver-2011).
I need to create DAQmx task that will continuously acquire data from (ai-0)
and send that acquired data, as it is, to output DAQ channels (ao-0 & ao-1) simultaneously, real-time.
input data (variable Frequency = 15Hz to 2KHz).
Anyone can help. I thank in advance for the help.
Regards,
Aamer.
Solved! Go to Solution.
11-30-2017 04:30 PM
Aamer2k,
There are no internal routes available to do this automatically.
Why do you need to generate an output if it already exists and is going into an input on your device already? Could you just use the same wire that is going into ai0 instead of generating a redundant signal?
If you still need to do this, you could experiment with writing in the same values as you are reading out in two separate tasks. Look at the "Voltage - Continuous Input" and "Voltage - Continuous Output" examples. You could try wiring the data terminal from the read on the input example to the data terminal from the write on the output example.
VanCamp
12-05-2017 01:08 PM
12-06-2017 09:57 AM
Hello:
I've tried what you said. First I used DAQmx Functions, at 1Hz input, output is 1Hz ok, but as i change input frequency the output wave shape is change. 1 to 10Hz input, output is ok, but >10Hz, output is not acceptable.
12-06-2017 10:02 AM
When I used DAQ Assistant. Output wave shape is 100% ok as input, 1 to 2kHz.
But problem is time difference between input and output is 50 milli seconds.
time should be less then 500 usec.
12-06-2017 02:20 PM
Aamer2k,
Currently, your code is not synchronized because you have not shared a trigger or sample clock - your tasks just happen to be loading at approximately the same time.
Look at this article, which explains some synchronizations methods: http://www.ni.com/product-documentation/4322/en/
Specifically, I advise modifying your code to be similar to figure 2, which implements sample clock synchronization - add the sample clock VI's and merge your errors accordingly, which makes sure the input is ready to read before the output begins writing. Also, the "rate" control they implemented is what is necessary to preserve the shape of the signal - the default sample rate is too low for the signals you are trying to read. Try setting the rate to 100kHz.
VanCamp