Concept Flow - Simple conveyor belt control
Start
Check Start Button
Yes|No
Stop Conveyor
Turn Conveyor ON
Check Stop Button
Yes|No
Turn Conveyor OFF
End
The conveyor starts when the start button is pressed and stops when the stop button is pressed.
IF StartButton THEN Conveyor := TRUE; ELSIF StopButton THEN Conveyor := FALSE; END_IF;
| Step | StartButton | StopButton | Condition Evaluated | Conveyor State | Action Taken |
|---|---|---|---|---|---|
| 1 | FALSE | FALSE | StartButton = FALSE | OFF | No action, conveyor remains OFF |
| 2 | TRUE | FALSE | StartButton = TRUE | ON | Conveyor turned ON |
| 3 | TRUE | FALSE | StartButton = TRUE | ON | Conveyor remains ON |
| 4 | FALSE | FALSE | StartButton = FALSE | ON | No stop pressed, conveyor remains ON |
| 5 | FALSE | TRUE | StopButton = TRUE | OFF | Conveyor turned OFF |
| 6 | FALSE | FALSE | StartButton = FALSE | OFF | No action, conveyor remains OFF |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | After Step 4 | After Step 5 | After Step 6 |
|---|---|---|---|---|---|---|---|
| StartButton | FALSE | FALSE | TRUE | TRUE | FALSE | FALSE | FALSE |
| StopButton | FALSE | FALSE | FALSE | FALSE | FALSE | TRUE | FALSE |
| Conveyor | OFF | OFF | ON | ON | ON | OFF | OFF |
Simple conveyor control: - If StartButton pressed, conveyor ON - Else if StopButton pressed, conveyor OFF - Else conveyor state unchanged Use IF-ELSIF-END_IF structure Checks inputs each cycle to update conveyor
IF StartButton = TRUE THEN Motor := ON; ELSE IF StopButton = TRUE THEN Motor := OFF; END_IF;
IF StartButton = TRUE THEN Motor = ON; ELSE Motor = OFF; END_IF;
Pass the test and this pattern moves unknown