Is there a way to reset the Control Value on a 2-state button so that a toggle on/off request does not persist? For example, an operator requests a Valve to open but the controller denies this request and the Indicator Value stays 0. The Control Value will persist at 1 until the Indicator Value goes to 1. Is there a way to reset the Control Value after an elapsed period of time if the Indicator Value does not change?
Could use momentary push-buttons for issuing control value requests and a multi-state indicator for the actual indicator value… Unless you need to keep the control value request signal high if successful and only reset on failures. In that case you could use a timer component with an event script to set the control value tag back to the current value.
If you’re able to change the control logic, why not have it reset the requested control value on rejection?
Another strategy useful for ‘mode’ type settings is to have the control logic provide an array or binary enum of ‘acceptable’ or ‘available’ modes. In your HMI you configure components that will only issue writes for those modes.
If you’re able to change the control logic, why not have it reset the requested control value on rejection?
This is exactly what I’m trying to accomplish. My use case:
- User Toggles a Control Value from FALSE to TRUE…
- PLC rejects Control Value request due to Interlock or Alarm
- Indicator Value remains FALSE due to PLC rejection
- Control Value write times-out and goes back to FALSE
In reality 1-3 are happening like above but:
- Control Value continues to write TRUE
- Interlock or Alarm is eventually defeated
- Valve unexpectedly opens because Control Value is still writing TRUE
It sounds like I need the PLC to reset the control value which is definitely possible but will take some time. I was hoping to fix this on the Front End instead.
Hi Jragonesi…
You could create a new scan class (off a copy of the default scan class). The only difference is that you will check the option OPC Read After Write. Assign this new scan class to the OPC tag bound to your toggle. This will immediately issue a read after write to the PLC to confirm what the bit is set to and will change your tag based on that value.
As you were…
Steve
You could set the enable property to the valve permissives to prevent the toggle.
A property change script to monitor when it’s disabled, and set the control value to 0, for a sanity check:
if event.propertyName == 'enabled':
if event.newValue == 0:
event.source.controlValue = 0
That said, it is much better to handle this sort of thing in the PLC.