OPC Tag Retrigger

I have an Expression Tag that does a writeback through an OPC tag. Whenever the expression changes state the tag in the PLC gets updated. My problem is that if the PLC gets restarted, then the tag gets cleared and no longer matches the expression. The expression tag does not detect that the PLC is out of sync. Is there a way to retrigger the expression, or some other method to have the PLC always follow the result of the expression?

I had a similar issue but not with Ignition.

Could you explain better what you are trying to read.

For instance I was updating a timer via HMI. But the HMI would not store values. So I had to store the value in the PLC.

The best way would be to write to a separate tag for storing purposes. If the PLC turns off it should not rewrite the tag. so your expression remains true,

Could you post your expression so I can see better.

If you want it to behave like a PLC, you will need to execute like a PLC. PLCs run logic continually. Bring the OPC item to its own tag. Use a timer script to read both, and when different, write the expression result to OPC tag. Use a timer interval that meets your process latency requirements.

The expression is
({[.]…/WTP/STATUS/BOTH_RUNNING} OR {[.]…/WTP/STATUS/MEM_RUNNING} OR {[.]…/WTP/STATUS/TRI_RUNNING}) AND {[.]…/WTP/CHEMICALS/RAW_FLOW_ABOVE_100_GPM}, which is setting a bit in the PLC when the Plant is running and has adequate flow. The bit in the PLC is used to enable a feeder. Problem occurs when PLC is restarted; the bit clears and the feeder stops, but the rest of the plant thinks everything is fine.

I will look into adding the timer script. I was wanting to make sure I didn’t have something wrong with the original method.