Back to examples

Program notes

Drive Start Pulse

A TP timer generates a brief start command and an interlock prevents repeated starts.

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_Pulse

2. Example Signals

SignalTypePurpose
Start_ButtonInputOperator start request
Drive_RunningInputDrive already running
R_TRIGBlockDetects the rising edge of Start_Button
NOTBlockForms the drive-not-running condition
ANDBlockPermits starting only on an edge while not running
TPBlockHolds a short pulse for three scans
Drive_Start_PulseOutputDrive 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_Running

TP 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.