07-08-2008 01:58 PM
07-08-2008 02:09 PM
Is the digital IO board you have a NI board?
With a 1 second period, you could just try write the PWM logic in a while loop. Depending on the other things you have going on, you might be able to get ok performace with just a software controlled PWM. Pretty simple logic that even LV 5.1 can do...
07-08-2008 03:07 PM
Thank you, StevenA, for the answer.
I understand that when Labview enters a While loop, it stops doing anything else until the while is finished.
I imagine a while loop which count depends on the duty cycle. So, for example. Lets start with a output of 0. If the count is less than a number representing the duty cycle, the ouput remains the same. When the counter reaches the count, it switches the output, for example, to 1. it has to start counting again, to reach the number representing the time T*(1-D) (T=period, D =duty cycle).
But, as I see, the software would have to do this countinously. How can I do this in a "parallel" way with the principal program. One thing I tried to do was to program a resettable counter with count ticks, or something like that, but I couldn't do that. ¿Where am I wrong?
I know may be I should think a little more, but, is there an example showing how to do the PWM with the while loop? ¿Where can I find the Vi code for that example?
Thank you very much, again,
fgf
07-08-2008 08:55 PM - edited 07-08-2008 08:58 PM
fgf,
code up this PWM in LV 5.1
07-08-2008 09:01 PM
fgf wrote:
How can I do this in a "parallel" way with the principal program.
07-15-2008 01:26 PM
07-15-2008 08:26 PM