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.