Vision - One-Shot Button
Component Palette Icon
The One-Shot button is great for telling a PLC to do something. It simply writes a value, and then waits for it to be reset by the PLC before it is available again. This is only applicable when the PLC is programmed to reset the value after reading it. If your PLC expects the HMI to reset the bit, use the Momentary Button.
This component is considered safer than the momentary button, because it receives positive feedback from the PLC that the signal was received, avoiding the timing dangers associated with a Momentary Button.
To use the One-Shot button, bind an OPC tag bidirectionally to the button's Value property. When clicked, the button will write the value in its Set Value property to the Value property. Typically, Set Value is 1, and Value is 0 in a ready state, although the logic could be reversed or change simply by altering Set Value. The button can disable itself when it is writing, and will display different text. The button considers itself to be writing whenever Value equals Set Value - you must make sure that the PLC resets this value, otherwise the button will remain in a writing state.
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 |
Border Painted? | Indicates if the border of this button should be displayed. Changed in 8.1.8 This property was removed in 8.1.8 | boolean | .borderPainted | Appearance |
Confirm Text | The message to ask the user if confirmation is turned on. | String | .confirmText | Behavior |
Confirm? | If true, a confirmation box will be shown. | boolean | .confirm | Behavior |
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 |
Disable While Writing | If true, the button will be disabled while it is writing. | boolean | .disableWhileWriting | Behavior |
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 |
Focusable | If a button is not focusable, you will not be able to interact with it with the keyboard. This means you can't "tab" over to it. | boolean | .focusable | Behavior |
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 |
Idle Text | The text of the button while its value is not being written. | String | .normalText | Behavior |
Image Path | The relative path of the image. | String | .path | Appearance |
Margin | The space between a button's text and its borders. | Insets | .margin | Layout |
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 |
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 | Behavior |
Set Value | The value to set the control value to when the button is pushed. | int | .setValue | Data |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Value | The current value. Should be bound bi-directionally to a tag. | int | .value | Data |
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 |
Writing Text | The text of the button while its value is being written. | String | .writePendingText | Behavior |
Deprecated Properties​
Property | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Data Quality | The data quality code for any Tag bindings on this component. | int | .dataQuality | Deprecated |
Opaque | If true, button will be opaque. Default is false. | boolean | .opaque | Common |
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