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.
Parameters
| Tag | Direction | Type | Default | Description |
|---|---|---|---|---|
| In_Start | Input | BOOL | 0 | Manual Start push button |
| In_Stop | Input | BOOL | 0 | Stop command; 1 stops the motor |
| In_AutoMode | Input | BOOL | 0 | 0 selects Manual; 1 selects Auto |
| In_AutoCommand | Input | BOOL | 0 | Run command from the automatic sequence |
| In_Fault | Input | BOOL | 0 | Active motor fault |
| In_Reset | Input | BOOL | 0 | Clears the fault latch after In_Fault is off |
| Out_Run | Output | BOOL | 0 | Run command sent to the motor |
| Sts_Faulted | Output | BOOL | 0 | 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.