Vision - 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.
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​
Property | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Background Color | The background color of the button. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | Color | .buttonBG | Appearance |
Border | The border surrounding this component. Options are No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), and Field Border. Note: The border is unaffected by rotation. Changed in 8.1.21 As of 8.1.21, the "Button Border" and "Other Border" options are removed. | Border | .border | Common |
Control Value | Bind this to the tag that you want to control. (Typically, this is bound to the same location as Indicator Value). | int | .controlValue | Data |
Cursor | The mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize. | int | .cursorCode | Common |
Disabled Image Path | The relative path of the image to be displayed when this component is not enabled. | String | .disabledPath | Appearance |
Enabled | If disabled, a component cannot be used. | boolean | .componentEnabled | Common |
Fill Area? | Controls whether or not this button's internal area is filled. | boolean | .contentAreaFilled | Appearance |
Font | Font of text on this component. | Font | .font | Appearance |
Foreground Color | The foreground color of the component. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | Color | .foreground | Appearance |
Horizontal Alignment | The horizontal alignment of the button's contents (text and/or image). | int | .horizontalAlignment | Layout |
Horizontal Text Position | The horizontal position of the button's text relative to its image. | int | .horizontalTextPosition | Layout |
Icon-Text Spacing | The space (in pixels) between the icon (if any) and the text (if any). | int | .iconTextGap | Appearance |
Image Path | The relative path of the image. | String | .path | Appearance |
Indicator Value | Bind 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 | .indicatorValue | Data |
Indicator Width | The width of the indication border that shows whether or not the indicator value is currently set. | int | .indicatorWidth | Appearance |
Max Hold Time | The maximum amount of time to keep the control value at the "On Value". When set to 0, this property is ignored. | int | .maxOnTime | Behavior |
Min Hold Time | The minimum amount of time to keep the control value at the "On Value". | int | .onTime | Behavior |
Mnemonic | A single letter that will activate the button using ALT-mnemonic . | String | .mnemonicChar | Behavior |
Mouseover Text | The text that is displayed in the tooltip which pops up on mouseover of this component. | String | .toolTipText | Common |
Name | The name of this component. | String | .name | Common |
Off Color | The color of the indicator border when the indicator value is off. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | Color | .offColor | Appearance |
Off Value | The value that will be written to the Control Value on mouse-up. | int | .offValue | Behavior |
On Color | The color of the indicator border when the indicator value is on. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | Color | .onColor | Appearance |
On Value | The value that will be written to the Control Value on mouse-down. | int | .onValue | Behavior |
Quality | The data quality code for any Tag bindings on this component. | QualityCode | .quality | Data |
Rollover? | If true, the button may indicate that the mouse is hovering over it. | boolean | .rolloverEnabled | Appearance |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Text | Text of this component. | String | .text | Appearance |
Vertical Alignment | The vertical alignment of the button's contents (text and/or image). | int | .verticalAlignment | Layout |
Vertical Text Position | The vertical position of the button's text relative to its image. | int | .verticalTextPosition | Layout |
Visible | If disabled, the component will be hidden. | boolean | .visible | Common |
Deprecated Properties​
Property | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Data Quality | The data quality code for any Tag bindings on this component. | int | .dataQuality | Deprecated |
Scripting​
Component Functions​
This component does not have component functions associated with it.
Extension Functions​
This component does not have extension 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