WaveformGenerator Class
(Automation::WaveformGenerator)The WaveformGenerator component is a multi-functional waveform signal generator. It can be used to generate sine, triangle, square or sawtooth waveforms. More...
| Header: | #include <WaveformGenerator> |
| Inherits: | CDPComponent |
Protected Functions
| double | CalculateSine() |
| double | CalculateSquare() |
| double | CalculateTriangle() |
| int | MessageRestart(void *message) |
| double | PhaseShiftInSec() |
Reimplemented Protected Functions
| virtual void | Create(const char *fullName) override |
| virtual void | CreateModel() override |
| virtual void | ProcessNull() override |
- 12 protected functions inherited from CDPComponent
- 15 protected functions inherited from CDPObject
- 1 protected function inherited from CDP::StudioAPI::CDPNode
Additional Inherited Members
- 92 public functions inherited from CDPComponent
- 39 public functions inherited from CDPObject
- 50 public functions inherited from CDPBaseObject
- 27 public functions inherited from CDP::StudioAPI::CDPNode
- 22 public functions inherited from CDP::StudioAPI::ICDPNode
- 2 static public members inherited from CDPComponent
- 6 static public members inherited from CDPObject
- 1 static public member inherited from CDPBaseObject
- 42 protected variables inherited from CDPComponent
- 9 protected variables inherited from CDPObject
- 10 protected variables inherited from CDPBaseObject
Detailed Description
The WaveformGenerator component is a multi-functional waveform signal generator. It can be used to generate sine, triangle, square or sawtooth waveforms.
Properties
| Property | Description |
|---|---|
| WaveType | Waveform type to generate. Select between:
Note: Digital pulses (values changing between 0 and 1) can be generated using Square and setting Amplitude=0.5 and Offset=0.5 |
| UseHwClock | Set to true to use more accurate (but slower) hardware time source |
| fs | Generator running frequency (affects the waveform granularity) |
Parameters
| Parameter | Description |
|---|---|
| Amplitude | Amplitude of the generated waveform |
| Frequency | The frequency [Hz] of the generated waveform |
| Symmetry | Waveform rise/slope symmetry [%]
|
| Offset | The offset of the generated waveform |
| PhaseShift | The phase shift of the generated waveform (in rad degrees) |
Signals
| Signal | Description |
|---|---|
| Output | Generator output (generated waveform) |
| Time | Time in seconds since generator start or restart |
Messages
| Message | Description |
|---|---|
| CM_SUSPEND | Suspend waveform generation. The last generated value will be held in the output. |
| CM_ACTIVATE | Resume waveform generation. |
| Restart | Restart the waveform generation (and zero the Time signal) |
Member Function Documentation
[protected] double WaveformGenerator::CalculateSine()
[protected] double WaveformGenerator::CalculateSquare()
[protected] double WaveformGenerator::CalculateTriangle()
[override virtual protected] void WaveformGenerator::Create(const char *fullName)
[override virtual protected] void WaveformGenerator::CreateModel()
[protected] int WaveformGenerator::MessageRestart(void *message)
[protected] double WaveformGenerator::PhaseShiftInSec()
[override virtual protected] void WaveformGenerator::ProcessNull()
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.












