Hi hyperimage,
Have you tried taking a look at one of the example VIs for generating continuous pulse trains to see if the same behavior occurs? This would be a good debugging step.
A good example to try running on its own would be the Gen Dig Pulse Train - Continuous which can be found by navigating in the Example Finder to Hardware Input and Output >> DAQmx >> Generating Digital Pulses. Also, what connector block are you using to wire the signals externally? Are you sure you have connected the signals properly?
You also mention that the pulses are being generated in response to an encoder signal, but I don't see anything in your code that indicates that you are using a trigger controlled by an encoder signal. How does the pulse generation respond to the encoder signal?
Regards,
James D.
Applications Engineer
National Instruments