LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency problem compact rio

Solved!
Go to solution

The logic is slightly more complicated but you can do it with a timed loop.  Instead of a wait, you count down loop cycles.  Whenever the counter hits 0, you invert the output and reload the counter with the other timer value, alternating between the "on" time and the "off" time.

0 Kudos
Message 31 of 36
(824 Views)

and what about the wire error and the counter inside de flat sequence?

0 Kudos
Message 32 of 36
(822 Views)

The logic is completely different.  There is no need for a sequence structure, error wire, or wait.

0 Kudos
Message 33 of 36
(820 Views)

then,could i increase with it the frequency work?

0 Kudos
Message 34 of 36
(818 Views)
Solution
Accepted by topic author mariomoskis

I don't know, but it wouldn't hurt to try.  I also still think you should time your current loop to see how fast it runs, as I suggested before.  If you don't understand how to use a shift register, and the subtract function, then you should work through more of the LabVIEW basics first.

 

I do not think you will be able to generate a reliable PWM signal at 500hz in software.  I don't know about 100hz, depends on the resolution of the cRIO clock.  To generate a PWM at 100hz, if you want to vary the duty cycle in 1% increments, you will need a loop running at 10kHz (100hz divided by 100 clock ticks per period).  You may not be able to get 100usec resolution on the cRIO.

0 Kudos
Message 35 of 36
(814 Views)

ok, i will try to do it, i will ask to my teacher if i will need higher frequency work,or maybe with 50 Hz is enough.

thanks for your time

0 Kudos
Message 36 of 36
(811 Views)