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:
- 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.
- 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.
- 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.
- 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:
- Cylinders:
- E1: The first cylinder.
- E2: The second cylinder.
- 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.
- 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
- 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.
- 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.
- 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!