Manual/Auto Motor
medium
Controls one motor in manual or automatic mode with stop priority and a resettable fault latch.
What it teaches
Builds on Start/Stop Motor by adding mode selection, an automatic run command, and a resettable fault interlock. A Start press made in Auto must not start Manual later.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Start | BOOL | — | Manual Start push button |
| In_Stop | BOOL | — | Stop command; 1 stops the motor |
| In_AutoMode | BOOL | — | 0 selects Manual; 1 selects Auto |
| In_AutoCommand | BOOL | — | Run command from the automatic sequence |
| In_Fault | BOOL | — | Active motor fault |
| In_Reset | BOOL | — | Clears the fault latch after In_Fault is off |
| Out_Run | BOOL | — | Run command sent to the motor |
| Sts_Faulted | BOOL | — | 1 while a motor fault is latched |
Required behavior
- In_Fault latches Sts_Faulted at 1. In_Reset clears it only after In_Fault is 0; an active fault wins over Reset.
- While Sts_Faulted or In_Stop is 1, Out_Run is 0 in both modes.
- In Manual mode, a new Start press seals Out_Run on until Stop, Auto mode, or a fault breaks the seal.
- In Auto mode, Out_Run follows In_AutoCommand when no stop or fault is active.
- Returning to Manual never reuses a Start press made in Auto. The button must be released and pressed again.