Step 4: Create an event

<< 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:

 

Creating Periodic event

Creating Scheduled event

Creating Tag event

 

 

Creating Periodic event

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".
 
c_event_0021
 
 

hint

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"
 
c_event_0022
 

 

3.On the Periodic event tab, make sure 1 second is set.
 
The default setting is "1 second."
 
c_event_0023

 

4.Add "A01" in the Execution Action tab
 
This setting will cause the A01 action to be called every time the E01 event occurs.
 
c_event_0025

 

5.Go online (monitor)
 
Check the operation of the event. Click the icon below from FA-Server to go online.
 
c_tag_0133

 

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.
c_event_0024
 
■ 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.
c_event_0026
 
■ 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.
c_event_0027

 

7.Go offline
 
Once you've finished checking, please put FA-Server back offline.
 
c_tag_0131

 

 

hint

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.

 

 

Creating Scheduled event

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.
 
c_event_0021
 
 

hint

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.
 
c_event_0022
 

 

3.Set the following in the Scheduled event tab
 
c_event_0028
 
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.
 
c_event_0025

 

5.Put FA-Server online (monitor)
 
c_tag_0133
 
 

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.
c_event_0024
 
■ Select "Action" in the tree selection view
 
The event "E01" executes an action, and the "Completed/Requested" count of the action "A01" increases.
c_event_0026
 
■ Select "U01/F01" in the tree selection view
 
The action "A01" executes the script, and the current value is incremented each time.
c_event_0027

 

7.Go offline
 
Once you've finished checking, please put FA-Server back offline.
 
c_tag_0131
 

 

Creating Tag event

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.
 
c_event_0010

 
 

2.Right-click "T02" from the list on the left side of the screen and select "Properties"
 
c_event_0029

 

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)).
 
c_event_0030
 

 

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.
 
c_event_0021
 
 

hint

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.
 
c_event_0022

 

6.Set the following in the Tag event tab
 
With this setting, an event will occur when "U01.F01.T02" becomes TRUE (ON).
 
c_event_0031

 
 

7.Add "A01" in the Execution Action tab
 
This setting causes the A01 action to be called every time the E01 event occurs.
 
c_event_0025

 
 

8.Put online (monitor)
 
c_tag_0133

 

9.Enter "U01.F01.T02" into the tag monitor
 
The Value column displays "FALSE".
c_event_0032
 

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.
 
c_event_0033

 

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).
c_event_0034
 
■ Select "Action" from the tree on the left
 
The event "E01" executes an action, and the "Completed/Requested" count of the action "A01" increases.
c_event_0035
 
■ Select "U01/F01" in the left tree
 
Action "A01" executes the script, incrementing the current value each time.
c_event_0036

 

12.Go offline
 
Once you've finished checking, please put FA-Server back offline.
 
c_tag_0131