Button switch 1

<< Click to Display Table of Contents >>

Manual > Library Reference > Parts Library > Basic Parts >

Button switch 1

Button switch 1

 

parts_buttonswitch1_001

Button switch 1 is a component for ON/OFF operation with a single button.

It also has a lamp function that indicates the current status as a button color, so it can also be used as both a lamp and a switch.

 

 

Specify the output tag in output tag (_TagOut) and output tag 2 (_TagOut2). If you are only outputting one item, you can specify the tag path in _TagOut only. If you are outputting two items, you can specify the tag path in _TagOut and _TagOut2.

To enable the lamp function, specify the tag to be displayed in the input tag (_TagIn) and input tag 2 (_TagIn2). If there is only one input, you can specify the tag path in _TagIn only. If there are two inputs, you can specify the tag path in _TagIn and _TagIn2.

 

In addition, by specifying a tag for fault identification in the fault identification tag (_TagFault) separate from the input tag, a fault can be displayed based on signals such as equipment abnormalities received from downstream.

 

 

Custom Properties

 

Tag configuration

Input Tags

_TagIn

Specify the tag path of the input tag.


Input Tag 2

_TagIn2

Specify the tag path of input tag 2. Used only for two-point input.


Output Tags

_TagOut

Specifies the tag path of the output tag.


Output Tag 2

_TagOut2

Specifies the tag path of output tag 2. Used only for two-point output.


Fault Identification Tag

_TagFault

Specifies the tag path of the fault identification tag.

Value/Switch Setting

ON value

_RaiseValue

Set the value that is considered to be ON. True is set by default (same as "1"). You can also set a value other than True according to the meaning of ON/OFF of the target signal. The value of this property will also be used for the ON value written to the tag by switch operation.


OFF value

_LowerValue

Set the value to be considered as OFF. False is set by default (equals "0"). You can also set a value other than False according to the meaning of ON/OFF of the target signal. The value of this property will also be used for the OFF value written to the tag by switch operation.


Detection Latency

_DiscrepancyTimeout

In the case of two-point input, if the input values of _TagIn and _TagIn2 remain in an inconsistent state for the period of time (milliseconds) specified here, the value will be displayed in the abnormal color (_AbnormalColor) (an inconsistent state would be, for example, if both _TagIn and _TagIn2 are True).


Switch Type

_SwitchType

Select the switch type.

•A_SWITCH ・・・ON while pressed, OFF when released

•B_SWITCH ・・・OFF while pressed, ON when released

•ON_SWITCH ... Press to turn on output (OFF no output)

•OFF_SWITCH ... Press to turn OFF output (no ON output)

•ALTERNATE_SWITCH ... Each time you press it, the output switches between ON/OFF

 

*If the switch type is ALTERNATE_SWITCH, the input tag must be specified.

 

Display settings

caption

_Caption

Specify a caption.


button

_Label

Specifies the label of the button.

Display color settings

Button fill color

_BtnFillColor

Specifies the initial display color of the button.


ON color

_LampOnColor

Specifies the ON display color of the lamp.


OFF color

_LampOffColor

Specifies the OFF display color of the lamp.


Abnormal color

_LampAbnormalColor

Specifies the display color when an abnormal value is detected. This will be the display color when an abnormal value is detected in the input value (inconsistent input value).


NULL color

_LampNullColor

Specifies the NULL display color. The NULL color is the lamp display color when a value cannot be obtained from an input tag (for example, immediately after the screen is displayed) or when a fault occurs.


Caption Color

_CaptionColor

Specifies the color of the caption.


Button text color

_BtnTextColor

Specify the color of the button label. By setting @AutoColor, the text color will be displayed in the most suitable color for the fill color.


Background Panel

_BackPanelColor

Specifies the color of the background panel.

Input assistance settings

Confirmation screen display

_IsConfirm

If enabled, a confirmation dialog will be displayed during operation. Note that if the switch type is A_SWITCH or B_SWITCH, the confirmation screen will not be displayed even if this property is enabled.


Confirmation message

_ConfirmMsg

Specify the confirmation message to be displayed on the confirmation screen.


Error Message

_ErrorMsg

Specifies the error message to be sent when a write error occurs.


Operation history output

_Log

If enabled, the operation history will be output when a value is written. If you want to output the operation history in a standard project that uses the standard framework, enable the operation history setting from the system administration settings screen. For details, see "Operation History Settings". If you want to output the operation history in an original project that does not use the standard framework, define Alarm server to record the operation history and set the root DefaultFireAlarm property appropriately.


Operation Message

_LogMsg

Specify the message to be output to the operation history.

 

 

Switch Type and Output Value

The output values for the output tags for each switch type are as follows:

 

Switch Type

Output tag count

specification

A_SWITCH

One output

•When the switch is pressed, write _RalseValue to _TagOut.

•When the switch is released, write _LowerValue to _TagOut.


2-point output

•When the switch is pressed, write _RalseValue to _TagOut and _LowerValue to _TagOut2.

•When the switch is released, write _LowerValue to _TagOut and _RaiseValue to _TagOut2.

B_SWITCH

One output

•When the switch is pressed, write _LowerValue to _TagOut.

•When the switch is released, write _RaiseValue to _TagOut.


2-point output

•When the switch is pressed, write _LowerValue to _TagOut and _RaiseValue to _TagOut2.

•When the switch is released, write _RaiseValue to _TagOut and _LowerValue to _TagOut2.

ON_SWITCH

One output

•When the switch is pressed, _RalseValue is written to _TagOut.

 


2-point output

•When the switch is pressed, _RalseValue is written to _TagOut and _LowerValue is written to _TagOut2.

 

OFF_SWITCH

One output

•When the switch is pressed, _LowerValue is written to _TagOut.

 


2-point output

•When the switch is pressed, _LowerValue is written to _TagOut and _RaiseValue is written to _TagOut2.

 

ALTERNATE_SWITCH

One output

•When the switch is pressed, the inverted value of the input tag is written. When the input tag is ON, _LowerValue is written to _TagOut, and when the input tag is OFF, _RaiseValue is written to _TagOut.


2-point output

•When the switch is pressed, the inverted value of the input tag is written. When the input tag is ON, _LowerValue is written to _TagOut and _RaiseValue is written to _TagOut2. When the input tag is OFF, _RaiseValue is written to _TagOut and _LowerValue is written to _TagOut2.

 

 

Usage Example

 

1) No input/1 output

 

If you specify an output tag, it will operate as a single-output switch. The switch operation will follow the switch type (_SwitchType) setting.

 

_TagIn: Unused

_TagIn2: Unused

_TagOut: Specify the tag path of the output tag.

_TagOut2: Unused

_TagFault...optional

_SwitchType: Select the switch type according to your purpose.

 

The following is an example of operation when the switch type is "ON_SWITCH".

 

parts_buttonswitch1_002

Clicking the button writes an ON value to the output tag.

Since no input tag is specified, the display color will not change.

 

parts_buttonswitch1_003

When the quality flag of the fault tag is BAD or the fault identification tag is True, a fault is displayed.

When a fault occurs, the yellow frame will flash and button operations will be disabled.

 

 

hint

As a specification of Button Switch 1, if the switch type is A_SWITCH, B_SWITCH, ON_SWITCH, or OFF_SWITCH, it will function just as a switch even if you do not specify an input tag. On the other hand, for ALTERNATE_SWITCH, it is necessary to specify an input tag (because the input tag value is inverted and output). If ALTERNATE_SWITCH is selected without specifying an input tag, the behavior of the output value is not guaranteed.

 

hint

If you omit the input tag, specify the fault identification tag if you want a communication abnormality to be a fault state. If you omit both the input tag and the fault identification tag, the communication abnormality (BAD quality flag) cannot be obtained, so no fault will be displayed.

 

hint

By setting the "FocusHover" property of the form to which the component is attached to True, a focus frame will be displayed when you move the mouse cursor over the component to be operated.

 

 

2) No input/2-point output

 

If you specify tags for both the output tag and output tag 2, it will function as a two-output switch. The switch behavior will follow the switch type (_SwitchType) setting.

 

_TagIn: Unused

_TagIn2: Unused

_TagOut: Specify the tag path of the output tag.

_TagOut2: Specify the tag path of output tag 2

_TagFault...optional

_SwitchType: Select the switch type according to your purpose.

 

The following is an example of operation when the switch type is "ON_SWITCH".

 

parts_buttonswitch1_002

Clicking the button writes the ON value to Output Tag 1 and the OFF value to Output Tag 2.

Since no input tag is specified, the display color will not change.

 

The behavior in the event of a fault is the same as in the case of a single input.

 

 

3) 1 point input/1 point output

 

When an input tag is specified, it acts as both a lamp and a switch. The ON/OFF state is identified by only one tag. The lamp displays ON when the value of the input tag (_TagIn) is the ON value (_RaiseValue), and OFF when the value of the input tag (_TagIn) is the OFF value (_LowerValue). The switch behavior follows the switch type (_SwitchType) setting.

 

_TagIn: Specify the tag path of the input tag

_TagIn2: Unused

_TagOut: Specify the tag path of the output tag.

_TagOut2: Unused

_TagFault...optional

_SwitchType: Select the switch type according to your purpose.

 

Below is an example of operation for switch type "ALTERNATE_SWITCH".

 

parts_buttonswitch1_004

This is the initial state. The button color changes depending on the input tag value.

By clicking the button, the inverted ON value/OFF value of the input tag is written to the output tag.

The currently set value on the left is OFF, so the ON value will be written.

 

parts_buttonswitch1_005

As a result of the ON value being written to the output tag, the input tag became the ON value and the lamp display turned ON color.

 

 

parts_buttonswitch1_003

When the quality flag of the input tag is BAD or the fault identification tag is True, a fault is displayed.

When a fault occurs, the yellow frame will flash and button operations will be disabled.

 

 

hint

If the same tag is used for both input and output, specify the same tag path for the input tag and output tag.

 

hint

As a specification of Button Switch 1, when the switch type is ALTERNATE_SWITCH, it is necessary to specify an input tag, but by setting the input tag, the lamp display is enabled, so the button color will change according to ON/OFF. If you want to use ALTERNATE_SWITCH but do not want the lamp display (for example, if you only want to invert the ON/OFF value), you can do so by setting the same color to the ON color (_LampOnColor) and ON color (_LampOnColor).

 

 

4) 2-point input/2-point output

 

If you specify an input tag and input tag 2, it will function as a two-point input lamp and switch. The two tags identify the ON/OFF state, and when the input tag value is the ON value (_RaiseValue) and the input tag 2 value is the OFF value (_LowerValue), the lamp will display "ON," and when the input tag value is the OFF value (_LowerValue) and the input tag 2 value is the ON value (_RaiseValue), the lamp will display "OFF." The switch behavior follows the switch type (_SwitchType) setting.

 

_TagIn: Specify the tag path of the input tag

_TagIn2: Specify the tag path of input tag 2

_TagOut: Specify the tag path of the output tag.

_TagOut2: Specify the tag path of output tag 2

_TagFault...optional

_SwitchType: Select the switch type according to your purpose.

 

Below is an example of operation for switch type "ALTERNATE_SWITCH".

 

parts_buttonswitch1_004

By clicking the button, the inverted ON value/OFF value of the input tag is written to the output tag and output tag 2.

The above is an OFF value, so the ON value is written to output tag and the OFF value is written to output tag 2.

 

parts_buttonswitch1_005

The ON value was written to the output tag and the OFF value was written to output tag 2, causing the lamp display to turn ON.

 

 

parts_buttonswitch1_004

If you click it again, the OFF value is written to the output tag and the ON value is written to output tag 2, and the lamp display turns OFF.

 

parts_buttonswitch1_006

If the value of the Input Tag and Input Tag 2 remain inconsistent for the detection wait time (for example, when both Input Tag and Input Tag 2 are False), the lamp display will turn to the abnormality color (the fill will flash yellow by default).

 

The behavior in the event of a fault is the same as in the case of a single input.

 

hint

In the case of one-point input, if the value of the input tag is different from either the ON value or the OFF value, the lamp display will change to the abnormal display color. In this case, the detection wait time is not applied and the display color will change immediately.

 

 

5) Confirmation screen display

 

If you enable the confirmation screen display (_IsConfirm), a confirmation dialog (Yes/No) will be displayed when you perform a write operation.

 

parts_dialog_confirm_001

If Yes is selected in the dialog, the value will be written to the tag.