1. What the Program Does
This example generates a short drive-start pulse. Start_Button passes through R_TRIG, then through an interlock based on Drive_Running. A TP timer produces Drive_Start_Pulse.
Use this pattern when an external device requires a brief start signal rather than a continuous command.
Start_Button → R_TRIG → AND → TP → Drive_Start_Pulse2. Example Signals
| Signal | Type | Purpose |
|---|---|---|
| Start_Button | Input | Operator start request |
| Drive_Running | Input | Drive already running |
| R_TRIG | Block | Detects the rising edge of Start_Button |
| NOT | Block | Forms the drive-not-running condition |
| AND | Block | Permits starting only on an edge while not running |
| TP | Block | Holds a short pulse for three scans |
| Drive_Start_Pulse | Output | Drive start pulse |
3. Main Logic
R_TRIG produces TRUE for one scan when Start_Button changes from FALSE to TRUE. Holding the button cannot create repeated edges.
NOT inverts Drive_Running, blocking another start while the drive is running:
Start_Allowed = Rising_Start AND NOT Drive_RunningTP holds its output TRUE for the configured number of scans. Here PT_SCANS = 3.
4. Testing in the Simulator
- Set Start_Button TRUE: Drive_Start_Pulse appears.
- Keep Start_Button TRUE: no new pulse appears without another edge.
- Return Start_Button to FALSE, then TRUE: a new pulse starts.
- Activate Drive_Running and try starting: the new pulse must be blocked.
- Observe successive scans to check TP's pulse duration.
5. What to Watch For
R_TRIG detects the button event; TP determines the output duration. These are separate tasks because an edge detector alone produces TRUE for only one scan.
If Drive_Running arrives with a delay, a real project may need additional interlocks and start-failure monitoring.
Check in editor
Open the ready-made FBD diagram, toggle inputs, and compare the simulation behavior with the program notes. The JSON is also available as a direct download.