About continuous execution
- Last UpdatedJul 19, 2024
- 1 minute read
Feedback processing (when feedbacks are enabled)
-
Get input Boolean values.
-
Map input Boolean values to the corresponding configured state and set PVAuto state.
-
If PVMode==Auto, then PV=PVAuto
-
-
If alarming, then calculate the alarms.
Command processing (when outputs are enabled)
-
If command tracking is enabled, and command tracking input is true:
-
Set Cmd = PV (for PV in Active1, Active2 or Passive states)
-
Set Cmd = Null (for PV in Transition or Fault states)
-
-
Else if Cmd write is pending (due to Cmd write request):
-
Write outputs to the field based on configured output values for state.
-
Remember command request time.
-
Set Cmd write issued flag.
-
-
If PVMode is Simulate, then set PV equal to Cmd after the timeout period (if configured).
-
If PVMode is not Simulate, and command tracking is disabled, then:
-
Detect uncommanded change alarm: PV not equal to Cmd.
-
If Cmd write issued flag is true, detect the command timeout alarm. If PV not equal to Cmd within timeout period.
-
Statistics processing (when statistics are enabled)
-
Calculate the durations for the current time and total time that the discrete device was in the Active1, Active2, and Passive states.
-
If PV has just changed to a new state, increment the counter for the new PV state.
-
Detect the duration alarms for the Active1 state total duration and Active2 state total duration.