I am using the attached VI in attempt to output a variable/controllable digital PWM wave from a NI USB-6356,6366 DAQ. However, my oscilloscope reading is quite unstable compared to using the DAQ Assistant's test output. As seen below to the left, the code generated square wave's duty cycle seems to be oscillating rapidly. It is set to 100 Hz and 50% duty cycle on the front panel. To the right is the stable signal from the DAQ Assistant.