a)
Serial communication
To establish serial communication successfully
between the PC and the robot’s built-in controller, some of the I/O parameters
on the robot’s X-SEL controller need to be edited using the “PC interface
software for X-SEL controller”. The figure below shows a snapshot of the I/O parameter
window on the software.
The table below lists the X-SEL controller remote communication
parameters and their set values. A USB cable is used to connect the PC to the
robot.
|
Parameter No.
|
Value
|
Description
| |
90
|
2
|
Select IAI Protocol B
| |
91
|
153
|
Set the station number to 153
| |
92
|
2
|
Set the baud rate to 38.4 kbps
| |
93
|
8
|
Set the data length to 8
| |
94
|
1
|
Set the stop bit length to 1
| |
95
|
0
|
Set the
parity type to None
|
The command sent from the PC has to
follow the format shown in the figure below. For
example, if we want to move the axes to home position, the command string
‘!992330700000000@@’ will be sent, and if we want to move X and Y axes to
coordinates 200 and 200 mm, the command string ‘!9923403001E001E012C00030D4000030D40@@’ will be sent. The X-SEL
controller commands are described in [ “X-SEL Serial Communication Protocol Specification,” IAI AMERICA Inc., Ninth Edition, 2010].
|
Header
(start)
|
Station
number
|
Massage ID
|
Content of command
|
SC
(checksum)
|
CR
(End)
|
LF
(End)
|
b)
Controlling program
The controller program is designed to
work as an open-loop control system. In this system we do not request the
current position from the robot. By doing so we reduced the system complexity
and the required time to complete the process. In general the
control program is designed to do the following: ·
Establish serial communication with the robot. ·
Turn on the axes’ motors. ·
Move the end-effector to home position. ·
Load the image matrix file. ·
Scan the matrix and draw the picture.
The scanning of the binary image matrix is done
row by row. Based on the pixel value from the matrix, a command string is
dynamically generated and sent to the robot. The pen is moved down on the paper
for every black pixel and moved up for every white pixel, unless the pen has
been down or up previously. The next flowchart demonstrates the
algorithm of the control program. And the table
below explains the axes’ arrangement.
|
Robot axis
|
Function
|
Target
|
|
X
|
Moving
the paper forward and backward
|
Pictures’
rows
|
|
Y
|
Moving
the pen right and left
|
Pictures’
columns
|
|
Z
|
Moving
the pen up and down
|
Pen
down and up
|
The robot speed is chosen to be
coordinated with pauses in the control program. These pauses will allow the
previous command to be executed before the next command is sent. The table able below
presents the moving characteristics of the commands.
|
Speed
|
Acceleration
|
Deceleration
| |
500 mm/s
|
0.3G
|
0.3G
|
|
|