Skip to main content

Program sequential operation of pneumatic cylinder

In this Siemens PLC ladder logic lesson, we’re programming a simple sequential control for a single pneumatic cylinder. The focus here is on controlling the extension of the cylinder using inputs, sensors, and an output that triggers the solenoid valve.

Key Steps in the Sequence:

  1. Start Button (%I0.0): The process begins when the start button is pressed. This is the primary trigger that allows the cylinder to extend. In the ladder logic, this button initiates the sequence if the stop button isn’t pressed and the cylinder isn’t already extended.
  2. Stop Button (%I0.1): The stop button acts as a safety feature. When pressed, it interrupts the sequence, preventing the cylinder from extending or retracting. This ensures that the system can be manually stopped at any time.
  3. Front Position Sensor (%I1.1, B2.2): This position sensor is crucial for detecting whether the cylinder has already reached its fully extended position. If the sensor is triggered, it prevents the system from energizing the solenoid valve again, thus avoiding overextension.
  4. Output to Solenoid Valve (%Q0.3): The heart of this sequence is the output that controls the solenoid valve. When the conditions are right—start button pressed, stop button not engaged, and cylinder not already extended—the ladder logic sends a signal to the valve to extend the cylinder. This ensures smooth, controlled movement.

Sequence in Action

When the start button is pressed and the stop button is not engaged, the ladder logic checks if the cylinder is already extended by reading the position sensor. If the cylinder is not in the extended position, the solenoid valve is activated, and the cylinder extends.

Once the cylinder is fully extended, the front position sensor sends a signal back to the PLC, stopping further extension. This sequence ensures the cylinder extends only when needed and stops when it reaches the desired position.

Homework: Code sequential operation of two cylinders

For your homework, you’ll be building on the previous example of a single pneumatic cylinder sequence, but this time you’re programming a sequential control for two cylinders. The setup involves two cylinders, E1 and E2, each with their own sensors and solenoid valves, as shown in the simulation.

Key Components:

  1. Cylinders:
    • E1: The first cylinder.
    • E2: The second cylinder.
  2. Sensors:
    • B1.1 and B1.2: Sensors for E1, detecting the back (retracted) and front (extended) positions.
    • B2.1 and B2.2: Sensors for E2, detecting the back (retracted) and front (extended) positions.
  3. Solenoid Valves:
    • Y1: Controls the airflow to extend or retract E1.
    • Y2: Controls the airflow to extend or retract E2.

The Task

You will need to write a ladder logic program that controls the operation of two cylinders in sequence, ensuring that the system operates smoothly and only one cylinder extends or retracts at a time. Here’s how to approach it:

Sequence Operation

  1. Start Button: When the start button is pressed, the sequence will begin.
    • Cylinder E1 will extend first, and once it is fully extended, E2 will begin to extend.
  2. Position Sensors:
    • Use the sensors B1.2 and B2.2 to detect when each cylinder has fully extended.
    • Once E1 is fully extended (detected by sensor B1.2), it triggers the extension of E2.
    • Similarly, when E2 is fully extended (detected by sensor B2.2), the sequence can either stop or retract both cylinders.
  3. Retraction:
    • After both cylinders are fully extended, the program can either wait for a manual trigger to retract or automatically retract based on time or a signal.
    • During retraction, E2 will retract first. Once the sensor B2.1 confirms that E2 is fully retracted, E1 will begin to retract.
    • The sensors B1.1 and B2.1 will be used to detect when each cylinder is fully retracted.

Step-by-Step

  • Start by writing the code for extending E1 when the start button is pressed, and make sure it stops extending once B1.2 confirms that E1 is fully extended.
  • Then, create a condition that starts extending E2 only when E1 is fully extended.
  • Repeat the same steps for retraction, ensuring that E2 retracts first, followed by E1.

Homework solution

Join the full training!

Author

Jacob Biedulski

Author Jacob Biedulski

Automation engineer, CTO at ControlByte

More posts by Jacob Biedulski

Leave a Reply

<iframe src=”https://player.vimeo.com/video/757198505?h=0e10f23dac” width=”640″ height=”564″ frameborder=”0″ allow=”autoplay; fullscreen” allowfullscreen></iframe>

Mailing kursu programowania

Inteligentny DOM

Zapisując się na listę kursu otrzymasz:
– merytoryczne materiały z kursu, dzięki którym sprawdzisz, czy ten kurs jest dla Ciebie
– informacje o otwarciu zapisów [activecampaign form=62 css=1]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

Mailing kursu programowania MINIKURS

Siemens Simatic S7-1200/S7-1500
w języku LAD/FBD

Zapisując się na listę kursu otrzymasz:
– merytoryczne materiały z kursu, dzięki którym sprawdzisz, czy ten kurs jest dla Ciebie
– informacje o otwarciu zapisów [activecampaign form=56 ]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

MINI KURS MAILOWY

PROGRAMOWANIA

CODESYS w języku ST

 

Zapisując się na mini kurs mailowy otrzymasz:
-codziennie jedną wiadomość e-mail przez okres tygodnia
-materiały dzięki którym rozpoczniesz programować
w Codesys i języku ST

 

[activecampaign form=22]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

Mailing dla programistów

ControlByte

Zapisując się na listę mailową otrzymasz:
– merytoryczne materiały z naszych kursów
– informacje o otwarciu zapisów na szkolenia programowania
– informacje o naszych webinarch na żywo [activecampaign form=3]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

Mailing kursu programowania

Codesys w języku ST

Zapisując się na listę kursu otrzymasz:
– merytoryczne materiały z kursu, dzięki którym sprawdzisz, czy ten kurs jest dla Ciebie
– informacje o otwarciu zapisów [activecampaign form=20]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

Mailing kursu programowania

Siemens Simatic S7-1200/S7-1500
w języku LAD/FBD + HMI

Zapisując się na listę kursu otrzymasz:
– merytoryczne materiały z kursu, dzięki którym sprawdzisz, czy ten kurs jest dla Ciebie
– informacje o otwarciu zapisów [activecampaign form=14 css=1]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.

Mailing kursu programowania

Siemens S7-1200, S7-1500

w języku SCL

Zapisując się na listę kursu otrzymasz:
– merytoryczne materiały z kursu, dzięki którym sprawdzisz, czy ten kurs jest dla Ciebie
– informacje o otwarciu zapisów [activecampaign form=18 css=1]

Zapisując się na listę zgadzasz się z naszą polityką prywatności
https://kursy.controlbyte.pl/polityka-prywatnosci/
a my zapewniamy, że Twoje dane są bezpieczne.