01-22-2014 07:41 AM
/Y,
Thanks for your reply! The loop is for the multiplexer. Do you think I should neglect it? Or I need to insert one more DAQmx set timer?
I have total four multiplexer in my DAQ. Do you think I should combine them?
Best regards,
ppeng
01-22-2014 08:44 AM
Looking at the code again, the digital ports are only set once, although repeatedly, so you can remove the loop and only execute it once. 🙂
If you want to set it several times, i'm reluctant to change a digital port at 1kHz, although it might work. One solution is to compare the control between iterations and only write to digital if changed.
/Y
01-22-2014 09:37 AM
/Y,
Thanks again. I have removed the loop but it still cannot work well. Now the problem is there is no error coming out, but the time consequency is not function well. Do you know how to deal with this?
Best Regards,
ppeng
01-22-2014 01:48 PM
ppeng, have you looked at some of the examples? A simple example that uses the hardware clock is "Cont Acq&Graph Voltage-Int Clk.vi". Basically, instead of using the timed loop (which has an upper limit of 1 kHz on Windows) to deliver one reading/channel at a time, you have the hardware deliver multiple readings/channel. Also, I strongly recommend dumping the channel data into a queue, and then reading that queue in a separate loop to write it to a file. That way, the data acquisition rate won't be limited by the file write operation.