I'm controlling a linear actuator driver with the PG-522 pulse generator and the DO-400 digital output module. The PG-522 provides pulses for the actuator, and the DO-400 provides the direction signal. I'm trying to write a VI that will supply a set number of pulses, pause, then switch the direction signal from low to high (or vice-versa). I'm currently doing this by monitoring the Pulses Remaining value. When it reaches zero, I read the direction signal, invert it, then write the inverted value back to the DO-400. Then that process repeats. However, I'm having trouble with the timing of this whole process. I think the trouble lies in my while loop time delays and the delay associated with the pulse countdown. Does anyone have any ideas on how to make this process run smoothly?
Thanks,
Eric