Professional Documents
Culture Documents
Once determined data can be successfully monitored and exported to a file for decoding and
analysis.
The official signals that control the RACD were determined by monitoring the communication port
between the RACD and the Computer while the official software is running and active. When the
official software sends a movement signal for example the monitoring software acquires the sent
code and exports it to a text file.
The assumption was that a movement function for example will always result in the same code
combination once called again by the official software. This method proved to be successful when
interfacing in general unless some form of encryption was used to obscure the control commands.
The received data at first glance looked like a scrambled set of code as seen in Figure (4.2). This code
was analysed by locating at the commonalities and recursions while testing and repeating the
different commands using the official software.
For example, 4d 4f 56 45 50 05 01 0D is a command that moves the base servo motor to the left
from the current position the robotic arm is stationed in. Table 4.1 dissects the movement
command.
HEX Code
Function
4d 4f 56 45
Move command
50
05
01
Direction of movement
0D
Carriage Return
It must be taken into note that The 0D is a special ASCII character that represents a new line or
carriage return, the RACD keeps waiting for additional data when receiving a command until
Carriage return is found.
Initially the assumption was that the carriage return byte 0D was used in the end of all the
communication commands sent and received from the official software to the RACD. it was later
determined that this was true only for the case of commands being sent to the RACD. When
commands are received from the RACD the ending byte was 0A instead.
In addition, the Carriage return character was an indicator for the RACD ability to understand ASCII
raising the assumption that the monitored HEX data was ASCII code and commands. By transforming
the Hexadecimal code to its ASCII equivalent the monitored code immediately became
understandable and easier to decode with assembly like programming characteristics proving the
recursive code assumption. For example, the command 4d 4f 56 45 50 05 01 0D becomes MOVE 50
05 01 0D which is easier to decode and understand.
More commands for the different functions and modes in the official software were successfully
found and noted by repeating the previous steps.
The Robotic Arm was successfully controlled by setting up a COM port session using the found
settings and sending the noted commands and code combinations trough the COM port to the RACD
without the need for the official software.
For successful control the commands must be sent precisely as found in the decoded file, if a part
was missed or added buffer overflow might occur and the RACD will crash and require manual
reboot.
COMMAND: REMOTE 0D
Check for the states of the Robotic Arm
RETURNS:
OK Robotic Arm is ready for commands
BUSY Robotic Arm is executing a movement or not connected.
ERR An error occurred or Robotic Arm is not connected.
COMMAND: HARDHOME 0D
Calibrate the Robotic Arm and the RACD by testing the Arms physical limit setting the Arm
position and checking the arm states.
RETURNS:
The command keeps returning the feedback position of the Robotic Arm while conducting
the different boundary tests. In the end the RACD returns the final calibrated position
closing with an END message.
COMMAND: SHUTDOWN 0D
Finalize and shutdown the RACD and the Robotic Arm
RETURNS:
closing with an END message.
COMMAND: MOVE 50 Y X 0D
Move one selected joint of the robot until a stop order is initiated or arm reaches its physical
limit.
INPUT:
Y Identifies which servo motor is targeted for movement
X Identifies the direction
RETURN:
None
Y=0
Move Gripper until physical limit is reached or a stop command is ordered.
X = 1 Grippers motor conducts an opening movement
X =-1 Grippers motor conducts a closing movement
Y=1
Rotate gripper physical limit is reach or a stop command is ordered
X = 1 Grippers rotates to the right
X =-1 Grippers rotates to the left
Y=2
Move wrist until physical limit is reached or a stop command is ordered.
X = 1 Wrist motor conducts an ascending movement
X =-1 Wrist motor conducts a descending movement
Y=3
Move arm until physical limit is reached or a stop command is ordered.
X = 1 Arm motor conducts an ascending movement
Y=4
Move shoulder until physical limit is reached or a stop command is ordered.
X = 1 Shoulder motor conducts an ascending movement
X =-1 Shoulder motor conducts a descending movement
Y=5
Move shoulder until physical limit is reached or a stop command is ordered.
X = 1 Shoulder motor conducts an ascending movement
X =-1 Shoulder motor conducts a descending movement
COMMAND: STOP 0D
Override any order and immediately stop the Robotic Arm
RETURN:
None
COMMAND: FREE 0D
Free servo motors if torqued.
RETURN:
none
COMMAND: TORQUE 0D
Torque servo motors if free
RETURN:
None
COMMAND RUN 50 0 A B C D E F 0 0 1 0D
Go to required articulate position, in this command all the servo motors work together in
parallel to reach the designated location.
INPUT:
A Gripper, B Rotation, C Wrist, D Arm, E Shoulder, F Base
The 50 separates the command from the coordinates and the 0 0 1 0D are end bits
Example:
RUN 50 0 50000 50691 44054 -3195 -4660 7000 0 0 1 0D
Moves the arm to the specified coordinates where all motors run in parallel to reach
destination
RETURN:
The robotic arm returns its position when the final position is reached.
The RACD uses a special articulate coordinate system that only uses integers to define degrees and
angles. For example, 64995 in RACD articulate coordinates equal 89.9 degrees in world articulate
coordinates.
To Transform from RACD articulate coordinates to world articulate coordinates a number Linear
equations must be used. Each joint has its own linear transform equation based on its position and
characteristics.
= 0.001699 1
1
666.66667
= ( 0.0015) + 105
=
=
(4.1)
(4.2)
(4.3)
666.667
(4.4)
525
(4.5)
After finishing with the Robotic Arm, the serial port COM connected with the RACD must be shut
down by releasing the COM port object and initiating an end signal. The RACD will release the
connection from its side and shutdown.
The following function is used to terminate Matlabs connection with the COM port and release it for
final shutdown.
States = Close_Robot(Obj)
Release COM port and initiate shutdown with the RACD
INPUT: Obj COM port object
RETURN: The states of the Port
The RACD calibrates the Robotic Arm by testing the limits of all the servo motors. For example, when
calibrating the base motor, the robotic arm will rotate towards the right limit until the right base
motor limit sensor activates. Once reached the Robotic Arm will rotate towards the left limit until
the left limit sensor activates. The same process is repeated with all the servo motors ending in the
final calibrated position in Figure (4.3).
Pos= Calib_Robot(Obj)
Calibrate Robot
INPUT: Obj COM port object
RETURN: The location of the arm after calibration ideally 0,0,0,0,0
1- Cartesian System:
A coordinate system that uses Cartesian dimension (X, Y, Z) as the bases for positioning the
Robotic Arm in space. This system is complex to analyse from the RACD prospective, but easy to
visualize from a humans prospective.
The RACD built in Cartesian system processing is minimal and unpractical for position
applications. For example, the official software can only processes and initiate Cartesian
movement if the wrist angle 3 in (Figure 4.4) doesn't change and remains constant.
For the reasons mentioned new methods to solve this problem will be discussed in the next
chapter.
Position = Get_Degree_Robot(Obj)
Position = Go_Robot(Obj,Gripper,Wrist_Rotate,Wrist,Arn,Shoulder,Base)
Move Robotic Arm to designated position.
INPUT:
Obj: Object connected to the RACD COM port
Gripper: Size of gripper
Wrist_Rotate, Wrist ,Arm ,Shoulder , Base: World articulate angles for the destination
RETURN: The final position after movement.
Position = Go_Robot_Lock(Obj,Gripper,Wrist_Rotate,Wrist,Arn,Shoulder,Base)
Move Robotic Arm to designated position, lock Matlab and wait until arm reaches
designated position.
INPUT:
Obj: Object connected to the RACD COM port
Gripper: Size of gripper
Wrist_Rotate, Wrist ,Arm ,Shoulder , Base: World articulate angles for the destination
RETURN: The final position after movement.
Stop_Robot(Obj)
Stop any current movement the Robotic Arm is conduction
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
Wait_Robot(Obj)
Check if arm is moving and lock Matlab and force user to wait until arm finishes conducting
its movement.
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
mJoint_Robot(Obj)
Move one joint of the robot until a stop order is initiated or arm reaches its physical limit
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
The RACD has a number of other options that can help enhance the experience of using the Robotic
Arm. The emergency button available as a separate unit can be used as a safety measure when
pressed however the RACD remains locked until it is release by a specific command.
In addition, the servo motors in the Robotic Arm can be torqued or freed based on the application
used, for example if the application needed deals with weight it is better to set the Robotic Arm in
torque mode to give sustained power to the Robotic Arm.
The following functions represent the different modes
Emergency_Robot(Obj)
Release the RACD to continue work after the emergency button is physically released. If the
physical emergency button is still pressed an error message will be returned.
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
Release_Robot(Obj)
Release servo motors
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
Torque_Robot(Obj)
Torque servo motors
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
4.3 Conclusion
The Robotic Arm Controller Device was successfully interfaced and the Robotic Arm now can be used
independently without the Original Software.
Using the provided low level commands, the RACD can be interfaced in any system required with
any programming language specified for example C++. The only requirement is to setup a successful
connection with the parameters mentioned in the previous sections and send the commands
exactly.
For this project A Matlab library was developed and ready for use. the functions in the library handle
all the low level tasks and give the user the opportunity to focus on higher level problems.