Walkthrough: Problem 6: Rotary Table

Difficulty

Target behavior

Rotate the table 90° with a button, stop for 3 seconds, then return it to the original position. Light the Running lamp during operation

What you will learn

  • Step control (managing processes with internal relays)
  • Separating "step transitions" from "outputs"

Problem

Pneumatic actuators can be used not only for straight push/pull motions but also for rotation.

In this model, rotation is controlled with a pneumatic actuator.


Watch the video to see how the rotary motion is achieved.


The type of motion is different, but the control method is the same as the linear air cylinder in Problems 4 and 5.

The rotation is controlled by turning the solenoid valve ON/OFF, and the table position is checked with auto switches.

In this model, turning the solenoid valve coil ON rotates the table by 90°.

Reproduce a motion that rotates 90°, stops for 3 seconds, and returns to the original position. Also, light the Running lamp during the operation.

Target behavior (video)

Approach

Divide the operation into processes (steps): "rotating → stopped after rotation → returning", and use internal relays (MR1 to MR3) to show which step is active. All the following problems are written with this step control.

Process table (steps)

StepDescriptionCondition to advanceMain outputs
MR1RotatingX1 after rotationY0 ON
MR2Stopped after rotationT0 3 s elapsedY0 ON
MR3ReturningX0 before rotationY0 OFF

Based on this approach, try writing the ladder yourself first.
In the simulator, you can create the wiring and ladder and actually run the 3D equipment model.

Try it in the simulator
Show the sample ladder and explanation(click to open)

Devices used

DeviceComment
Inputs
X0Before rotation
X1After rotation
X2Button
Outputs
Y0Rotary table solenoid valve
Y1Running lamp
Internal relays
MR1Rotating
MR2Stopped after rotation
MR3Returning
Timers
T0Dwell time after rotation

Ladder explanation

The row numbers in the figures match the row numbers in the simulator's ladder window.

1Start conditionRows 001–002

On the rising edge of X2 (button), SET MR1 (the first step). There are two conditions:

  • X0: the table is at the before-rotation position
  • MR1 to MR3 are all OFF: it is not already operating (pressing the button during operation is ignored)

2Step transitionsRows 003–009

When "the current step" and "its completion condition" are both satisfied, SET the next step and RES the current step. This is the basic form of step control.

  • Rows 004–005: while rotating, when X1 (after rotation) turns ON, go to stopped
  • Rows 006–007: while stopped, when T0 has counted 3 seconds, go to returning
  • Row 008: while returning, when X0 (before rotation) turns ON, RES returning and finish
  • Row 009: count T0 only while stopped (preset 30 = 3 seconds)

3OutputsRows 010–015

  • Y0 (rotary table solenoid valve): ON while rotating and stopped. It turns OFF while returning, and the table goes back.
  • Y1 (Running lamp): lit while any of the three steps is ON.

Outputs are written together as N.O. contacts of the steps in parallel (OR). You can see at a glance which step outputs what, and it prevents writing the same coil in multiple places (double coil).

The sample wiring and ladder data can be downloaded fromGitHuband loaded with "Load wiring" and "Load ladder" in the simulator.

Key points

  • In step control, exactly one step is always ON. Because the progress of the operation is visible in the internal relays, you can immediately see where it stopped when something goes wrong.
  • Include sensor (auto switch) checks in the transition conditions. If you advance only by time, the operation gets out of sync when a device is slow.