Signal Source
Jump to navigation
Jump to search
Signal generator: generates a variety of waveforms.
Supports an output of type complex, float, int, and short
Parameters
(R): Run-time adjustable
- Sample Rate (R)
- Default value: samp_rate
- Sample rate (fs) is the average number of samples obtained in one second. Its units are samples per second or hertz e.g. 48,000 sample rate is 48 kHz.
- Waveform (R)
- options: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth]
- For selection with a variable, the following values should be used:
* Constant = 100 * Sine = 101 * Cosine = 102 * Square = 103 * Triangle = 104 * Sawtooth = 105
- Frequency (R)
- Frequency of the waveform (default: 1000)
- Amplitude (R)
- Amplitude of the output (default: 1)
- Offset (R)
- Offset from zero (default: 0)
- Initial Phase (Radians) (R)
- Default: 0
Messages
The 'freq' message port has been deprecated in 3.9
in favor of the 'cmd' message port.
The 'cmd' message port accepts message pairs.
- 'freq' . float value
- 'ampl' . float value
- 'phase' . float value
- 'offset' . float value
Example Flowgraph
This flowgraph is for version 3.9+.
Example Output
Types of Waveforms:
Cosine (complex):
Constant:
Square:
Triangle:
Sawtooth:
Source Files
- C++ files
- [1]
- Header files
- [2]
- Block definition
- [3]