As from the VI attached, I have init. the PXI6733 so that it will output 2 samples at 125kHz.
I m trying to output 2samples at every loop without reinitialize the device.(Please refer to the VI attached)
Loop 1, AO:0 = 1V, 3V (Analog devices PXI6733, Analog output Channel 0)
Loop 2, AO:0 = 2V, 4V
Loop 3, AO:0 = 3V, 5V
the data is change from loop to loop, i.e. the data is changes dynamically.
And at the same time, I need to acquired 2 samples Analog In too, by using Analog Input device, PXI6255.
Since initialization will take some time, I will prefer to skip the initialize steps and output/acquire new data in every loop (2ms).
I have running out of idea and hope any1 here would give me some opinion/idea. Any comments are appreciated. Thanks.
Solved! Go to Solution.
Hello Eng Wei,
Attached is an example that you can use to do just exactly what you are trying to do.
What you need to do is to adjust the output to output level that you want. As you can see in the program, there are few things that you might need to change for your application but the initialization happens outside of the loop and inside just changing the value output and read input.
The VI you attached can't run properly. I have run the ori copy from NI example and it work well.
Please see the attached. Without the "DAQmx Start Task" function on write task, the vi will have error message.
If removed it, the AI task will only read the final value. Please refer to the VI for the value.
I have refered to http://forums.ni.com/ni/board/message?board.id=250&thread.id=23609&view=by_date_ascending&page=2 and it seems quite complicated as it will use counter to trigger each acquisition, and I would like to solve the less complicated of AI-AO first.
Thanks and welcome any comments.