# Thread: Delay in reaction matrix

1. Bronze Partner
Join Date
05.08.2013
Posts
15

## Delay in reaction matrix

Hi to all
I have such problem. I have binary variable with rema with 2 states: 0 - normal, 1 - error. All states write in CEL.
Error state have delay of 5 seconds to hide short errors. So if variable will be in error state less than 5 seconds then there is no error entry in CEL. It's a valid.
But when it turns in normal state then normal entry is appeared in CEL.
So if there are some short errors then I will see series of same entries with normal state.
How I can to get out from that normal entries in CEL?
Last edited by andrey_k : 27th October 2016 at 14:52

2. ## Re: Delay in reaction matrix

Your question does not look like Energy-specific topic, rather general...

When both possible values are trigging CEL entry than in reaction matrix it is not possible to "hide" the fact that the value 0 is back.
The simplest solution would be to create additional, internal variable (also BOOL) logged to CEL. And in original reaction matrix - do not write CEL, call instead a zenon functions 'write set value' linked with this internal variable, 'direct to HW' - value 0 or 1.
The function writing 1 will be then called only if error stays long enough, else this additional variable will keep 0, so no new CEL entry by next write 0 (value does not change).

3. User
Join Date
26.10.2016
Posts
5

## Re: Delay in reaction matrix

Originally Posted by ursulak
Your question does not look like Energy-specific topic, rather general...

When both possible values are trigging CEL entry than in reaction matrix it is not possible to "hide" the fact that the value 0 is back.

The simplest solution would be to create additional, internal variable (also BOOL) logged to CEL. And in original reaction matrix - do not write CEL, call instead a zenon functions 'write set value' linked with this internal variable, 'direct to HW' - value 0 or 1.

The function writing 1 will be then called only if error stays long enough, else this additional variable will keep 0, so no new CEL entry by next write 0 (value does not change).

Hi!
I´m having the same problem in my current project and i have implemented your solution.

I have about 600 signals that will work this way, so i need to create 600 additional internal variables and create double amount of functions or is there a simpler way of doing this?

Hope you understand my question.

Best regards
Per

4. ## Re: Delay in reaction matrix

An alternative would be the use zenon Logic to evaluate the values of process variables and - when a Timer is elapsed - change accordingly values of additional stratonNG variables.

If you (re)name the process variables (and stratonNG) variables according some easy syntax, e.g. tag001, tag002 etc., then in Logic you can access all 600 variables in a FOR or WHILE.

In logic you can define a UDFB instantiated then to handle each of 600 process variables separately (for the case that more as 1 alarm happens at the same time). The UDFB can have own Timer (TON, TMU etc.) starting by process variable change and stratonNG variable for result.
In the UDFB you can work with functions:
• XmlGetSybValue and XmlSetSybValue - accessing variable value using a text with the name - to copy value of process variable to the stratonNG variable
• SymbVSIGetDate, *Time and SymbVSISetDate, *Time - to copy the  timestamp of process variable to the stratonNG variable.

#### Posting Rules

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•