LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating square wave with variable duty cycle

We like to generate a square wave with variable duty cycle using LabView 6.1 and SCB-68 and this duty cycle comes from some PID controller programmed by LabView by reading a voltage and feeding back this square wave
0 Kudos
Message 1 of 7
(4,672 Views)
I'm going to assume that you have a DAQ board in your pc because the SCB-68 is nothing more than a connector block. There is a shipping example called Benchtop Function Generator that you can look at. It has a duty cycle control for square waves.
Message 2 of 7
(4,663 Views)
thank u for fast response but what about making a module to
generate this wave with variable duty cycle

i tried hardly to compare with the existing examples
but i was not able to have such module
0 Kudos
Message 3 of 7
(4,657 Views)
The example ships with LabVEIW versions going back to at least 6.1. What version are you using? The example I pointed out will instruct the DAQ board to generate a square wave. One of the front panels controls is for the duty cycle.
Message 4 of 7
(4,649 Views)
i am using version 6.1
and i found the example u talked about
i will tell u the whole story....
0 Kudos
Message 5 of 7
(4,645 Views)
the story begins with some one called separately excited DC motor
this thing sometimes changes its speed
so we are trying to keep a constant speed
irrespective of the load no matter how it changes
this comes by reading the voltage out from
the tackometer which represents the speed as voltage
then comparing this with a reference set by the labview program

the labview program will send a control signal to some chopper circuit
which is connected to the field of the motor which controls the speed

we are tending to make the labview program as pid controller
that will generate our beatiful square wave with some duty cycle
which will vary to increase or decrease the voltage across the field

we tried "Real-Time PID Control.vi" example and other examples
and we are discussing different solutions for this duty cycle thing
but till now no output

this is our whole story with this DC motor thing
0 Kudos
Message 6 of 7
(4,644 Views)
Hello,

With the function generator example, you should be able to generate a square wave with variable duty cycle. Currently the duty cycle input is not wired, and is defaulted to 50%. You have to add that input to the main vi and wire it to the "compute waveform.vi"
also to generate a diferent duty cycle during runtime, the duty cycle has to be bundled to the bundle that checks changes of the input parameters (amplitude, offset etc)
It should work, and you should view and examone the waveform on an Oscope, as the duty cyle changes and see if there are delays (in cycles) before the new wave form is generated.
Message 7 of 7
(4,615 Views)