Polybench® Reference
Puts out one channel with one constant value that can be changed by pressing a button.

Constant Button


Use this operator if a constant value should be set anywhere in a measurement configuration, that can be changed by the end-user by pressing a button.

Operator ports

Output K1 | K2: 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 another 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 (link).

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

Paired User Interface Object

This operator is loaded simultaneously with a user interface object. The user interface object can be moved to another page, and would normally be displayed in the end-user application. The operator and this user interface object can never be separated. If you delete the operator, the user interface is deleted automatically as well. Note that you cannot delete the user interface, only the operator symbol!


Find more information about changing properties here: link

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

type: See description
The constant value at the output channel when the button is pressed.

type: See description
The constant value at the output channel when the button is NOT pressed.

type: See description
The text on the button.

type: See description
The text on the button if it is toggled. Only works if ButtonType is 'Toggle'.

type: Select from the list
Select the button type: trigger (default) or toggle.
Select one of those presets:
Trigger type botton (one shot)
Toggle type button (state)

type: Known button type name
The name of the button format in the Button Repository, used to draw this button.

This property selects a button layout from the Button Repository. For more information about the use of buttons in a project, refer to link

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

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

type: See description
Button state, which is either Pressed (1) or Released (0). If you put a non-zero value in this variable, then this has the result as if the button is pressed or set to be toggled.


Find more information about Functions here: link

Sets the button to Enabled, so that it accepts user input.

Sets the button to Disabled, so that it does not accept any user input.


The Constant Button does not immediately change its output when the button is pressed, if the project has not been started. The reason for that, is that the Constant Button tries to synchronize the output change with other running signals. As a result, the output change after pressing the button may be delayed anywhere between 0 and approx. 15 ms. Also, the Constant Button only changes its state if processing has been started (so: after a START action).

It is possible to change or read the button state from inside the project, by writing or reading a 0 or 1 to or from the ButtonState variable parameter.

In Trigger mode, writing 1 to ButtonState has the same effect as pressing the button, and writing 0 has the effect of releasing the button. Note that if you forget to write a 0 after writing a 1, this is like pressing the button continuously.

In Toggle mode, this parameter may be 1 for as long as the button is toggled. If you write 1 to ButtonState, then the button is set toggled (this is the same as pressing and immediately releasing the button). If you write a 0, then the button is set to the Released state (this is the same as again pressing and immediately releasing the button).

User Interface Object on Printable Pages

The user interface of this component will not be printed on a report if it is put on a Printable Page (see link). The reason for that, is that the object is especially designed for use on screens, and does not have a function on paper.