Basic
20 min

Pick and Place PLC Program & Ladder Diagram (Run It Free Online)

This page walks through a complete pick and place PLC program — the step-by-step motion sequence that drives a 2-axis vacuum pick-and-place unit from home, down to pick a part, across to a drop zone, and back. Every rung described here maps to a live Pick and Place scenario you can run directly in your browser. Build the ladder diagram as a step sequencer, press Run, and a simulated X/Z gantry executes the cycle while an auto-grader checks each motion against its limit switches — no robot, no PLC hardware, and no software install required.

pick-and-placevacuumsequencingrobot
Pick and Place (Vacuum) scenario preview

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in

Briefing

A 2-axis (X/Z) vacuum pick-and-place unit. Starting at the home position, the sequence waits for a part, descends to pick height, activates the vacuum gripper, ascends, traverses to the drop zone, descends to drop height, releases vacuum, ascends, and returns home. VACUUM_OK confirms grip before the upward travel begins.

Objectives

  • Z descends when PART_AT_PICK is detected and the system is at HOME
  • VACUUM activates at PICK_LS and VACUUM_OK must confirm before Z rises
  • X_ACTUATOR traverses after ascending to HOME_LS
  • Z descends to DROP_LS, VACUUM de-activates, Z ascends and X returns home
  • CYCLE_COMPLETE_LAMP pulses for one scan at end of cycle

Hints

  • Use a step variable: 0=HOME, 1=Z_DOWN_PICK, 2=VAC_ON_WAIT, 3=Z_UP_AFTER_PICK, 4=X_TRAVERSE, 5=Z_DOWN_DROP, 6=VAC_OFF_WAIT, 7=Z_UP_RETURN, 8=X_RETURN
  • Z_ACTUATOR low = extend (down), high = retract (up). Use limit switches to confirm travel.
  • TON of 200ms for vacuum settle before sensing VACUUM_OK
  • CYCLE_COMPLETE_LAMP := (step = 8 AND HOME_LS)

I/O Table

Inputs

PART_AT_PICK

Part present at pick station photoeye

BOOL · %I0.0

DROP_CLEAR

Drop zone clear sensor

BOOL · %I0.1

VACUUM_OK

Vacuum level OK (part gripped)

BOOL · %I0.2

HOME_LS

X and Z at home position

BOOL · %I0.3

PICK_LS

Z at pick (down) position

BOOL · %I0.4

DROP_LS

Z at drop (down) position

BOOL · %I0.5

START_PB

Start push-button

BOOL · %I0.6

STOP_PB

Stop push-button

BOOL · %I0.7

Outputs

X_ACTUATOR

X-axis extend (traverse to drop)

BOOL · %Q0.0

Z_ACTUATOR

Z-axis extend (descend)

BOOL · %Q0.1

VACUUM

Vacuum gripper on

BOOL · %Q0.2

CYCLE_COMPLETE_LAMP

Cycle complete indicator

BOOL · %Q0.3

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1Z descends on PART_AT_PICK when running at HOME

    Pressing START then presenting a part triggers Z descent

  2. #2VACUUM activates at PICK_LS

    When Z reaches PICK_LS the vacuum turns on

  3. #3Physics drives a complete pick-and-place cycle

    Physics simulates all limit switches; CYCLE_COMPLETE_LAMP asserts at end

How a pick and place PLC program works

A pick-and-place machine performs the same fixed motion cycle over and over: wait for a part, descend, grip, lift, traverse, descend, release, lift, return. Because the order never changes and each move must finish before the next begins, the natural way to write a pick and place robot PLC programming solution is a step sequencer — a chain of states that advances one move at a time, each transition confirmed by a limit switch rather than a guessed delay.

The Pick and Place scenario controls a 2-axis (X/Z) vacuum unit with eight inputs and four outputs, all pre-wired for you. The inputs are PART_AT_PICK (%I0.0, part-present photoeye at the pick station), DROP_CLEAR (%I0.1, drop-zone clear sensor), VACUUM_OK (%I0.2, vacuum-level-OK / part-gripped confirmation), HOME_LS (%I0.3, X and Z at home), PICK_LS (%I0.4, Z at the down/pick position), DROP_LS (%I0.5, Z at the down/drop position), START_PB (%I0.6) and STOP_PB (%I0.7).

The outputs are X_ACTUATOR (%Q0.0, X-axis extend / traverse to drop), Z_ACTUATOR (%Q0.1, Z-axis extend / descend), VACUUM (%Q0.2, vacuum gripper on) and CYCLE_COMPLETE_LAMP (%Q0.3, cycle-complete indicator). Note the Z convention: extending Z_ACTUATOR drives the head down, and retracting it lets the head rise — so 'Z down' means the output is energised and the head travels until PICK_LS or DROP_LS confirms it has arrived. This pneumatic pick and place PLC behaviour, where solenoid-driven actuators extend and retract between hard limit switches, is exactly how a real two-axis cell is wired.

The pick and place sequence — eight steps confirmed by limit switches

The motion cycle is an 8-step sequencer. A RUN_BIT latches on START_PB while HOME_LS is true and unlatches on STOP_PB. While RUN_BIT is set and the head is home with a part waiting (PART_AT_PICK) and the drop zone clear (DROP_CLEAR), the sequence kicks off. The steps are: S1 Z-down-to-pick, S2 vacuum-on-and-settle, S3 Z-up-after-pick, S4 X-traverse, S5 Z-down-to-drop, S6 vacuum-off-and-settle, S7 Z-up-return, S8 X-return-home.

Each step is a SET/RESET latch and each transition is gated by the limit switch that proves the move finished. S1→S2 waits for PICK_LS (Z has reached pick height). S3→S4 waits for HOME_LS (Z back up). S4→S5 waits for DROP_LS. S5→S6 waits for DROP_LS at drop height. S7→S8 waits for both PICK_LS and DROP_LS to be clear (the head has lifted past both). S8 completes when HOME_LS returns. This is the heart of a robust pick and place sequence PLC design: never advance on a timer when a sensor can confirm the real position. Energising a timed delay instead would race the mechanics and drop parts on a slow or loaded axis.

The output coils are driven by ORing the steps in which each actuator should be active. Z_ACTUATOR is energised during S1, S2, S5 and S6 (the head is at or moving to a down position). X_ACTUATOR is energised during S4, S5, S6 and S7 (extended toward the drop side). VACUUM is held on across S2, S3, S4 and S5 — from the moment of grip, through the lift and traverse, until the head is down at the drop. Reading the actuator state straight off the step bits keeps the pick and place PLC ladder diagram easy to trace.

Vacuum grip confirmation and the settle timers

Gripping is the step where a naive sequencer fails. When the head reaches PICK_LS the program enters the vacuum-on step and energises VACUUM, but it must not lift until the part is actually held. Two conditions gate the S2→S3 transition: VACUUM_OK, the vacuum-level feedback confirming a part is gripped, AND a 200 ms settle timer. The settle timer is a TON (T_VAC_ON) with a 200 ms preset driven by the vacuum-on step; its .Q output ensures the vacuum has had time to pull down before the feedback is trusted. Only when both VACUUM_OK is true and the timer has elapsed does the head ascend. This is the objective that VACUUM_OK must confirm grip before the upward travel begins — the difference between picking a part and dropping it.

Releasing mirrors this. At the drop position the program enters the vacuum-off step and de-energises VACUUM. A second 200 ms TON (T_VAC_OFF) driven by that step, combined with VACUUM_OK going false, gates the S6→S7 transition — so the head waits for the vacuum to actually bleed off and confirm the part has been released before it lifts away. Releasing too early would lift a still-gripped part back out of the drop zone.

These two short timers are the only time-based elements in the whole program; every other transition is position-confirmed by a limit switch. That mix — sensors for motion, brief timers only for the physical settle of vacuum pressure — is the pattern that makes pneumatic pick and place PLC sequences reliable in the real world.

Running and auto-grading the pick and place cell in your browser

The Pick and Place scenario runs entirely in the browser — no robot, no PLC, no vendor software. You build the ladder diagram, press Run, and a physics model drives the simulated X/Z gantry, firing HOME_LS, PICK_LS and DROP_LS as the actuators reach each position and toggling VACUUM_OK as the gripper picks and releases.

Three auto-grader test cases check the program against the real specification. 'start-from-home' presses START, presents a part with the drop zone clear, and asserts Z_ACTUATOR energises so the head descends. 'vacuum-on-at-pick-ls' drives the head down, trips PICK_LS, and asserts VACUUM turns on at the pick position. 'full-cycle' lets the physics model drive every limit switch through a complete cycle and asserts CYCLE_COMPLETE_LAMP comes on at the end — the proof that all eight steps sequenced correctly, the grip and release confirmed, and the head returned home.

Because the grader watches the real outputs as the simulated mechanics move, it catches the classic pick-and-place mistakes: advancing a step before its limit switch confirms, lifting before VACUUM_OK proves a grip, or holding the vacuum on through the release. That tight feedback loop makes this a practical way to learn pick and place robot PLC programming — and the underlying step-sequencer pattern transfers directly to indexing tables, gantries, and any cyclic machine — without a cell on the bench.

Frequently asked questions

How do you write a pick and place PLC program?

Use a step sequencer. Define one latched step per move in the cycle — Z-down-to-pick, vacuum-on, Z-up, X-traverse, Z-down-to-drop, vacuum-off, Z-up, X-return — and advance from each step to the next only when the limit switch that proves the move finished is true. Drive each output by ORing the steps in which it should be active: Z_ACTUATOR during the down steps, X_ACTUATOR during the traverse steps, VACUUM held from grip through to release. Confirming every move with a sensor rather than a timer is what makes the pick and place sequence PLC logic reliable.

What I/O does the pick and place scenario use?

Eight inputs and four outputs, all pre-wired. Inputs: PART_AT_PICK (%I0.0), DROP_CLEAR (%I0.1), VACUUM_OK (%I0.2), HOME_LS (%I0.3), PICK_LS (%I0.4), DROP_LS (%I0.5), START_PB (%I0.6) and STOP_PB (%I0.7). Outputs: X_ACTUATOR (%Q0.0, traverse to drop), Z_ACTUATOR (%Q0.1, descend), VACUUM (%Q0.2, gripper on) and CYCLE_COMPLETE_LAMP (%Q0.3). Energising Z_ACTUATOR drives the head down; releasing it lets the head rise.

How does the vacuum gripper confirm it has picked the part?

When the head reaches PICK_LS the program turns VACUUM on and enters the vacuum-on step, but it does not lift immediately. The transition to the lift step is gated by VACUUM_OK — the vacuum-level feedback that confirms a part is gripped — AND a 200 ms settle timer (a TON) that gives the vacuum time to pull down. Only when both the feedback is true and the timer has elapsed does the head ascend, which prevents lifting before the part is actually held in this pick and place sequence PLC design.

Why use limit switches instead of timers in a pick and place sequence?

In a pick and place PLC ladder diagram, each step advances only when the limit switch proving the move finished is true — PICK_LS for the pick descent, HOME_LS for the lift, DROP_LS for the traverse and drop. Sensor confirmation means the sequence works regardless of how fast or slow an axis actually moves, whereas a fixed timer would race the mechanics and could advance before the head arrives — dropping or crushing parts on a loaded or slow axis. Brief timers are used only for the physical settle of vacuum pressure on grip and release.

Can I simulate a pneumatic pick and place PLC program without hardware?

Yes. The Pick and Place scenario runs entirely in your browser. You build the ladder diagram, press Run, and a physics model drives a simulated X/Z gantry — firing HOME_LS, PICK_LS and DROP_LS as the actuators reach each position and toggling VACUUM_OK as the gripper picks and releases. Three auto-grader test cases then check the descent, the vacuum activation at PICK_LS, and a full cycle ending with CYCLE_COMPLETE_LAMP, so you can learn pneumatic pick and place PLC programming without a robot, a PLC, or any installed software.

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in