INCREASE AND STORE VALUE IN EXPRESSION VARIABLE - PG2
Hello there, please, its possible to do something like:
if tag1 then A = A+1 else A ??
I only receive a circular dependencies error, I've tried using many variables but always see them like a circular reference.
what i need to do is a simple integer counter, increasing when an external bit turns on. I have 800xA 5.1. with AC450.
Please your help, thx from Colombia!!!
Voted best answer
Why do you think a PG2 graphic is the right place to do this ?
- What happens when the graphic is not displayed ?
- What happens when two different stations open the graphic at the same time ?
- What is the execution rate of the expression inside the graphic.
if you want to count pulses, do it in the controller where the pulse is generated.
- What happens when the graphic is not displayed ?
- What happens when two different stations open the graphic at the same time ?
- What is the execution rate of the expression inside the graphic.
if you want to count pulses, do it in the controller where the pulse is generated.
Answers
I guess you want to increase the Value A with 1 just once when tag1 gets true (pulse), otherwise your question doesn't make sense.
You can add a "Property Writer" in the Graphic Items of your PG2 Display, and set Trigger = tag1, Value = A+1 and Target = A.
That should then increase by 1 each time the tag1 gets from false -> true.
You can add a "Property Writer" in the Graphic Items of your PG2 Display, and set Trigger = tag1, Value = A+1 and Target = A.
That should then increase by 1 each time the tag1 gets from false -> true.
Add new comment