Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Lag DAQ output

Hi experts,

I have a problem getting the DAQ output to work properly. Without the DAQ, my output waveforms which is supposed to be a square waveform (0 V to 5V), works perfectly if I replace it with waveform chart.

The input waveform seems to lag so much after the DAQ output is added. Does that have anything to do with sampling anywhere?
It will be great if someone can figure this out.

Thank you
0 Kudos
Message 1 of 3
(2,962 Views)
Since you are generating a dc level, try setting the DAQ Assistant to a single sample on demand.
0 Kudos
Message 2 of 3
(2,943 Views)
Hi Johnsonzoen,

The reason your application seems laggy is due to the fact that you are outputting 3000 samples at a rate of 1KHz to your DAQ card every iteration of the loop.  I would recommend changing the simulate signals in the case structure to only output 1 sample.  You will then need to change the DAQ assistant to output single sample on demand.  This will significantly speed up your application and  your output rate.  I tested your application with a peep and pip value of 2.5 and I could clearly see a well defined square wave on the output.  When outputting a DC value on an analog output, the analog output will maintain the last set value until it is changed.  For example, if you output 5 volts it will stay at 5 volts until you change it, the device resets, or you turn off power.

I hope this helps,
Paul C.
0 Kudos
Message 3 of 3
(2,930 Views)