0% found this document useful (0 votes)
42 views11 pages

6 v. D. Cong

6_v._d._cong

Uploaded by

codientt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views11 pages

6 v. D. Cong

6_v._d._cong

Uploaded by

codientt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Design and Development of a Cost-

efficiency Robot Arm with a PLC-based


Robot Controller
To develop a cost-efficient robot arm for a typical pick and place
application that can applied in industry, this paper deployed a
programmable logic controller (PLC) to control the rotation motion of the
robot joints. The main tasks of the PLC controller are to calculate the
kinematics, create high-speed pulse outputs for stepper motors, and
implement sequence operations for a certain application. Functions are
Vo Duy Cong
written into subprogram segments. When needed, the main program only
Industrial Maintenance Training Center
Ho Chi Minh City University of Technology turns on the corresponding flag for executing the subprogram. Using the
(HCMUT), VNU-HCM, Ho Chi Minh City pre-written subprograms, a logical sequence to implement the Pick and
Vietnam Place application is easily implemented and described in this paper. The
PLC program is developed to control a SCARA robot with three rotation
joins. Stepper motors drive the robot joints. The Delta DVPSV2 PLC is
utilized to design the robot controller. This PLC series has four high-speed
pulse output pins, which is suitable for this project. Synchronous motion of
stepper motors is easily peformed using high-speed pulse output
commands built into the PLC program. Experimental results of robot arm
control have demonstrated the efficiency and accuracy of the developed
program. The robot arm's forward and inverse kinematics problems are
verified using the simulator on the software. The robot's joints move
synchronously as required to perform pick-and-place applications.

Keywords: Industrial Robot, Kinematics equation, Pick and Place,


Programmable Logic Controller, Robot control, SCARA robot.

1. INTRODUCTION optimization and analysis of robotic arms. Stress


analysis of robot arm components and optimization
Starting from the need to reduce production costs and structure is performed before manufacturing [14-
increase productivity, industrial robots have been 17].Analyzing the robot’s dynamics and kinematics is
invented to perform a number of production tasks that also necessary for optimizing robot performance [18-
require precision and repeatability. Robots are gradually 19].The forward kinematics problem is used to calculate
replacing humans in manufacturing industries because the position and orientation of the robot end-effector
of a number of outstanding attributes, such as reliability, from the values of joint angles. The Denavit-Hartenberg
predictability, accuracy, repeatability, and the ability to (DH) parameters are employed to establish the
operate in toxic and unsafe working environments [1-3]. transform matrix between coordinate frames of robot
Robot technology is also increasingly developing with joints.The solution of the inverse kinematics problem is
the development of science and technology. The the values of the robot joint angles corresponding to a
application scope of robots has been expanded in certain pose of the robot end-effector [20-22]. Traje–
different areas of life. Therefore, robots have been de– ctory planning is the basis of robot motion control and
signed and developed to meet the different requirements involves the stability of robot motion, working effi–
of each field. ciency, energy consumption, etc. [23-25]. Robot trajec–
Designing and developing a robot arm is a tory planning determines the final motion trajectory of
challenging task. It requires a wide range of knowledge the robot arm to meet processing requirements and
about mechanical design, structural analysis [4-8], ensure high performance by linking the spatial and
electronics and control [9-10], kinematic modeling and temporal domains of the robot during movement.
analysis, path planning, and trajectory tracking [11-13]. Optimized trajectory planning can help meet process
There have been many studies to develop robot arms requirements, reduce jitter, and improve structural
used for many different purposes, from education, quality to enable smooth motion [26-27].
healthcare, and service to industry. Finite element The robot controller is a critical component of the
analysis (FEA) is commonly used for structural robot system. It has a great influence on the perfor–
mance, accuracy, and working ability of the robot.
Robot controllers can be developed based on microcon–
Received: January 2024, Accepted: February 2024
trollers, DSP chips, CNC controllers, embedded com–
Correspondence to: Vo Duy Cong
puters, FPGAs, or PLCs. In low-cost designs, micro
Industrial Maintenance Training Center,
controllers are commonly used. In [28], a 6-DOF robot
Ho Chi Minh City University of Technology, Vietnam
arm is designed and controlled by a combination of a
E-mail: [email protected]
doi: 10.5937/fme2402226C
© Faculty of Mechanical Engineering, Belgrade. All rights reserved FME Transactions (2024) 52, 226-236 226
computer and an Arduino board. In this study, the controlling a wide variety of mechanical systems and
function of Arduino is only to control the rotation of DC applications. PLC systems are found everywhere, inclu–
servo motors for the robot joints. The motion planning ding in factories, office buildings, and even controlling
of the robot is performed on the ROS. Arduino com– the traffic on our streets. PLCs are at the very heart of
municates with ROS through a USB interface. Through the control of many critical technologies. Initially, PLC
a Bluetooth module, Arduino is connected to a mobile was designed to replace traditional mechanical relays
phone to control the motion of a robot arm [29]. An and timers. However, with the development of
application is written on the mobile phone to send the electronic technology, the functions of PLCs have been
rotation angles to the Arduino. Victor et al. [30] used expanded, and they can perform many different comp–
the ESP32 microcontroller to develop an affordable IoT lex tasks in the industry. Several studies have used
open-source robot arm for online teaching of robotics PLCs to control the robot arm. In [41], PLC controls
courses. ESP32 controls the robot's motion based on two servo motors of a gantry robot system. The PLC
data received through Wi-Fi from an HMI interface received the X and Y coordinates from the computer
deployed on a smart phone. In [31], the STM and calculated to transform them to the rotation angles
32F407VGT6 microcontroller was chosen to control a of servo motors. In [42], PLC was employed to control a
4-DOF parallel robot arm. The STM32 microcontroller linear delta robot arm. The rotation angles obtained
created the PWM signal to control the speed and from the inverse kinematic analysis are transferred to
direction of DC motors. The STM32 communicated PLC using OPC. The necessary coding in the TIA Portal
with the computer through a USB↔UART converter to was done to control the motor drivers so that the three
receive the position and orientation of the robot end- stepper motors could ensure the delta robot moved to
effector. It can be seen that the microcontroller only the desired coordinate position.
performs simple tasks such as controlling the rotation of In this paper, a PLC program is developed to control
motors. Other complex tasks, such as kinematics and a SCARA robot with three rotation joins. Stepper mo–
motion control, are performed on computers. tors drive the robot joints. The Delta DVPSV2 PLC
To develop a high-performance controller, DSP or isutilized to design the robot controller. This PLC series
FPGA technology is commonly used. In [32], a robot has four high-speed pulse output pins, so it is suitable
controller based on a DSP processor was designed and for this project. PLC performs kinematics calculations
fabricated. The DSP processor calculates the rotation to find the rotation angle of the robot joints and output
angles of DC motors from the 3D coordinate and creates high-speed pulse to stepper motor drives for rotating
signals to control the motion of DC motors. Lee and stepper motors to reach the required angles. Functions
Jung [33] provided a tutorial for the control imple– for kinematics calculation and controlling stepper mo–
mentation of a collaborative robot using digital signal tors are written into subprogram segments. When
processors(DSPs). The DSP processor performs the task needed, the main program only turns on the corres–
of calculating kinematics and controlling motion by ponding flag for executing the subprogram. A logical
using the time-delayed control (TDC) method. In robo– sequence to implement the Pick and Place application is
tic systems with a large number of degrees of freedom, easily implemented using the pre-written subprograms.
the kinematic calculation processes performed by DSP
also become more complex and use large resources, 2. KINEMATIC EQUATIONS OF THE ROBOT ARM
thus reducing the robot's response speed. With the
ability to calculate and process data in parallel, FPGAs Figure 1 shows the kinematic diagram of the robot arm
are widely used in the field of robot control. FPGA that is used in this research. The robot consists of three
helps improve hardware processing power and real-time rotation joints connected by three links with lengths of
information processing speed [34-40].Chen et al. [34] l2, l4 and l6, respectively. To establish the homogeneous
implemented the forward/inverse kinematics for a transformation matrix that expresses the position and
SCRARA robot on FPGA. The parameterized function orientation of the end effector frame in terms of the base
is utilized to increase the code flexibility in the design, frame, the Denavit-Hartenberg (DH) parameters are
and then the Finite state machine is employed to reduce used. The DH parameter tables consist of four variables:
the hardware resource. FPGA-based motion control was two variables, θ and α, used for rotation; two variables,
developed by Chand et al. [38] for a dual-arm robot. r, and d, used for displacement. From the DH
The motion planning and control problem was solved by parameters, the transformation matrix between frame n
implementing Lyapunov-based acceleration controllers and frame n-1 is defined as:
on FPGA. Gürsoy and Efe [40] proposed a proportion
integral differential and sliding mode control scheme for
robot manipulators based on FPGA, achieving better
trajectory tracking performance.
Implementing FPGA for robot control is a difficult
task that requires more knowledge about computation
algorithms, hardware description language, and digital
systems. Therefore, it is costly in terms of time and cost
to develop a robot controller with FPGA. In this paper, a
programmable logic controller (PLC) is employed for
the purpose of developing a cost-effective robotic arm.
PLCs are robust industrial electronic systems used for Figure 1. The kinematic diagram of the SCARA robot

FME Transactions VOL. 52, No 2, 2024 ▪ 227


⎡ cosθn − sinθn cosαn sinθn sinαnrn cosθn ⎤ Forward Equation (7) determines the position and
⎢ sinθ cosθ cosα − cosθ sinα r sinθ ⎥ orientation of the robot end-effector from the robot
Tnn−1 = ⎢
n n n n nn n ⎥
(1) joints angles. Contrarily, the inverse kinematic equa–
⎢ 0 sinαn cosαn dn ⎥ tions help calculate the joints' angles when we know the
⎢ ⎥
⎣0 0 0 1⎦ position and orientation of the end-effector. We use
geometrical relations among links to find the inverse
Table 1. The D-H parameters kinematic equations, as shown in Figure 2.
Joint θi(°) αi(°) ri(mm) di(mm)
1 θ1 0 l2 l1
2 θ2 0 l4 l3
3 θ3 0 l6 l5

Transform from frame 1 to frame 0:


⎡cos θ1 − sin θ1 0 l2 cos θ1 ⎤
⎢ sin θ cos θ1 0 l2 sin θ1 ⎥⎥
T10 = ⎢
1
(2)
⎢ 0 0 1 l1 ⎥
⎢ ⎥
⎣ 0 0 0 1 ⎦

Transform from frame 2 to frame 1: Figure 2. The kinematic diagram of the SCARA robot

⎡cos θ2 − sin θ2 0 l4 cosθ2 ⎤ The coordinate of point C is:


⎢ sin θ cos θ2 0 l4 sin θ2 ⎥⎥ xc = x p − l6 cosθ p
T21 = ⎢
2
(3) (8)
⎢ 0 0 1 l3 ⎥ yc = x p − l6 sin θ p
⎢ ⎥
⎣ 0 0 0 1 ⎦
Consider the triangular ABC; the angle θ2 can be
Transform from frame 3 to frame 2: calculated:
⎡cos θ3 − sin θ3 0 l6 cos θ3 ⎤ xc2 + yc2 − l22 − l42
⎢ sin θ cos θ3 0 l6 sin θ3 ⎥⎥ θ2 = −a cos q (9)
T32 = ⎢
3
(4) 2l2l4
⎢ 0 0 1 l5 ⎥
⎢ ⎥ The angle θ1 is the sum of two angles α and β:
⎣ 0 0 0 1 ⎦
θ1 = α + β (10)
By multiplying the matrices together, we obtain the
transformation matrix that expresses the relation bet– where:
ween the end-effector frame and the base frame:
l22 + xc2 + yc2 − l42
⎡c123 −s123 0 l6 c123 + l4 c12 + l2c1 ⎤ cos α = (11)
⎢s c123 0 l6 s123 + l4 s12 + l2s1 ⎥⎥ 2l2 xc2 + yc2
T30 = ⎢
123
(5) yc
⎢ 0 0 1 l1 + l3 + l5 ⎥ tan β = (12)
⎢ ⎥ xc
⎣ 0 0 0 1 ⎦
with: The inverse kinematic problem has two solutions.
Consider another configuration of the robot; the values
c123 = cos (θ1 + θ2 + θ3 ) of the angles θ1 and θ2 are:
s123 = sin (θ1 + θ2 + θ3 ) xc2 + yc2 − l22 − l42
(6) θ2 = a cos (13)
c12 = cos (θ1 + θ2 ) ; s12 = sin (θ1 + θ2 ) 2l2l4
c1 = cosθ1 ; s1 = sin θ1 θ1 = −α + β (14)

From matrix T30 , the position and orientation of the 3. PLC DESIGN AND IMPLEMENTATION
end-effector can be extracted as follows:
3.1 Electricaldesign with PLC
x p = l6 c123 + l4 c12 + l2c1
y p = l6 s123 + l4 s12 + l2s1 In this project, a Programmable Logic Controller (PLC)
(7) is employed as the robot controller to control the motion
z p = l1 + l3 + l5 of the robot joints. This section presents the electrical
θ p = θ1 + θ2 + θ3 devices used in the system and describes the functions,
technical specifications, and connection diagram bet–
where (xp, yp, zp) is the 3D coordinate and θp is the ween devices. The devices and components of the
rotation angle around the Z-axis. electrical circuit are shown in Figure 2.

228 ▪ VOL. 52, No 2, 2024 FME Transactions


The PLC lies in the center of the diagram, demon– Table 2. Specifications of DVP28SV11T2 PLC
strating the importance of this device in the electrical Specifications Value
circuit. PLC has the function of controlling the ope–
Power supply 24V
ration of other devices in the system. It reads the input
module's signal states, executes the user program's logic Program capacity 30k step
operations, and controls the outputs. PLCs range from Communications RS232/RS485
small non-modular devices used for processing simple Total number of I/O pins 28 pins
binary signals up to large-rack-mounted modular devi– Number of input pins 16 pins
ces, which can perform analog processing, PID control,
Number of output pins 12 pins
motor control, networking, and more. Our design
employs the small non-modular PLC DVP28SV11T2 to Type of output pins Transistor
develop a cost-efficient system. This PLC belongs to the Table 3. Specifications of NEMA 23 motor
DVP-SV2 series of Delta Company. DVP-SV2 PLC is
the high-end model of the Delta DVP-S series with Specifications Value
larger program capacities and data registers. DVP-SV2 Step angle 1.80
has excellent motion control. It consists of 4 high-speed Motor length 76mm
pulse outputs up to 200kHz. Rate current 3.0A
Many motion control instructions are integrated into
Holding torque 1.8Nm
the programming software to meet the applications that
require high-speed and high-precision positioning Weight 1050g
control. Therefore, DVP-SV2 PLC is suitable for robot Rotor Inertia 440 g.cm2
motion control applications with 4-DOF. The Lead Wires 4
specifications of DVP28SV11T2 PLC are listed in Shaft Diameter 8mm
Table 2.
Table 4. Specifications of NEMA 17 motor

Specifications Value
Step angle 1.80
Motor length 48mm
Rate current 1.5A
Holding torque 0.55Nm
Weight 0.4kg
Lead Wires 4
Shaft Diameter 5mm

Table 5. Pin function of the DM542 driver

Pin Details
PUL+ Pulse signal: receive the pulses from the cont–
roller with the voltage of 5-24V when PUL-HIGH
PUL- and 0-0.5V when PUL-LOW
DIR+ Direction signal: representing two directions of
motor rotation; 5-24V when DỈ-HIG, 0-0.5V
DIR- when DIR-LOW
Figure 3. Components in electrical system
ENA+ Enable signal: This signal is used for enab–
Specifically, the PLC functions in this project consist of ling/disabling the driver
ENA-
1) output pulse and direction signals for controlling the
three stepper motors to rotate at the required rotation +V Power supply, 20-50VDC
angle, 2) output digital signals to change the state of the GND Power ground
pneumatic valves, 3) reading the signal of the limit A+, A- Motor phase A
switches to halt the motors, 4) execute the program to B+, B- Motor phase B
solve the kinematic equations of the robot, 5) commu–
nication with another device via RS232/RS485 port, 6) The NEMA 23 motor is controlled through the
executes the logic operations of the user program for a Leadshine DM542 digital stepper motor drive. The
specific application. DM542 is a fully digital drive developed with an ad–
The pulse/direction signals are sent to motor drivers vanced DSP control algorithm based on the latest
to convert to voltage signals that apply to the motor motion control technology. The main features of
coils to create the stepper motors' precision motion. DM542 drive are auto-identification motor and auto-
Two NEMA 23 motors are installed in the two first configuration parameter; include 15 selectable micro-
joints to rotate the robot links, and the NEMA 17 is used step resolutions: 400, 800, 1600, 3200, 6400, 12800,
for the last joint. The specifications of motors are 25600, 1000, 2000, 4000, 5000, 8000, 10000, 20000,
illustrated in Table 3 and Table 4, respectively. 250000; input voltage from 18-50VDC; 8 selectable

FME Transactions VOL. 52, No 2, 2024 ▪ 229


peak current: 1A, 1.46A, 1.91A, 2.37A, 2.84A, 3.31A, connected to the PUL pin of the stepper motor
3.76A, 4.2A; pulse input frequency up to 200kHz with drives.The output pins Y1, Y3, and Y5 are used as
optical isolate; over voltage, over current protections. direction pins, which are connected to the DIR- pins of
Table 5 details the pins’ functions of the DM542 drive. the stepper motor drives. Switching power is used to
The NEMA 17 motor is controlled through a convert the 220VAC to the 24VDC power. 24VDC
TB6600 digital stepper motor drive. This drive has 6 power is distributed to other devices such as PLCs,
selectable micro-step resolutions: 200, 400, 800, 1600, stepper motor drives, and coils of pneumatic valves. A
3200, 6400; 8 selectable peak currents: 0.7A, 1.2A, circuit breaker (CB) is installed at the input 220VAC to
1.7A, 2.2A, 2.7A, 2.9A, 3.2A, 4.0A. The supply voltage protect all devices in the circuit. The output of the CB is
is from 9V to 42VDC. The pins’ function of TB6600 is connected in series with an EMI/RFI filter device. The
the same as the DM542 drive. purpose is to stop noise from entering and disrupting the
Three limit switches are arranged at the end of the operation of electrical equipment and stop electrical
stroke of the rotating joints to limit the rotating joints' equipment in the circuit from putting EMI/RFI noise
rotation angle and determine the joints' initial position onto the power lines.
when starting. When powered on, the robot joints rotate
to touch limit switches. Then, the motors stop reverse 3.2 PLC programming
rotation. The joints rotate with a certain rotation angle to
return to zero origin. In this position, the robot arm is To write a program for the Delta DVP-PLC series, the
straightened. software WPLSoft is used. In addition to basic
Figure 4 shows the wiring diagram of the electrical commands, WPLSoft provides application commands to
circuit. It must be noted that the PLC's DC input has two generate high-speed pulses to the output pins and
operating modes: SINK and SOURCE. It depends on conduct the arithmetic operations applied in our
the current going into or out of the S/S pin of the PLC. application. The API 57 PLSY is the command for pulse
The diagram in Figure 4 uses the SINK mode. The S/S output with the structure as follows:
pin is connected to the 24V source, so current flows
from the 24V source to the S/S pin. The input pins X0, PLSY S1 S2 D
X1, and X2 are connected with the limit switches of
robot joints. The input pins X3 and X4 are connected • S1: Pulse output frequency
with the start and stop buttons. The high-speed pulse • S2: Pulse output number
output pins Y0, Y2, and Y4 of the PLC are respectively • D: External output (Y0, Y2, Y4, Y6)

Figure 4. The wiring diagram of the electrical system

230 ▪ VOL. 52, No 2, 2024 FME Transactions


PLSY instruction assigns the number of output M1029 will be On when the CH0 pulse output is com–
pulses S2 from output device D at the frequency S1. pleted.
Before using this command, the direction signal pin of To conduct the kinematic calculations, the kinematic
the motor drive must be assigned so that the motor parameters of the robot are stored in the data registers
rotates in the correct direction. The PLSR command for convenience in calculations and command usage.
performs the same function as PLSY; however, it allows The data registers are shown in Table 7.
the generation of acceleration pulses, which helps the Table 7. The register to store the kinematic parameters
motor accelerate and decelerate when starting and
stopping, minimizing vibrations. The structure of the Variables Registers
PLSR command is: l2 D212
l4 D214
PLSR S1 S2 S3 D
l6 D216
• S1: Pulse output frequency
• S2: Pulse output number xp D218
• S3: acceleration/deceleration time (ms) yp D220
• D: External output (Y0, Y2, Y4, Y6) θp D222
θ1 D224
Table 6 lists some arithmetic operations that are
used to solve the forward kinematic and inverse kine– θ2 D226
matics equations. θ3 D228
The robot control task is divided into many prob– xc D14
lems, from simple to complex. The first requirement to
perform is to return the robot arms to zero. yc D16
D22
Table 6. The arithmetic operations xc2 + yc2
D24
Command Functions xc2 + yc2 − l42
DADDR Floating point number addition π D20
DSUBR Floating point number subtraction
D26
DMULR Floating point number multiplication l22
DDIVR Floating point number division α D30
DCOS Cosine operation of binary floating β D32
point
DSIN Sine operation of binary floating
point Figure 6 is the ladder diagram to calculate the angle
DTAN Tangent operation of binary floating θ2 according to Equation (9). This program segment will
point be executed when contact M0 is activated. Each
DACOS Arccosine operation of binary command in the PLC ladder program performs the
floating point calculation of one or two terms. Therefore, the equation
is broken down into multiple statements, each statement
DATAN Arctangent operation of binary
performing a calculation. The previous calculation
floating point
results are stored and used for subsequent calculations
DESQR Square root of binary floating point
until the equation is completed. For example, to
calculate the value xc, first, the cosθp is calculated by
the command DCOS and stored in register D10. Then,
multiply two registers, D216 (store the value of l6) and
D10, by command DMULR corresponding to the
expression l6cosθp; the result is stored in register D10.
Finally, subtract register D218 from register D10 by the
command DSUBR and store the result in register D14,
which is the value xc. The first six lines of the program
calculate the coordinate ((xc,yc)) according to Equation
(10). These values are contained in registers D14 and
D16 for calculating θ1 and θ2 angles. The program to
calculate the angles θ1 and θ3 are illustrated in Figure 7.
Some values that are used to calculate the angle θ2 are
Figure 5. Program to rotate the first joint to the home
position. re-used to calculate the angle θ1, such as xc2 + yc2 stored
Figure 5 shows an example of returning a motor to in D22 and xc2 + yc2 − l42 stored in D24. Add two re–
zero.The pulse signal is the Y0 pin, Y1 is the direction gisters, D26 and D24, by the DADDR command to cal–
signal, and X0 is the limit switch. Register D200 is used culate the value of the expression l22 + xc2 + yc2 − l42 ; the
to contain the number of pulses to rotate the motor when
it touches the limit switch to the zero position. The flag result is stored in D18. Using the DSQR command to

FME Transactions VOL. 52, No 2, 2024 ▪ 231


calculate xc2 + yc2 , the input is D22 (store the value of
DDRVI S1 S2 D1 D2
xc2 + yc2 ), and the output is stored in the D28 register. • S1: Number of output pulses (relative
Then, DDIVR instructions are used consecutively to designation)
calculate the value of cosα according to Equation (11); • S2: Pulse output frequency
the value of cosα is stored in D18. Next, the DACOS • D1: Pulse output device (Y0, Y2, Y4, Y6)
command is employed to calculate the value of angle α; • D2: Output device for the signal of rotation
the result is stored in the D30 register. Divide two direction
registers, D16 and D14, to calculate the value of tanβ Figure 8 shows the program segment for the Move
and use the DATAN command to get the value of the Joint Instruction. The data registers D242, D244, and
angle β; this value is stored in the D32 register. Finally, D242 store the pulse frequency of the first, second, and
two registers, D30 and D32, are added together by the third joints, respectively. The flags M1029, M1030, and
DADDR command to obtain the angle θ1 (stored in the M1036 are On when pulse outputs are completed. So,
D224 register). the flag M2 is set to OFFF when all three flags are ON,
ending the process. At the same time, M6 is also set ON
to indicate that the program has finished executing. This
program segment is used as a sub-function. When we
want to move the robot from one point to another, we
just need to put the rotation angle values into registers
D242, D244, and D242 and turn on the M2 motor to
execute the program. When the program finishes, the
M6 flag is turned ON; we use this mechanism to
continue executing the next commands.

Figure 6. Program to calculate the angle θ2

Figure 8. Program to for the Move Joint Instruction

4. EXPERIMENT RESULTS AND DISCUSSION OF


THE ROBOT ARM CONTROLLED BY PLC
Figure 7. Program to calculate the angles θ1 and θ3

The main application developed in this study is Figure 9 shows the experimental robot arm and elec–
Pick-and-Place tasks. To perform this task, a program trical cabinet. The links of the robot arm are machined
segment is written to rotate three joints from the current on a CNC machine with aluminum alloy. Mechanical
position to the desired position (Move Joint Instruction). parts are precisely machined on the CNC machine to
The contact M2 is used to activate this sub-program. ensure that the assembly meets technical requirements.
The desired absolute angles of three joints are stored in The lengths of the robot's links are l1 = 260 mm, l2 =
registers D230, D232, and D234, respectively. Then, the 240 mm and l3 = 60 mm. The robot control cabinet is
relative angles are calculated by subtracting the desired constructed based on the electrical diagram in Figure 4.
angles from the current angles. The relative angles are The size of the cabinet is 800x600 mm. The NEMA 23
used to calculate the number of pulses for the stepper motors are set up with a resolution of 10000 pulses/
motors. The INT command is used to convert the revolution, and the NEMA 17 motor is set up with a
floating point numbers to the integer values. The resolution of 6400 pulses/revolution. Because stepper
DDRVI command has the function of creating pulses to motors are used, joint speeds are limited to values of
the output pins. The structure of the DDRVI is as 360 degree/s.
follows:

232 ▪ VOL. 52, No 2, 2024 FME Transactions


Before uploading code to the PLC, we need to test of the robot is as follows: First, the robot moves to the
the correctness of the programs. One of the most error- home position. At this position, the values of the robot's
prone programs is the inverse kinematics problem joints are zeros. Second, the robot moves to the object's
because it involves complex arithmetic calculations that position to grasp the object by using the Move Joint
a PLC cannot easily handle. Using the simulator Instruction described in this paper. When the end-
function of the WPLsoft software, we run the simulation effector has approached the object, the PLC outputs a
to calculate the angles θ1, θ2, and θ3 by loading different signal to an output pin to close the gripper; the object is
values of the end-effector position and orientation to the attached to the gripper. Then, the robot brings the object
registers D218, D220, and D222, respectively. After to another position and de-attaches the object to place it
running the program, open the "monitor devices" in a certain position. The above process will repeat until
window on the software and add the data registers to the the last object is picked up. Finally, the robot returns to
Device Name column to see the floating point values its home position to wait for another task.
(see Figure 10).Because the inverse kinematics problem
is solved using geometric methods, AutoCAD software
is used to draw the robot's configuration and measure
the values of joint angles. Comparing the rotation angle
values obtained by simulation and the measured values
on AutoCAD software, the results show that the
program written on WPLsoft gives the correct solution.
Some simulation cases are shown in Figure 11.
Similarly, the simulator function on WPLsoft also tests
other program segments.

Figure 10. Some simulation results


(a) SCARA robot arm

Figure 11. Flow chart for Pick and Place applications

Figure 12 shows the states of the robot in the


operation process: (a) shows the configuration of the
robot at the home position, (b) shows the robot at the
(b) Electrical cabinet position to grab the objects, (c) the object is grabbed by
Figure 9. Experimental system the gripper, (d) shows the robot at the position to place
the object. Experimental tests have shown that the robot
Figure 11 shows the flow chart to control the robot operates correctly, and the programs do not have
arm for a Pick and Place application. When turning on calculation and logic errors. The stepper motor can
the CB on the electrical cabinet, the operation sequence reach the speed of 360 degrees/s without losing steps.

FME Transactions VOL. 52, No 2, 2024 ▪ 233


a) Home position (b) position to grab the objects

(c) grab object (d) position to place object


Figure 12. Test the operation of the robot in a Pick and Place task

As a result, the robot takes about 1.2 to 2.5 seconds REFERENCES


to pick and place a product. Therefore, the robot can [1] Cong, V.D., Hanh, L.D.: Visual servoing control
meet the requirements of pick-and-place applications in schemes of 4 DOF robot manipulators. Int J Intell
production lines. Using PLC to design the controller Robot Appl, Vol. 6, pp. 804–813, 2022.
helps the robot operate stably and durably; the signal https://doi.org/10.1007/s41315-022-00259-7
from the PLC is less affected by noise from the
surrounding environment. [2] Thurow, K.: System Concepts for Robots in Life
Science Applications, Applied Sciences, Vol. 12,
5. CONCLUSIONS No. 7, 2022. https://doi.org/10.3390/app12073257
[3] Cong, V.D.: Extraction and classification of
This paper has designed a controller based on PLC for a 3- moving objects in robot applications using GMM-
DOF SCARA robot arm. The devices and components of based background subtraction and SVMs, J Braz.
the electrical circuit are analyzed and connected together to Soc. Mech. Sci. Eng., Vol. 45, 317, 2023.
control the robot arm. PLC plays a key role in the electrical https://doi.org/10.1007/s40430-023-04234-6
system. It controls the operation of other devices, such as [4] Xu, Z., Xia, J., Zhong, F.: Adaptive chicken swarm
motors, valves, and sensors. The kine–matics equations of optimization algorithm for identifying structural
the robot arm have been analyzed. A PLC subprogram of parameters of 6-DOF mechanical arm. J Braz. Soc.
the kinematics equations is written to calculate the rotation Mech. Sci. Eng.,Vol. 46, No. 17, 2024. https://
angles of the robot joints.The si–mulator function of doi.org/10.1007/s40430-023-04585-0
WPLsoft validates the kinematic solution.
Using commands to perform the high-speed pulse [5] Kim, H.S., Kim, G.S.: 5 Axis Robot Design for
generation task, a sub-program is programmed to Loading and Unloading Workpieces, International
perform the point-to-point control task. A Pick and Journal of Precision Engineering and Manu–
Place application is implemented to verify the accuracy facturing, 2023.
of the program. The results show that the robot can [6] Kouritem, S. A. et al.: A multi-objective optimi–
grasp objects without errors. The stepper motors can zation design of industrial robot arms. Alexandria
reach the speed of 360 degrees/s without losing steps. Engineering Journal, Vol. 61, No. 12, 12847-12867,
As a result, the robot takes about 1.2 to 2.5 seconds to 2022. https://doi.org/10.1016/j.aej.2022.06.052
pick and place a product. Using PLC to design the [7] Li, K., Huo, Y., Liu, Y., Shi, Y., He, Z., and Cui,
controller helps the robot operate stably and durably. Y.: Design of a lightweight robotic arm for
Therefore, the designed controller can be applied in kiwifruit pollination. Computers and Electronics in
industrial environments. Agriculture, Vol. 198, 2022. https://doi.org/10.
1016/j.compag.2022.107114
ACKNOWLEDGMENT
[8] Anurag, S., Rashmi, A., Yashpal, S.: Design and
We acknowledge Ho Chi Minh City University of Static Analysis of Robotic Arm using Ansys,
Technology (HCMUT) and VNU-HCM for supporting International Journal of Recent Technology and
this study. Engineering, Vol. 9, No. 1, 2020.

234 ▪ VOL. 52, No 2, 2024 FME Transactions


[9] Phuong, L.H., Cong, V.D., Hiep, T.T.: Design a [21] Slavković, N., Živanović, S., Vorkapić, N., Dimić,
Low-cost Delta Robot Arm for Pick and Place Z.: Development of the Programming and Simu–
Applications Based on Computer Vision, FME lation System of 4-axis Robot with Hybrid Kine–
Transactions, Vol. 51, pp. 99-108, 2023. matic, FME Transactions, Volume 50 No.3, 2022.
[10] Cong, V.D., Duy, A.D., Phuong, L.H.: [22] Phuong, L.H., Cong, V.D.: Control the Robot Arm
Development of Multi-Robotic Arm System for through VisionBased Human Hand Tracking, FME
Sorting System Using Computer Vision, Journal of Transactions, Vol. 52, No. 1, pp. 37-44, 2024.
Robotics and Control (JRC), Vol. 3, No. 5, 2022. [23] Xu Z, Wang W, Chi Y, Li K, He L.: Optimal
[11] Singh, G., Banga, V.K.: Kinematics and trajectory Trajectory Planning for Manipulators with
planning analysis based on hybrid optimization Efficiency and Smoothness Constraint. Electronics.
algorithms for an industrial robotic manipulators. Vol. 12, No. 13, 2023.
Soft Comput,Vol. 26, pp. 11339–11372, 2022) [24] Wang, X., Zhou, X., Xia, Z., Gu, X.: A survey of
https://doi.org/10.1007/s00500-022-07423-y welding robot intelligent path optimization, J.
[12] Rout, A., Mahanta, G.B., Bbvl, D. et al.: Kinematic Manuf. Process., Vol. 63, pp. 14–23, 2021.
and Dynamic Optimal Trajectory Planning of [25] Xue, Z., Zhang, X., Liu, J.: Trajectory planning of a
Industrial Robot Using Improved Multi-objective dual−arm space robot for target capturing with
Ant Lion Optimizer. J. Inst. Eng. India Ser. C 101, minimizing base disturbance, Adv. Space Res,
pp. 559–569, 2020. https://doi.org/10.1007/s40032- 2023.
020-00557-8
[26] Tamizi, M.G., Yaghoubi, M., Najjaran, H.: A
[13] Raza, K., Khan, T. A., and Abbas, N.: Kinematic review of recent trend in motion planning of
analysis and geometrical improvement of an industrial robots, Int. J. Intell. Robot. Appl. Vol. 7,
industrial robotic arm. Journal of King Saud pp. 253–274, 2023.
University - Engineering Sciences, Vol. 30, No. 3,
[27] Wang, T., Xue, Z.,Dong, X., Xie, S.: Autonomous
pp. 218-223, 2018.
Intelligent Planning Method for Welding Path of
https://doi.org/10.1016/j.jksues.2018.03.005
Complex Ship Components, Robotica, Vol. 39, pp.
[14] Yang, H., Shen, M., Zhang, M., et al.: Structural 428–437, 2020.
design and performance analysis of a self-driven
[28] Vyas, D. R., Markana, A., and Padhiyar, N.:
articulated arm coordinate measuring machine.
Economic 6-DOF robotic manipulator hardware
Meas Sci Technol, Vol. 33, No. 1, 2022.
design for research and education, Materials Today:
[15] Ali, Z., Sheikh, M. F., Al Rashid, A., Arif, Z. U., Proceedings, Vol. 62, pp. 7179-7184, 2021.
Khalid, M. Y., Umer, R., and Koç, M.: Design and https://doi.org/10.1016/j.matpr.2022.03.140
development of a low-cost 5-DOF robotic arm for
[29] Hussein M.A., Yasir H., Ghadah A.A.: Design and
lightweight material handling and sorting
implementation of Arduino based robotic arm,
applications: A case study for small manufacturing
International Journal of Electrical and Computer
industries of Pakistan, Results in Engineering, Vol.
Engineering (IJECE), Vol. 12, No. 2, pp. 1411-
19, 2013.
1418, 2022.
[16] Li, X., Sun, K., Guo, C., Liu, T., Liu, H.: Design,
[30] Victor, H.B.B., Rodrigo, S., David E.E.C.: Design
modeling and characterization of a joint for
of an affordable IoT open-source robot arm for
inflatable robotic arms, Mechatronics, Vol. 65,
online teaching of robotics courses during the
2020.
pandemic contingency, HardwareX, Vol. 8, 2020.
[17] Tung, T. T., Van Tinh, N., Phuong Thao, D. T., and
[31] Laski, P.A., Smykowski, M.: Using a Development
Minh, T. V.: Development of a prototype 6 degree
Platform with an STM32 Processor to Prototype an
of freedom robot arm, Results in Engineering, 18,
Inexpensive 4-DoF Delta Parallel Robot, Sensors.
2023.
Vol. 21, No. 23, 2021.
[18] Huynh, H. N., Assadi, H., Rivière-Lorphèvre, E.,
[32] Li, N., Chen, Y., Shi, Y., Gao, F., Che, J. and Chen,
Verlinden, O., and Ahmadi, K.: Modelling the
J: Development of a DSP based control system for
dynamics of industrial robots for milling
a parallel high-quality tea plucking robot, in
operations, Robotics and Computer-Integrated
American Society of Agricultural and Biological
Manufacturing, Vol. 61, 2020.
Engineers Annual International Meeting 2015, pp.
[19] Zhang, B., Wu, J., Wang, L., & Yu, Z.: Accurate 1188–1195, Curran Associates, Inc., 2015.
dynamic modeling and control parameters design of
[33] Lee, J.W. and Jung, S.: A tutorial on control
an industrial hybrid spray-painting robot, Robotics
implementation for a collaborative robot in joint
and Computer-Integrated Manufacturing, Vol. 63,
space using DSPs, Journal of Institute of Control,
2020.
Robotics and Systems, Vol. 28, No. 1, pp. 28–38,
[20] Nguyen, H.V., Cong, V.D., Trung, P.X.: 2022.
Development of a SCARA Robot Arm for
[34] Cong, V.D.: Industrial Robot Arm Controller Based
Palletizing Applications Based on Computer
on Programmable System-On-Chip Device, FME
Vision, FME Transactions, Vol. 51, No. 4, pp. 541-
Transactions, Vol. 49, No. 4, pp. 1025-1034, 2021.
549, 2023.

FME Transactions VOL. 52, No 2, 2024 ▪ 235


[35] Deli, Z., Shaohua, J., Liu, Z.: The Parallel Solving
Method of Robot Kinematic Equations Based on ДИЗАЈН И РАЗВОЈ ТРОШКОВНО-ЕФИКАСНЕ
FPGA, Journal of Robotics, pp. 1-8, 2023. РОБОТСКЕ РУКЕ СА РОБОТСКИМ
[36] Fan, X., Yan, H. and He, D.: Inverse kinematics of КОНТРОЛЕРОМ БАЗИРАНИМ НА ПЛЦ-У
robot based on Zynq platform, Microcontroller and
Embedded System Applications, Vol. 17, No. 2, pp. В.Д. Конг
18–22, 2017.
[37] Chen, W.C., Chen, C.S., Lee, F.C. and Kung, Y.S.: Да би се развила исплатива роботска рука за
Digital hardware implementation of the типичну примену пицк анд плаце која се може
forward/inverse kinematics for a SCARA robot применити у индустрији, овај рад је применио
manipulator, 2018 IEEE International Conference програмабилни логички контролер (ПЛЦ) за
on Applied System Invention (ICASI), Chiba, контролу ротационог кретања зглобова робота.
Japan, pp. 54-57, 2018. Главни задаци ПЛЦ контролера су израчунавање
кинематике, креирање импулсних излаза велике
[38] Chand, R., Chand, R.P., Assaf, M., Naicker, P.R.,
брзине за корачне моторе и имплементација
Narayan, S.V. and Hussain, A.F.: Embedded операција секвенце за одређену примену. Функције
FPGA-based motion planning and control of a dual- се уписују у сегменте потпрограма. Када је
arm car-like robot, in 2022 IEEE 7th Southern
потребно, главни програм укључује само
Power Electronics Conference (SPEC), pp. 1–6, одговарајућу заставицу за извршавање потпрограма.
IEEE, Nadi, Fiji, 2022. Коришћењем унапред написаних потпрограма,
[39] Gürsoy, H. and Efe, M.Ö.: Control system логички низ за имплементацију апликације Пицк
implementation on an FPGA platform, IFAC- анд Плаце се лако имплементира и описује у овом
PapersOnline, Vol. 49, No. 25, pp. 425–430, 2016. раду. ПЛЦ програм је развијен за контролу СЦАРА
[40] Wu, K., Krewet, C., and Kuhlenkötter, B.: Dynamic робота са три ротационе спојнице. Корачни мотори
performance of industrial robot in corner path with покрећу зглобове робота. Делта ДВПСВ2 ПЛЦ се
CNC controller. Robotics and Computer-Integrated користи за дизајнирање роботског контролера. Ова
Manufacturing, Vol. 54, pp. 156-161, 2018. серија ПЛЦ-а има четири брза импулсна излазна
https://doi.org/10.1016/j.rcim.2017.11.008 пина, што је погодно за овај пројекат. Синхроно
[41] Köse, I., Öztürk, S., and Kuncan, M.: Pantography кретање корачних мотора се лако изводи
application with real-time plc based on image коришћењем команди за брзи импулсни излаз
processing in gantry robot system, European уграђених у ПЛЦ програм. Експериментални
journal of technique (EJT), Vol. 9, No. 2, pp. 219- резултати управљања роботском руком су показали
229, 2019. https://doi.org/10.36222/ejt.621558 ефикасност и тачност развијеног програма.
Проблеми кинематике напред и инверзне
[42] Öztürk, S., and Kuncan, F.: Linear Delta Robot кинематике роботске руке су верификовани
Controlled with PLC Based On Image Processing. коришћењем симулатора у софтверу. Зглобови
Kocaeli Journal of Science and Engineering, Vol. 5, робота се померају синхроно како је потребно за
No. 2, pp. 150-158, 2022. https://doi.org/10.34088 обављање апликација за бирање и постављање.
/kojose.1058559

236 ▪ VOL. 52, No 2, 2024 FME Transactions

You might also like