|
<< Click to Display Table of Contents >> Manual > Library Reference > Parts Library > Basic Parts > Button switch 2 |
Button switch 2
|
Button switch 2 is a component for ON/OFF operation using two buttons. 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 input tag (_TagIn) and input tag 2 (_TagIn2). For one-point input, you can specify the tag path in _TagIn only, and for two-point input, you can specify the tag path in _TagIn and _TagIn2. However, for Button Switch 2 parts, it is assumed that the input tag will not normally be used, and that it will be used mainly as a switch function.
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 |
Specifies 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 |
|
Display settings |
caption |
_Caption |
Specify a caption. |
Button 1 |
_Label |
Specifies the label for button 1 (left button). |
|
Button 2 |
_Label2 |
Specifies the label for button 2 (right button). |
|
Display color settings |
Button 1 paint color |
_Btn1FillColor |
Specifies the initial fill color for Button 1 (left button). |
Button 2 paint color |
_Btn2FillColor |
Specifies the initial fill color for Button 2 (right 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 while the input tag value cannot be obtained (for example, immediately after the screen is displayed) or when a fault occurs. |
|
Caption Color |
_CaptionColor |
Specifies the color of the caption. |
|
Button 1 text color |
_Btn1TextColor |
Specify the label color for Button 1. By setting @AutoColor, the text color will be displayed in the most suitable color for the fill color. |
|
Button 2 text color |
_Btn2TextColor |
Specify the label color for Button 2. By setting @AutoColor, the text color will be displayed in the most appropriate 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 Button 2 (ON button) is pressed, _RaiseValue is written to _TagOut. When Button 2 is released, _LowerValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _LowerValue is written to _TagOut. When Button 1 is released, nothing is written. |
2-point output |
•When Button 2 (ON button) is pressed, _RaiseValue is written to _TagOut. When Button 2 is released, _LowerValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _RaiseValue is written to _TagOut2. When Button 1 is released, _LowerValue is written to _TagOut2. |
|
B_SWITCH |
One output |
•When Button 2 (ON button) is pressed, _LowerValue is written to _TagOut. When Button 2 is released, _RaiseValue is written to _TagOut. •When button 1 (OFF button) is pressed, _RaiseValue is written to _TagOut. When button 1 is released, nothing is written. |
2-point output |
•When Button 2 (ON button) is pressed, _LowerValue is written to _TagOut. When Button 2 is released, _RaiseValue is written to _TagOut. •When button 1 (OFF button) is pressed, _LowerValue is written to _TagOut2. When button 2 is released, _RaiseValue is written to _TagOut2. |
|
ON_SWITCH |
One output |
•When Button 2 (ON button) is pressed, _RalseValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _LowerValue is written to _TagOut. |
2-point output |
•When Button 2 (ON button) is pressed, _RalseValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _RaiseValue is written to _TagOut2. |
|
OFF_SWITCH |
One output |
•When Button 2 (ON button) is pressed, _LowerValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _RaiseValue is written to _TagOut. |
2-point output |
•When Button 2 (ON button) is pressed, _LowerValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _LowerValue is written to _TagOut2. |
|
ALTERNATE_SWITCH |
One output |
•When Button 2 (ON button) is pressed, _RalseValue is written to _TagOut. •When Button 1 (OFF button) is pressed, _LowerValue is written to _TagOut. |
2-point output |
•When Button 2 (ON button) is pressed, _RaiseValue is written to _TagOut and _LowerValue is written to _TagOut2. •When Button 1 (OFF button) is pressed, _LowerValue is written to _TagOut and _RaiseValue 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".
|
When Button 2 (ON button) is clicked, it writes the ON value to the output tag. Since no input tag is specified, the display color will not change. |
|
Clicking button 1 (OFF button) writes an OFF value to the output tag. Similarly, the display color does not change. |
|
When the quality flag of the output 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. |
|
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. |
|
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 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.
Below is an example of operation for switch type "ALTERNATE_SWITCH".
|
When you click Button 2 (ON button), the ON value is written to Output Tag 1 and the OFF value is written to Output Tag 2. Since no input tag is specified, the display color will not change. |
|
When you click Button 1 (OFF button), an OFF value is written to Output Tag 2 and an ON value is written to Output Tag 2. Similarly, the display color does not change. |
The behavior in the event of a fault is the same as for 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.
When using as a 1-point input/1-point output lamp/switch, use the ON_SWITCH, OFF_SWITCH, or ALTERNATE_SWITCH switch type. A_SWITCH and B_SWITCH are not suitable for use as lamp displays.
_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".
|
Currently, the input tag is in an OFF state. Now, when you click Button 2 (ON button), the ON value is written to the output tag. |
|
Button 1 (OFF button) is turned off, and Button 2 (ON button) turns ON color. Here, if you click Button 1 (OFF button), the OFF value will be written to the output tag. |
|
Button 2 (ON button) is turned off, and Button 1 (OFF button) turns OFF color. |
|
When the quality flag of the output 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. |
|
If the same tag is used for both input and output, specify the same tag path for the input tag and output tag. |
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.
If you want to use it as a 2-input/2-output lamp/switch, use the ALTERNATE_SWITCH switch type. Other switch types are not suitable for use as lamp displays.
_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 ・・・ALTERNATE_SWITCH
Below is an example of operation for switch type "ALTERNATE_SWITCH".
|
Currently, input tag is OFF and input tag 2 is ON. Now, when you click Button 2 (ON button), the ON value is written to Output Tag 1 and the OFF value is written to Output Tag 2. |
|
Button 1 (OFF button) is turned off, and Button 2 (ON button) turns ON color. Now, if you click Button 1 (OFF button), the OFF value will be written to Output Tag 2 and the ON value will be written to Output Tag 2. |
|
Button 2 (ON button) is turned off, and Button 1 (OFF button) turns OFF color. |
|
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 for a single input.
|
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.
|
If Yes is selected in the dialog, the value will be written to the tag.
|