<< Click to Display Table of Contents >> Manual > Server Creation Guide > Events > Event Creation Procedure > Step 4: Create an event |
overview
Create Periodic event, Scheduled event, and Tag event according to your needs and define the action call.
This section explains how to create each of the following events:
Set Periodic event and call the "Script Ver1" action (A01) that you created in advance.
1.Right-click on "Event" in the tree on the left and select "Add" and "Periodic event".
This will add an event called "E01".
Event names such as "E01" can be freely changed. Event names can be changed from the "Properties" screen. For information on characters that cannot be used in naming events, please refer to "Naming Rules". |
2.Right-click "E01" from the list and select "Properties"
3.On the Periodic event tab, make sure 1 second is set.
The default setting is "1 second."
4.Add "A01" in the Execution Action tab
This setting will cause the A01 action to be called every time the E01 event occurs.
5.Go online (monitor)
Check the operation of the event. Click the icon below from FA-Server to go online.
6.Check the following three places
■ Select "Event" in the tree selection view
The lamp for event "E01" turns green and the count increases every second. This means that the event is occurring every second.
■ Select "Action" in the tree selection view
The number of "Completed/Requested" for action "A01" increases every second. This means that the action is executed due to an event that occurs every second.
■ Select "U01/F01" in the left tree
The value of the
tag "T01" changes every second. This means that the script in action "A01" executes "U01.F01.T01 = U01.F01.T01 + 1" and the current value is incremented each time.
7.Go offline
Once you've finished checking, please put FA-Server back offline.
Setting it to "0" ms on the Periodic event tab will cause the event to occur as frequently as possible. This will give the fastest processing speed, but it may result in a high CPU load. In such cases, adjust the cycle to around 10ms to 100ms, and balance the CPU load and the process execution cycle. |
Set Scheduled event and call the "Script Ver1" action (A01) that you created in advance.
1.Adding Scheduled event
From the tree selection view of
FA-Server, right-click on "Event" and select "Add" "Scheduled event".
Then, a new "E01" will be created.
Event names such as "E01" can be freely changed. Event names can be changed from the "Properties" screen. For information on characters that cannot be used in naming events, please refer to "Naming Rules". |
2.Right-click "E01" from the list and select "Properties" to display the properties dialog.
3.Set the following in the Scheduled event tab
Check every year/month/day/hour/minute
- Occurs in 30 seconds
4.Add "A01" in the Execution Action tab
This setting causes the A01 action to be called every time the E01 event occurs.
5.Put FA-Server online (monitor)
6.Check the following three places
■ Select "Event" in the tree selection view
The lamp for event "E01" turns green, and the count increases every 30 seconds. This means that an action is being executed due to the event that occurs every 30 seconds of the minute.
■ Select "Action" in the tree selection view
The event "E01" executes an action, and the "Completed/Requested" count of the action "A01" increases.
■ Select "U01/F01" in the tree selection view
The action "A01" executes the script, and the current value is incremented each time.
7.Go offline
Once you've finished checking, please put FA-Server back offline.
Set Tag event and call the "Script Ver1" action (A01) that you created in advance.
1.Add a new tag "T02"
Right-click on "F01" and select "Add Tag" to add a new "T02" tag.
2.Right-click "T02" from the list on the left side of the screen and select "Properties"
3.Set the properties of T02
From the "Address Setting" tab, select "04 - M Internal Relay" and click "OK". With this setting, the T02 tag is set as a bit tag (M0000 (Bit Register)).
4.Right-click on "Event" in the tree on the left side of the screen and select "Add" and "Tag event".
Then, a new E01 will be added.
Event names such as "E01" can be freely changed. Event names can be changed from the "Properties" screen. For information on characters that cannot be used in naming events, please refer to "Naming Rules". |
5.Right-click "E01" from the list and select "Properties" to display the properties dialog.
6.Set the following in the Tag event tab
With this setting, an event will occur when "U01.F01.T02" becomes TRUE (ON).
7.Add "A01" in the Execution Action tab
This setting causes the A01 action to be called every time the E01 event occurs.
8.Put online (monitor)
9.Enter "U01.F01.T02" into the tag monitor
The
Value column displays "FALSE".
10.Manipulate the value of the "U01.F01.T02" tag and repeatedly write "TRUE" and "FALSE" to the cells in the "Value" column that confirms the event.
11.Please check the following three points.
■ Select "Event" in the left tree
The lamp for event "E01" turns green, and the count increases each time "U01.F01.T02" becomes TRUE (the event is executed due to a change in the tag value).
■ Select "Action" from the tree on the left
The event "E01" executes an action, and the "Completed/Requested" count of the action "A01" increases.
■ Select "U01/F01" in the left tree
Action "A01" executes the script, incrementing the current value each time.
12.Go offline
Once you've finished checking, please put FA-Server back offline.