Skip to main content
Version: 7.9

Momentary Button

Component Palette Icon

Momentary buttons are used to set a value for either a fixed amount of time, or however long the button remains held down, whichever is longer. Once the button is released, or the minimum time expires, the value is reset.

The momentary button uses its Control Value property to affect the underlying data. Typically, this property uses a bidirectional tag binding to an OPC tag. When pressed, it will write its On Value to the Control Value property. When released, it will either write Off Value to the Control Value immediately, or wait until On Time has elapsed (since the pressed event).

The button's Indicator Value, which is typically bound to the same OPC tag as Control Value, is used to draw an "active" indication border around the button. This gives the operator positive feedback that the value has written successfully. It also lets an operator at one terminal know if an operator at a different terminal is using the button currently.

note

If the client is closed before the Min Hold Time period on the Momentary Button expires, then it is possible for the button to remain in the ON or latched state. Thus, if the Control Value property of the component is bound to a tag, the tag will remain in the ON state after the client is closed. Some logic or functionality will need to be applied to reset the tag in this scenario: typically the PLC is relied on in these scenarios to reset the value Alternatively, you may wish to use a One-Shot Button instead, as that component was designed for use in situations where the PLC will reset the value.

Properties

NameDescriptionProperty TypeScriptingCategory
AntialiasDraw with antialias on? Makes text smoother.boolean.antialiasAppearance
Background 3D?Should this button have a 3d type background, or a flat color one?boolean.background3DAppearance
Background ColorThe background color of the button.Color.buttonBGAppearance
BorderThe border surrounding this component.Border.innerBorderCommon
Control ValueBind this to the tag that you want to control. (Typically, this is bound to the same location as Indicator Value).int.controlValueData
CursorThe mouse cursor to use when hovering over this component.int.cursorCodeCommon
Data QualityThe data quality code for any tag bindings on this component.int.dataQualityData
Disabled Image PathThe relative path of the image to be displayed when this component is not enabled.String.disabledPathAppearance
EnabledIf disabled, a component cannot be used.boolean.componentEnabledCommon
Fill Area?Controls whether or not this button's internal area is filled.boolean.contentAreaFilledAppearance
FontFont of text on this component.Font.fontAppearance
Foreground ColorThe foreground color of the component.Color.foregroundAppearance
Horizontal AlignmentThe horizontal alignment of the button's contents (text and/or image).int.horizontalAlignmentLayout
Horizontal Text PositionThe horizontal position of the button's text relative to its image.int.horizontalTextPositionLayout
Icon-Text SpacingThe space (in pixels) between the icon (if any) and the text (if any).int.iconTextGapAppearance
Image PathThe relative path of the image.String.pathAppearance
Indicator ValueBind this to the tag that indicates the current state of the control value. (Typically, this is bound to the same location as Control Value).int.indicatorValueData
Indicator WidthThe width of the indication border that shows whether or not the indicator value is currently set.int.indicatorWidthAppearance
Max Hold TimeThe maximum amount of time to keep the control value at the "On Value".int.maxOnTimeBehavior
Min Hold TimeThe minimum amount of time to keep the control value at the "On Value".int.onTimeBehavior
MnemonicA single letter that will activate the button using ALT-mnemonic.String.mnemonicCharBehavior
Mouseover TextThe text that is displayed in the tooltip which pops up on mouseover of this component.String.toolTipTextCommon
NameThe name of this component.String.nameCommon
Off ColorThe color of the indicator border when the indicator value is off.Color.offColorAppearance
Off ValueThe value that will be written to the Control Value on mouse-up.int.offValueBehavior
On ColorThe color of the indicator border when the indicator value is on.Color.onColorAppearance
On ValueThe value that will be written to the Control Value on mouse-down.int.onValueBehavior
Rollover?If true, the button may indicate that the mouse is hovering over it.boolean.rolloverEnabledAppearance
StylesContains the component's styles.Dataset.stylesAppearance
TextText of this component.String.textAppearance
Vertical AlignmentThe vertical alignment of the button's contents (text and/or image).int.verticalAlignmentLayout
Vertical Text PositionThe vertical position of the button's text relative to its image.int.verticalTextPositionLayout
VisibleIf disabled, the component will be hidden.boolean.visibleCommon

Scripting

Scripting Functions

This component does not have scripting functions associated with it.

Event Handlers

Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page

Customizers

Examples

**Momentary Button Activation States