Top  | Previous | Next

Momentary Button

Momentary Button<br>
waiting to be pressed

Momentary Button
waiting to be pressed

Activated Momentary Button

Activated Momentary Button

Description

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 Control Value. When released, it will either write Off Value to 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.

 

sign_warning Note that you may want to use the Latched Button instead of the Momentary Button if you simply need to send a signal to a PLC, and the PLC is able to reset the value. This lets the PLC reset the value, avoiding the potential for the bit to be left high. This is possible with the Momentary Button if, for example, the power to the client was cut while the button was held down.

Properties

Appearance

Font

Font of text of this component

Scripting name

font

Data type

Font

Foreground Color

The foreground color of the component.

Scripting name

foreground

Data type

Color

Background Color

 

Scripting name

buttonBG

Data type

Color

Background 3D?

Should this button have a 3d type background, or a flat color one?

Scripting name

background3D

Data type

boolean

Flags

expert

Fill Area?

Controls whether or not this button's internal area is filled

Scripting name

contentAreaFilled

Data type

boolean

Flags

expert

Rollover?

If true, the button may indicate that the mouse is hovering over it.

Scripting name

rolloverEnabled

Data type

boolean

Flags

expert

Text

Text of this component

Scripting name

text

Data type

String

Flags

bindable

Indicator Width

The width of the indication border that shows whether or not the indicator value is currently set.

Scripting name

indicatorWidth

Data type

int

On Color

The color of the indicator border when the indicator value is on.

Scripting name

onColor

Data type

Color

Off Color

The color of the indicator border when the indicator value is off

Scripting name

offColor

Data type

Color

Image Path

The relative path of the image.

Scripting name

path

Data type

String

Flags

bindable

Disabled Image Path

The relative path of the image to be displayed when this component is not enabled.

Scripting name

disabledPath

Data type

String

Flags

expert

Icon-Text Spacing

The space (in pixels) between the icon (if any) and the text (if any)

Scripting name

iconTextGap

Data type

int

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Styles

Contains the component's styles

Scripting name

styles

Data type

Dataset

Flags

bindable | expert

Behavior

Mnemonic

A single letter that will activate the button using 'ALT-mnemonic'.

Scripting name

mnemonicChar

Data type

String

On Value

The value that will be written to the Control Value on mouse-down.

Scripting name

onValue

Data type

int

Off Value

The value that will be written to the Control Value on mouse-up

Scripting name

offValue

Data type

int

Min Hold Time

The minimum amount of time to keep the control value at the "On Value"

Scripting name

onTime

Data type

int

Max Hold Time

The maximum amount of time to keep the control value at the "On Value"

Scripting name

maxOnTime

Data type

int

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Enabled

If disabled, a component cannot be used.

Scripting name

componentEnabled

Data type

boolean

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

Scripting name

toolTipText

Data type

String

Border

The border surrounding this component.

Scripting name

innerBorder

Data type

Border

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Control Value

Bind this to the tag that you want to control. (Typically, this is bound to the same location as Indicator Value)

Scripting name

controlValue

Data type

int

Flags

bindable

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)

Scripting name

indicatorValue

Data type

int

Flags

bindable

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Layout

Horizontal Alignment

The horizontal alignment of the button's contents (text and/or image)

Scripting name

horizontalAlignment

Data type

int

Values

2

Left

0

Center

4

Right

10

Leading

11

Trailing

Horizontal Text Position

The horizontal position of the button's text relative to its image

Scripting name

horizontalTextPosition

Data type

int

Flags

expert

Values

2

Left

0

Center

4

Right

10

Leading

11

Trailing

Vertical Alignment

The vertical alignment of the button's contents (text and/or image)

Scripting name

verticalAlignment

Data type

int

Values

1

Top

0

Center

3

Bottom

Vertical Text Position

The vertical position of the button's text relative to its image

Scripting name

verticalTextPosition

Data type

int

Flags

expert

Values

1

Top

0

Center

3

Bottom

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
mouseMotion
focus
action
propertyChange
key

 

Scripting Functions

This component has no special scripting functions.