Hi,
I'm using the "Generate Pulse Train.vi" to generate pwm signals in counters 0 and 1 in order to drive a DC motor both ways.
The problem is, I need to control the movement of the dc motor with my PI controller which is inside a while loop. I've tried letting the "generate pulse train.vi" outside the while loop, but the problem is, it only changes the value of the duty cycle when the loop is stopped. I also tried putting it inside the loop, but then it doesn't even work.
So, how can I vary a PWM´s duty cycle inside a while loop?
I'm attaching the VI with the PI controller.
Thanks for your help!
Guilherme