6 v. D. Cong
6 v. D. Cong
Transform from frame 2 to frame 1: Figure 2. The kinematic diagram of the SCARA robot
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.
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
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
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: