Polybench® Reference
Transforms a constant input signal at the Constant-input to a timed signal. The signal timing is determined by the Signal input.

Clocked Constant

Overview

This operator converts constant values to a signal with the same values. A timed signal of any type is connected to the Signal input. This signal determines the sample frequency and data source of the new signal. The values in the signal are determined by the Constant input.

Operator ports

Input Signal: Any sample type. The connection is not limited to one type of signal.

Input Constant: Any sample type. The connection is not limited to one type of signal.

Output K(t): Any sample type. The connection is not limited to one type of signal.

Properties

Find more information about changing properties here: "Properties Viewer"

TriggeredConstant
type: True or False
Set to True if the output should copy the constant input only one sample long (trigger), or to False to copy the constant input continuously
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Details

Constant values are used for all kinds of calculations, or to initialize a calculation with a preset. However, constants cannot be shown in a time viewer, such as the Y-T Viewer, because a constant sample does not have a time component. Also, constant values cannot be stored using a Storage operator ("Storage"), because constants are no signals.

In order to convert a constant into a timed signal, you need the Clocked Constant. The Clocked Constant itself does not set a value, but it merely converts an existing constant into a signal that is derived from another signal in your project. The existing constant values are connected to the Constant input. The reference signal is connected to the Signal input.

Note that this operator works for all sample types, except for the case that the Clocked Constant TriggeredConstant property is set to True. In that case the constant values must be floating point samples.

How the output signal looks like

The output of the Clocked Constant is constructed using elements from both inputs. The output channel configuration depends on how the input connections look like. There are the following possibilities:

1. The Signal input has 1 channel, the Constant input one or more channels:
The channel names and units are copied from the Constant input.

2. The Signal input has more than one input, the Constant input has 1 channel:
The channel names and units are copied from the Signal input.

3. The Signal input and the Constant input both have an equal amount of channels:
The channel names and units are copied from the Constant input.

Note that the output values of the Clocked Constant are always copied from the Constant input.

Examples of usage


To store constant values against time, the Clocked Constant is used to make a signal from the three constant values. The values at the output are equal to the constant values, but now the time dimension is added to them.


This example shows how values in a signal can be exchanged by a constant (default) value if some criterium has been fulfilled. In this case, if any of the input values becomes greater than 400, it is exchanged by -1. The exchanging of values is done using the Gate operator ("Gate"), which can switch between two input signals for each channel separately.
The Gate operator requires the channel configurations at both its signal inputs to be equal, so you cannot simply connect a number of -1 constants to the Gate operator. The Clocked Constant comes in handy here, because firstly it converts the default constant value of -1 into a signal similar to the original signal. Secondly, the Clocked Constant copies the -1 value to all channels at its output. If the original signal would have 100 channels, then in this case you are saved from putting 100 constants in the project...