<< Click to Display Table of Contents >> Manual > Server Creation Guide > Events > Application of Events > The event is enabled only while the bit is ON. |
overview
This section explains how to enable an event only while the bit signal is ON.
As an example, we will enable event "E02" while "U01.F01.T01" is ON.
Download the sample
The creation examples shown on this page are provided with samples.
The sample can be downloaded from below.
Configuration file: event_sample01.txt
Setting contents
Tag configuration
Set the bit tag that will trigger the event to be enabled or disabled.
Here, set it to "U01.F01.T01".
Action Settings
Add script Ver1 action "A01".
The script describes the following processes:
//Event/E02!Enable = U01.F01.T01 |
Event Settings
Add Tag event "E01" and Periodic event "E02".
E01:
•Tag "U01.F01.T01"
•Comparison condition "Tag value changed"
•Execution action "A01"
E02:
This is the event that will be the target of the switch.
Check "Disable" to disable the initial state.
Commentary
When you run this sample, the following will happen:
▪When bit is ON
1.When U01.F01.T01 becomes TRUE, Tag event "E01" occurs and script Ver1 action "A01" is executed.
2.In "A01", the formula "//Event/E02!Enable = U01.F01.T01" is executed, and the event "E02" is enabled.
▪When bit is OFF
1.When U01.F01.T01 becomes FALSE, Tag event "E01" occurs and script Ver1 action "A01" is executed.
2.In "A01", the formula "//Event/E02!Enable = U01.F01.T01" is executed, and the event "E02" is disabled.