<< Click to Display Table of Contents >> Manual > Server Creation Guide > Events > What are events? > Tag event |
Tag event
Tag event is an event that occurs when the tag value is evaluated and the condition is met.
By using Tag event, you can perform actions via tags from various features that can access tags.
Below is an example of how to use Tag event.
▪Execute actions from PLC ladder
You can execute an action from PLC by turning the value of the PLC device you want to use as an event trigger from the ladder and generating an event by evaluating the tag value linked to that device. For example, you can trigger report printing or Send mail from the ladder logic of PLC. In addition, by using system properties, you can also use it to automatically send an email when communication with PLC is lost.
▪Execute actions from other companies' SCADA/VisualBasic/Excel etc.
You can trigger a desired action by updating the tag value from an external application via an interface such as OPC/DDE/IPLink.
▪Run from a script
If you want to execute an action based on the result of a calculation, use a script action (such as SC2).
In addition, the occurrence conditions of Tag event can be set in various ways, as shown below.
Single Condition
If you want to generate an event based on a single condition, such as when a tag value changes, a bit turns ON, or a value becomes 100 or greater, you need to set the following two points.
First, in the "Tag" section, specify the tag that will be used to determine the event using a tag path (e.g., "U01.F01.T01").
Then, specify the condition under which the event should be generated in the "Comparison condition".
If you select "Tag value changes," you do not need to define a comparison value because the event will be triggered every time the tag changes.
If you select other conditions (such as "tag value = comparison value"), set the comparison value.
For bit tags, the comparison value can be set to "TRUE/FALSE" or "1/0".
You can also set the System property such as "U01!Alive" in the tag name. The "Alive" property is useful when you want to generate an event when communication with PLC is no longer possible. |
Multiple Conditions
If you want to add some conditions to the tag value, for example if you want to trigger an event based on a "threshold" such as an upper or lower limit, set it as follows:
■HI/LO conditions |
|||||||||||||||||||||||||||||||
If you want to trigger an event under HI/LO conditions, set the above three points. Be sure to set the comparison value on the HI side to a higher value than the LO side. |
Example: HI "10" LO "5"
|
■HI_HI/HI/LO/LO_LO conditions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you want to trigger an event under the HI_HI/HI/LO/LO_LO conditions, set the above three items. Be sure to increase the comparison value as it goes from LO_LO to HI_HI.
In the example on the right, events occur when the numbers change from 4 to 6 and from 21 to 19. This is not an event occurring in the sense of returning from LOLO (or HIHI), but rather an event indicating that LO occurred after LOLO (or HI occurred after HIHI). Therefore, no event will be generated for a return to normal from LO (or from HI).
|
Example) HIHI "20", HI "15", LO "10", LOLO "5"
|
■ Free definition |
|||||||||||||||||||
When mixing "=", "<>", ">", "<", ">=", and "<=", please write "=" and "<>" on the first line. Also, when it comes to ">", "<", >=", and <=", make sure to define the comparison value in the first row as the largest and the last row as the smallest (in other words, like in "HIHI/HII/LO/LOLO condition", ">" and >=" come first and <" and <=" come later). |
Example) EQ1 "tag value = 1" EQ2 "tag value = 3"
|
If you want to define an event to occur when a tag value falls within a certain range (for example, between 50 and 100) by combining multiple conditions, you can define the event in combination with Script Ver1 Action. |
Ignore the initial state of Tag event
If you check "Ignore initial state", an event will not be generated even if the value immediately after going online meets the condition. With this setting, an event will be generated when the condition is no longer met and is met again.
For example, if the condition is "tag value = comparison value" and the value is "1", no event will occur even if the PLC value is 1 immediately after going online. An event will occur when the value becomes 1 again after it becomes a value other than 1.
"Ignore initial state" also applies to the behavior immediately after setting the event's system property "Enable" to "1." |
Generate Tag event manually
If you check "Manual occurrence", the event will not be generated even if the value meets the condition. However, the value at the time the event was generated will be retained.
This setting is used when you want to manually control the timing of the event occurrence in the script "E01!Fire".
"Manual generation" is mainly used for event-type logs of logger actions, but there may be few situations where it is used for other purposes. For how to log by manually generating events with logger actions, please refer to the description of "Periodically logging in event-type log format" in the logger action. |