Tag event

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

 

c_event_0006

 

 

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

 

c_event_0050

 

 

hint

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


c_event_0051

 

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"

Value before change

Value after change

event

8

11

Occurs

11

15

Does not occur

15

11

Does not occur

11

8

Does not occur

8

6

Does not occur

6

3

Occurs

3

1

Does not occur

1

11

Occurs

11

1

Occurs

 

■HI_HI/HI/LO/LO_LO conditions


c_event_0052

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"

Value before change

Value after change

event

1

4

Does not occur

4

6

Occurs

6

9

Does not occur

9

11

Does not occur

11

14

Does not occur

14

16

Occurs

16

19

Does not occur

19

21

Occurs

21

24

Does not occur

24

21

Does not occur

21

19

Occurs

19

16

Does not occur

16

14

Does not occur

14

11

Does not occur

11

9

Occurs

9

6

Does not occur

6

4

Occurs

4

1

Does not occur

1

21

Occurs

21

1

Occurs

1

16

Occurs

16

9

Occurs

 

■ Free definition


c_event_0053

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"

Value before change

Value after change

event

0

1

Occurs

1

2

Does not occur

2

3

Occurs

3

4

Does not occur

3

1

Occurs

 

 

hint

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.

 

c_event_0054

 

 

hint

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

 

c_event_0055

 

 

hint

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