Share this

Robotic arm motion control based on S7-200 PLC

2026-04-06 04:35:13 · · #1

Abstract: This paper describes a series of motion controls for a robotic arm based on an S7-200 PLC. These motions include linear movements of the arm (up/down and left/right), wrist rotation, gripper clamping, and overall rotation of the robotic arm. A stepper motor is used as the power source, enabling precise control. Multiple limit switch sensors ensure the flawless operation of these movements.

0 Introduction

Industrial robots (hereinafter referred to as robots) are a new technology that has emerged in the field of modern automatic control and have become an important component of modern manufacturing systems, with increasing research and application. The control system of this design adopts a small programmable logic controller (PLC) S7-200, which has the advantages of simple programming, easy modification, and high reliability.

1. Selection of robotic arm

According to classical mechanics, the stationary position of an object in three-dimensional space is determined by three coordinates or the angles of rotation around three axes. Therefore, the position and orientation of an object (i.e., the angles of its joints) can be theoretically determined. In actual production and daily life, the degrees of freedom of a robotic arm are not determined by blindly imitating the movements of a human hand, but rather by designing a robotic arm with the minimum number of degrees of freedom to meet the actual operational requirements. Therefore, a typical dedicated robotic arm (excluding gripping movements) usually has only 2 to 3 degrees of freedom, while a general-purpose robotic arm typically has 4 to 5 degrees of freedom. The robotic arm used in this design has a total of 5 degrees of freedom.

These five degrees of freedom enable the robotic hand to perform arm extension and retraction, arm swinging up and down, arm swinging left and right, wrist rotation, and finger gripping. A schematic diagram of the robotic hand is shown in Figure 1.

2. Selection of Power Unit

Industrial robots require extremely high precision, so this design uses a stepper motor. The speed and stopping position of a stepper motor depend solely on the frequency and number of pulse signals. When the stepper driver receives a pulse signal, it drives the stepper motor to rotate a fixed angle in a set direction, called the "step angle." Its rotation occurs step by step at fixed angles. The angular displacement can be controlled by controlling the number of pulses, thus achieving accurate positioning; simultaneously, the motor's speed and acceleration can be controlled by controlling the pulse frequency, thus achieving speed regulation.

However, stepper motors need a driver to function properly, so a driver must be selected. This design uses the Sino-US joint venture SH series stepper motor driver, which is inexpensive and easy to use. It mainly consists of a power input section, a signal input section, and an output section. The physical diagram and wiring diagram are shown in Figure 2 and Figure 3, respectively.

Power input section: provided by the power module, connected by two wires, pay attention to the polarity.

Signal input section: The signal source is provided by the PTO main unit. Since the PTO provides a voltage level of 24V, the input section has a voltage level of 5V, with a protection circuit added in between.

Output section: Connect to the stepper motor, pay attention to the phase sequence.

3. Use of Sensors

A proximity switch is used for detecting the position of the gripper and chassis rotation; a limit switch is used for detecting the horizontal and vertical axis limits.

Proximity switch: It has 3 connecting wires (red, blue, and black). Red is connected to the positive terminal of the power supply, black is connected to the negative terminal of the power supply, and blue is the output signal. When it is close to the stop, the output level is low, otherwise it is high.

Selected model: ASL-300Q (magnetic induction type 320), its structural principle is shown in Figure 4.

Limit switch: It activates when the block touches the limit switch (normally open contact closes). Model: ASL-300M (mechanical type 310). Its structure is shown in schematic diagram 5.

4. Electrical Wiring Diagram

The electrical wiring diagram is shown in Figure 6.

5. Control Flow Design

This design involves the cyclic transport of objects between two points in space. The specific control process is as follows: The PLC is turned on. If the robotic arm is not in the initial position, the stepper motor starts to run (the M-axis moves in the gripper direction, and the vertical axis moves downwards), and the servo motor of the base rotates in the opposite direction to the zero mark position. After initialization, the pulse count corresponding to the object's position in the cylindrical coordinate system is loaded first. The horizontal and vertical axis stepper motors and the base servo motor work simultaneously: the horizontal axis extends forward, the vertical axis rises, and the base rotates forward. When the stepper motor stops due to insufficient pulse output, the servo motor extends to its position, and the wrist motor is energized to rotate the wrist in the opposite direction. When the sensor detects the limit head, the motor stops, the PLC controls the solenoid valve to actuate, the gripper clamps, and after a delay, the pulse count corresponding to the destination position in the cylindrical coordinate system is loaded again. The horizontal and vertical axis stepper motors and the base servo motor work simultaneously to return to the object's position. The wrist motor is energized to rotate the wrist forward, the solenoid valve resets, and the gripper releases after a delay. Finally, the main program switch status is checked; if it is still on, the next cycle of the handling action begins. The control flowchart is shown in Figure 7.

Read next

A Brief Discussion on Artistic Design in Human-Computer Interface Design

[Abstract] With people's higher pursuit of life and the development of ergonomics, art design is increasingly valued...

Articles 2026-02-22