Xentara v1.2.1
User Manual
Loading...
Searching...
No Matches
The Signal Generator

The Signal Generator I/O Driver

Xentara has a built-in I/O driver named SignalGenerator. This driver does not perfrom any actual I/O, but generates signals, like sine waves, pulse waves, or white noise. The signal generator can be used for testing purposes, or to generate reference signals

Samplers and Signals

The actual generating of the signals is performed by a sampler. A sampler is an I/O component, that contains an I/O point for each signal that it generates.

Samplers expose a single task named generate that generates new values for all its signals. You can insert that task into an execution pipeline and attach it to a timer or an event. To refer to the task, use its primary key. The primary key of the generate task of a sampler called “My.Sampler” is “My.Sampler.generate”.

Accessing Samplers

Samplers have the following members:

Attributes
keyThe sampler’s primary key.
nameThe sampler’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the sampler.
updateTimeThe last time new values were generated for the signals.
qualityThe quality of the signals. The quality will be “good” if the generate task has been called at least once.
Tasks
generateGenerates new values for all the signals
Events
qualityThis event is emitted whenever the quality changes.

To refer to a member, use its primary key. The primary key of the generate task of a sampler called “My.Sampler” is “My.Sampler.generate”.

Accessing Signals

Signals have the following members:

Attributes
keyThe signal’s primary key.
nameThe signal’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the signal.
valueThe current value of the signal.
updateTimeThe last time the value was generated.
changeTimeThe last time the value changed. For some wave forms (e.g. pulse waves), the value might not change every time it is generated, so the change time may be older than the update time.
qualityThe quality of the value. The quality will be “good” if the generate task of the sampler has generated a value for the signal at least once.
topThe top of the value range of the generated signal. For normal signals, this is the maximum value the signal will ever reach. For inverted signals (where the bottom is greater than the top), this is the minimum value the signal will ever reach.
bottomThe bottom of the value range of the generated signal. For normal signals, this is the minimum value the signal will ever reach. For inverted signals (where the bottom is greater than the top), this is the maximum value the signal will ever reach.
Events
valueThis event is emitted whenever the value changes.
qualityThis event is emitted whenever the quality changes.
changedThis event is emitted when either the value or the quality changes.

To refer to a member, use its primary key. The primary key of the value attribute of a signal called “My.Sampler.SineWave23” is “My.Sampler.SineWave23.value”.