<< Click to Display Table of Contents >> Manual > Server Creation Guide > Events > Application of Events > Activate an event for a period of time |
overview
This section explains how to set up an event to be valid for a certain period of time.
For example, you can enable an event only from Monday to Friday between 8:00:00 and 17:59:59.
In "sample01" explained above, event "E02" was enabled while U01.F01.T01 was ON.
In this example, we will apply the concept of "sample01" and set it as follows.
Download the sample
The creation examples shown on this page are provided with samples.
The sample can be downloaded from below.
Configuration file: event_sample02.txt
Setting contents
Tag configuration
Set the memory device tag (time bit) "U01.F01.T01" that will be the trigger to enable/disable the event.
Set the time bit tag on the memory device to be ON from 8:00:00 to 17:59:59, Monday through Friday.
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
The time bit tag of a memory device is a bit tag that can be turned ON only at a specific time or for a specific period of time.
In this setting, it is set to ON only from 8:00 to 18:00 from Monday to Friday.
▪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.
For details about memory devices, see "Memory Device" in the Device Connection Guide. |