Generates a point-by-point sine wave using direct digital synthesis. The synthesis runs continuously from the top-level FPGA target clock to produce an accurate real-time frequency. Each execution of this VI returns the most recent sample produced by the underlying synthesis engine.
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
| Parameter | Description |
|---|---|
| Sine Parameters | Contains the following options:
|
| Implementation | Contains the following options:
|
| Power Spectrum Preview | Displays a preview of the configured signal power spectrum. The peak corresponding to the configured frequency is normalized to 0 dB. The next highest peak in the spectrum gives an estimate of the spurious free dynamic range resulting from the configured implementation parameters. Refer to the NI Developer Zone for information about the spurious free dynamic range. |
| Parameter | Description |
|---|---|
| initialize | Sets the VI to the initial state determined by phase offset. The VI initializes automatically when it first runs. |
| phase increment | (Optional) Specifies the frequency of the sine wave according to the following formula. phase increment = [(frequency / FPGA clock rate) * 232] [ ] = rounded to the nearest integer The output frequency depends on the top-level FPGA target clock rate. Verify the top-level FPGA target clock rate is set in the Top-Level Clock FPGA Target Properties page before you configure the Sine Wave Generator Express VI. The default corresponds to the value of Frequency (Hz) you enter in the Configure Sine Wave Generator dialog box. The step size through a 32-bit accumulator determines the frequency. The upper n bits specify the address of the sine point in a 2n element look-up table. Place a checkmark in the Show increment terminal checkbox in the Configure Sine Wave Generator dialog box to add this parameter to the VI connector pane on the block diagram. |
| phase offset | (Optional) Specifies the initial phase of the sine wave according to the following formula. phase offset = [(phase offset (deg) / 360) * 232] [ ] = rounded to the nearest integer The default corresponds to the value of Phase offset (deg) that you enter in the Configure Sine Wave Generator dialog box. Place a checkmark in the Show offset terminal checkbox in the Configure Sine Wave Generator dialog box to add this parameter to the VI connector pane on the block diagram. |
| Parameter | Description |
|---|---|
| sine out | Returns a signed 8-, 16-, or 32-bit integer containing the sine output point. |
| cosine out | (Optional) Returns a signed 8-, 16-, or 32-bit integer containing the sine output point offset by 90 degrees. |
If you run the FPGA VI with an FPGA target emulator, the Sine Wave Generator Express VI outputs every point of the generated sine wave, regardless of the rate at which LabVIEW calls the VI. To produce the same data when you run the FPGA VI with an FPGA target emulator as when you run the FPGA VI on an FPGA target, change phase increment to take into account the rate at which the FPGA VI calls the Sine Wave Generator VI. The following equation determines the correction for using an FPGA target emulator.
phase increment (emulation) = phase increment (FPGA) * FPGA loop time (ticks)