Equivalent of state retain in PG2 graphics editor to avoid circular dependancy
I have a transmitter with variable ranges. When the current value increases above the initial max value , current value becomes the new max value. But when the value starts decreasing, the new max value is lost. Not able to reference a variable in the calculation of the same expression variable. How can this be achieved? Expression for NewMaxValue: If CurrentValue > InitialMaxValue then CurrentValue Else if CurrentValue>NewMaxValue then CurrentValue else NewMaxValue else InitialMaxValue
I think it is not good idea to implement any process or reporting real-time logic inside PG2 graphic. This kind of logic should be implemented in the PLC. Or you can use the power of Data Direct reporting functions in Excel. Likely you don't want to touch running PLC. So you can define Persistent Expression variable with empty expression. Inside PG2 graphic use Property Writer with Event="On Demand" and Trigger=your boolean expression. It will do the trick but remember that particular graphic must be permanently displayed like a fixed graphic in the top Application bar of 800xA Workplace.