Polybench® Reference
Reads a variable or parameter and converts it to a constant numerical value at the output.

Variable To Constant

Overview

Converts the specified variable to a constant signal value at the output.

If the variable does not refer to a numerical value, then the result is 0. If the variable does not refer to a valid location, then the constant value is also 0. If the variable refers to a value in a list, and that value is currently not available, then the output constant is 0 as well.

Operator ports

Output K: Floating point values
This is a Constant output, which does not output a signal, but a single value. A constant output does not have a sample frequency and is therefore recognized by Polybench to be a constant. Many calculations can be performed on constants as well as signals (or a combination of both). If an operator performs a calculation on constants only, it becomes a constant operator itself.

Constants and any other data source are allowed to be mixed without synchronization ("Synchronizer").

In a schematic, connectors that are connected to constant outputs are always colored black, while connections from other data sources may be colored differently.

Properties

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

Address
type: Address, starts with '$' sign (see "Address - how to address objects and variable parameters")
Specify the address of a variable that should be copied to the constant value at the output.

You may type or paste the address, or you may press the small button on the right to open the Address Constructor ("Address Constructor")

Unit
type: See description
The unit of the constant value. This value is optional and per default empty.


ChannelName
type: See description
The name of the channel that contains this constant value.


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.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

Address
type: See description
Specify the address of a variable that should be compared to CompareValue

Details

Please note that it may take some time before a changed variable will result in a new constant value at the output. This is because the Variable to Constant operator polls the variable at a rather slow interval rate. In the worst case the update might take a couple of 100 milliseconds.