Build deterministic fault detection, alarm classification, and structured sequence recovery loops in AutomationView.
+-------------------------------------------------------------+
| STRUCTURED FAULT RECOVERY LOOP |
| |
| [Step 20: Station Working] |
| | |
| +----(Timeout TON > 3s)----> [Step 90: Alarm State] |
| | | |
| (bSensor_Reached) | (bBtn_Reset |
| v | AND FaultOK) |
| [Step 21: Next Cycle Step] v |
| [Step 91: Homing/Retry] |
| | |
| +---------------+
+-------------------------------------------------------------+
Every active movement step must run an associated TON timer instruction:
from automation_machine import Sequence, StepType, ActionInstruction
class StationAlarmManagement(Sequence):
def setup(self):
s20 = self.add_step(StepType.INITIAL, name="Clamp_Workpiece")
s21 = self.add_step(name="Machining_Operation")
s_alarm = self.add_step(name="Fault_Clamp_Timeout")
s_retry = self.add_step(name="Retract_And_Retry")
self.add_transition(s20, s21, condition="bClamp_Closed_Sensor")
self.add_transition(s20, s_alarm, condition="tClamp_Watchdog.Q")
self.add_transition(s_alarm, s_retry, condition="bBtn_Ack_Alarms AND bClamp_Pressure_OK")
self.add_transition(s_retry, s20, condition="bClamp_Fully_Opened")
s20.add_action("cmd_Clamp_Valve", "Engage clamp")
s20.add_action("tClamp_Watchdog", "Timeout watchdog", instruction=ActionInstruction.TON, duration=3000)
s_alarm.add_action("bAlarm_Active_Tower", "Flashing red stack light")
s_retry.add_action("cmd_Unclamp_Valve", "Release clamp for retry")
Export numeric alarm words to your PLC and HMI panels:
| Bit Offset | Alarm Tag | Description | Severity |
|---|---|---|---|
| Bit 0 | bAlarm_EStop_Active |
Main emergency stop loop open | Critical (Cat 0 Stop) |
| Bit 1 | bAlarm_Air_Pressure_Low |
Main pneumatic regulator < 5.5 bar | High (Feed Hold) |
| Bit 2 | bAlarm_Feeder_Empty |
Optical sensor magazine empty | Warning (Cycle Finish) |
| Bit 3 | bAlarm_Stn1_Timeout |
Station 1 clamping timeout exceeded | Medium (Station Hold) |