The Verilog PWM (Pulse Width Modulation) generator creates a 10MHz PWM signal with variable duty cycle. Two buttons which are debounced are used to control the duty cycle of the PWM signal. The first push button is to increase the duty cycle by 10%, and the other button is to decrease the duty cycle by 10%. Used as a square wave signal generator, generate square wave signal for experimental development and use; 2. Used to generate a square wave signal that controls the motor driver; 3. Generate adjustable pulse for MCU use; 4. Generate adjustable pulse, control the relevant circuit (PWM dimming speed and other applications).
Dialog Box Options
Parameter | Description |
---|---|
Display Window | Displays the loaded waveform(s) for the function generator. Both the X- and Y-axis are autoscaled. The signals are plotted as amplitude versus time. The display also Contains the following options:
|
Instrument Control | Contains the following options:
|
Mode | Contains the following options:
|
Function Setup | Contains the following options:
|
Block Diagram Inputs
Parameter | Description |
---|---|
Device Name | Specifies the name of the I/O device in use. |
Stop | Specifies to stop the task and release device resources when this Express VI completes execution. This input is TRUE by default, meaning the task stops after all samples are acquired or generated. For continuous operations, put the Express VI in a While Loop and wire the stop input to the same stop control you wire to the conditional terminal on the While Loop. This will prevent the task from being reconfigured with each iteration of the loop, as well as stop the task and release the resources when the While Loop is stopped. |
Frequency (Hz) | Controls the frequency of the output waveform. |
DC Offset (V) | Adjusts the DC offset of the waveform. |
Amplitude (Vpp) | Adjusts the peak amplitude of the generated waveform. |
error in | Describes error conditions that occur before the VI runs. |
Type | Selects which type of waveform is generated. |
Duty Cycle (%) | Specifies the Turn ON to Turn OFF time ratio for the generated square wave. |
Signal Route | Specifies where the FGEN signal generates. |
Manual | Controls whether the FGEN signal generation is in Software Mode or Manual Mode. |
Block Diagram Outputs
Parameter | Description |
---|---|
Manual? | Indicates if the Function Generator is being controlled manually. |
error out | Contains error information. If error in indicates that an error occurred before this VI ran, error out contains the same error information. Otherwise, it describes the error status that this VI produces. |
How to Generate a Waveform Using the NI ELVISmx Function Generator
Complete the following steps to use the NI ELVISmx Function Generator to generate a waveform.
- Connect the Function Generator FGEN pin on the NI ELVIS II Series Prototyping Board to the location where it is needed.
- Add the NI ELVISmx Function Generator to your application.
- Choose the desired values in the Function Setup controls.
- Click the Run button to begin generating a waveform.
Tip While generating, you can modify the waveform by changing the front panel controls. |