Mecademic Meca500 R3 Owner's manual

MECA500 (R3 & R4)
PROGRAMMING MANUAL
For Firmware Version 9.2.x
Document Revision: 1
November 2, 2022

The information contained herein is the property of Mecademic and shall not be reproduced
in whole or in part without prior written approval of Mecademic. The information herein
is subject to change without notice and should not be construed as a commitment by
Mecademic. This manual will be periodically reviewed and revised.
While every effort has been made to ensure accuracy in this publication, no responsibility
can be accepted for errors or omissions. Data may change, as well as legislation, and you
are strongly advised to obtain copies of the most recently issued regulations, standards, and
guidelines.
This document is not intended to form the basis of a contract.
© Copyright 2015–2022 Mecademic

Programming manual for Meca500 (for rmware 9.2.x) i
CONTENTS
1. BASIC THEORY AND DEFINITIONS.................................................................................................................1
1.1. Definitions and conventions .........................................................................................................................1
1.1.1 Units .........................................................................................................................................................................1
1.1.2 Joint numbering.......................................................................................................................................................1
1.1.3 Reference frames.....................................................................................................................................................1
1.1.4 Pose and Euler angles .............................................................................................................................................2
1.1.5 Joint angles and joint 6 turn configuration .............................................................................................................3
1.1.6 Joint set and robot posture......................................................................................................................................4
1.2. Configurations, singularities and workspace ..............................................................................................4
1.2.1 Inverse kinematic solutions and configuration parameters ...................................................................................4
1.2.2 Automatic configuration selection...........................................................................................................................7
1.2.3 Workspace and singularities....................................................................................................................................8
1.2.4 Crossing singularities with linear Cartesian-space movements............................................................................9
1.3. Key concepts for Mecademic robots ..........................................................................................................11
1.3.1 Homing ...................................................................................................................................................................11
1.3.2 Recovery mode ....................................................................................................................................................... 12
1.3.3 Blending .................................................................................................................................................................12
1.3.4 Position and velocity modes...................................................................................................................................13
2. TCP/IP COMMUNICATION.............................................................................................................................15
2.1. Motion commands ......................................................................................................................................15
2.1.1 Delay(t)...................................................................................................................................................................16
2.1.2 GripperOpen/GripperClose....................................................................................................................................16
2.1.3 MoveGripper(d).......................................................................................................................................................16
2.1.4 MoveJoints(θ1,θ2,θ3,θ4,θ5,θ6)...................................................................................................................................17
2.1.5 MoveJointsRel(Δθ1,Δθ2,Δθ3,Δθ4,Δθ5,Δθ6)................................................................................................................17
2.1.6 MoveJointsVel(θ
1,θ
2,θ
3,θ
4,θ
5,θ
6)..............................................................................................................................18
2.1.7 MoveLin(x,y,z,α,β,γ).................................................................................................................................................18
2.1.8 MoveLinRelTrf(x,y,z,α,β,γ).......................................................................................................................................19
2.1.9 MoveLinRelWrf(x,y,z,α,β,γ).....................................................................................................................................19
2.1.10 MoveLinVelTrf(x ,y ,,ωx,ωy,ωz).................................................................................................................................19
2.1.11 MoveLinVelWrf(x ,y ,,ωx,ωy,ωz)................................................................................................................................20
2.1.12 MovePose(x,y,z,α,β,γ)..............................................................................................................................................20
2.1.13 SetAutoConf(e).......................................................................................................................................................21
2.1.14 SetAutoConfTurn(e)................................................................................................................................................21
2.1.15 SetBlending(p)........................................................................................................................................................21
2.1.16 SetCartAcc(p).........................................................................................................................................................22
2.1.17 SetCartAngVel(ω)...................................................................................................................................................22
2.1.18 SetCartLinVel(v)......................................................................................................................................................22
2.1.19 SetCheckpoint(n)....................................................................................................................................................22
2.1.20 SetConf(cs,ce,cw)......................................................................................................................................................23
2.1.21 SetConfTurn(ct).......................................................................................................................................................23
2.1.22 SetGripperForce(p).................................................................................................................................................24

ii Programming manual for Meca500 (for rmware 9.2.x)
2.1.23 SetGripperRange(dclosed,dopen)...............................................................................................................................24
2.1.24 SetGripperVel(p).....................................................................................................................................................25
2.1.25 SetJointAcc(p)........................................................................................................................................................25
2.1.26 SetJointVel(p).........................................................................................................................................................25
2.1.27 SetTorqueLimits(p1,p2,p3,p4,p5,p6).........................................................................................................................26
2.1.28 SetTorqueLimitsCfg(s,m)........................................................................................................................................26
2.1.29 SetTrf(x,y,z,α,β,γ)....................................................................................................................................................26
2.1.30 SetValveState(v1,v2).................................................................................................................................................27
2.1.31 SetVelTimeout(t).....................................................................................................................................................27
2.1.32 SetWrf(x,y,z,α,β,γ)...................................................................................................................................................27
2.2. General request commands.......................................................................................................................28
2.2.1 ActivateRobot .........................................................................................................................................................28
2.2.2 ActivateSim/DeactivateSim....................................................................................................................................28
2.2.3 ClearMotion............................................................................................................................................................28
2.2.4 DeactivateRobot .....................................................................................................................................................28
2.2.5 BrakesOn/BrakesOff ..............................................................................................................................................29
2.2.6 EnableEtherNetIp(e)...............................................................................................................................................29
2.2.7 EnableProfinet(e)...................................................................................................................................................29
2.2.8 GetExtToolFwVersion..............................................................................................................................................29
2.2.9 GetFwVersion .........................................................................................................................................................29
2.2.10 GetModelJointLimits(n)..........................................................................................................................................30
2.2.11 GetProductType ......................................................................................................................................................30
2.2.12 GetRobotName.......................................................................................................................................................30
2.2.13 GetRobotSerial .......................................................................................................................................................30
2.2.14 Home ......................................................................................................................................................................30
2.2.15 LogTrace(s).............................................................................................................................................................31
2.2.16 LogUserCommands(e1,e2)......................................................................................................................................31
2.2.17 PauseMotion...........................................................................................................................................................31
2.2.18 ResetError..............................................................................................................................................................31
2.2.19 ResetPStop.............................................................................................................................................................32
2.2.20 ResumeMotion .......................................................................................................................................................32
2.2.21 SetCtrlPortMonitoring(e).......................................................................................................................................32
2.2.22 SetEob(e)................................................................................................................................................................33
2.2.23 SetEom(e)...............................................................................................................................................................33
2.2.24 SetExtToolSim(e)....................................................................................................................................................33
2.2.25 SetJointLimits(n,θn,min,θn,max).................................................................................................................................34
2.2.26 SetJointLimitsCfg(e)...............................................................................................................................................34
2.2.27 SetMonitoringInterval(t).........................................................................................................................................34
2.2.28 SetNetworkOptions(n1,n2,n3,n4,n5,n6).....................................................................................................................35
2.2.29 SetOfflineProgramLoop(e).....................................................................................................................................35
2.2.30 SetRealTimeMonitoring(n1,n2,...)...........................................................................................................................35
2.2.31 SetRobotName(s)...................................................................................................................................................36
2.2.32 SetRecoveryMode(e)...............................................................................................................................................37
2.2.33 SetRtc(t)..................................................................................................................................................................37
2.2.34 StartProgram(n).....................................................................................................................................................38

Programming manual for Meca500 (for rmware 9.2.x) iii
2.2.35 StartSaving(n).........................................................................................................................................................38
2.2.36 StopSaving..............................................................................................................................................................38
2.2.37 SyncCmdQueue(n)..................................................................................................................................................39
2.2.38 SwitchToEtherCat...................................................................................................................................................39
2.2.39 TcpDump(n)............................................................................................................................................................39
2.2.40 TcpDumpStop .........................................................................................................................................................39
2.3. Data request commands ............................................................................................................................40
2.3.1 GetAutoConf ...........................................................................................................................................................40
2.3.2 GetAutoConfTurn....................................................................................................................................................40
2.3.3 GetBlending............................................................................................................................................................40
2.3.4 GetCartAcc .............................................................................................................................................................40
2.3.5 GetCartAngVel........................................................................................................................................................41
2.3.6 GetCartLinVel .........................................................................................................................................................41
2.3.7 GetCheckpoint........................................................................................................................................................41
2.3.8 GetConf...................................................................................................................................................................41
2.3.9 GetConfTurn ...........................................................................................................................................................41
2.3.10 GetGripperForce.....................................................................................................................................................42
2.3.11 GetGripperRange ...................................................................................................................................................42
2.3.12 GetGripperVel.........................................................................................................................................................42
2.3.13 GetJointAcc ............................................................................................................................................................42
2.3.14 GetJointLimits(n)....................................................................................................................................................42
2.3.15 GetJointLimitsCfg ..................................................................................................................................................43
2.3.16 GetJointVel .............................................................................................................................................................43
2.3.17 GetMonitoringInterval............................................................................................................................................43
2.3.18 GetNetworkOptions................................................................................................................................................43
2.3.19 GetRealTimeMonitoring.........................................................................................................................................44
2.3.20 GetTorqueLimits.....................................................................................................................................................44
2.3.21 GetTorqueLimitsCfg ...............................................................................................................................................44
2.3.22 GetTrf......................................................................................................................................................................44
2.3.23 GetVelTimeout........................................................................................................................................................44
2.3.24 GetWrf.....................................................................................................................................................................44
2.4. Real-time data request commands ...........................................................................................................45
2.4.1 GetCmdPendingCount............................................................................................................................................46
2.4.2 GetJoints ................................................................................................................................................................46
2.4.3 GetPose ..................................................................................................................................................................46
2.4.4 GetRtAccelerometer(n)..........................................................................................................................................46
2.4.5 GetRtc.....................................................................................................................................................................47
2.4.6 GetRtCartPos .........................................................................................................................................................47
2.4.7 GetRtCartVel...........................................................................................................................................................47
2.4.8 GetRtConf ...............................................................................................................................................................48
2.4.9 GetRtConfTurn........................................................................................................................................................48
2.4.10 GetRtExtToolStatus ................................................................................................................................................48
2.4.11 GetRtGripperForce .................................................................................................................................................49
2.4.12 GetRtGripperPos ....................................................................................................................................................49
2.4.13 GetRtGripperState..................................................................................................................................................49

iv Programming manual for Meca500 (for rmware 9.2.x)
2.4.14 GetRtGripperVel .....................................................................................................................................................50
2.4.15 GetRtJointPos.........................................................................................................................................................50
2.4.16 GetRtJointTorq ....................................................................................................................................................... 50
2.4.17 GetRtJointVel..........................................................................................................................................................50
2.4.18 GetRtTargetCartPos ...............................................................................................................................................50
2.4.19 GetRtTargetCartVel ................................................................................................................................................51
2.4.20 GetRtTargetConf.....................................................................................................................................................51
2.4.21 GetRtTargetConfTurn .............................................................................................................................................51
2.4.22 GetRtTargetJointPos ..............................................................................................................................................51
2.4.23 GetRtTargetJointTorq .............................................................................................................................................52
2.4.24 GetRtTargetJointVel ...............................................................................................................................................52
2.4.25 GetRtTrf ..................................................................................................................................................................52
2.4.26 GetRtValveState......................................................................................................................................................52
2.4.27 GetRtWrf.................................................................................................................................................................52
2.4.28 GetStatusGripper ...................................................................................................................................................53
2.4.29 GetStatusRobot ......................................................................................................................................................53
2.4.30 GetTorqueLimitsStatus ..........................................................................................................................................53
2.5. Responses and messages..........................................................................................................................54
2.5.1 Command error messages ....................................................................................................................................54
2.5.2 Command responses .............................................................................................................................................56
2.5.3 Status messages....................................................................................................................................................59
2.5.4 Monitoring port messages.....................................................................................................................................60
2.6. Management of errors and hardware stops ..............................................................................................62
2.6.1 Errors detected by the robot ..................................................................................................................................62
2.6.2 P-Stop 2..................................................................................................................................................................62
2.6.3 E-Stop and P-Stop 1...............................................................................................................................................62
3. COMMUNICATING OVER CYCLIC PROTOCOLS..............................................................................................63
3.1. Cyclic data...................................................................................................................................................63
3.2. Types of robot commands ..........................................................................................................................63
3.2.1 Status change commands......................................................................................................................................63
3.2.2 Triggered actions....................................................................................................................................................63
3.2.3 Motion commands.................................................................................................................................................. 64
3.3. Sending motion commands........................................................................................................................64
3.3.1 Command ID........................................................................................................................................................... 64
3.3.2 MoveID and SetPoint ..............................................................................................................................................64
3.3.3 Adding non-cyclic motion commands to the motion queue (position mode) .......................................................64
3.3.4 Sending cyclic motion commands (velocity mode)................................................................................................65
3.4. Cyclic data that can be sent to the robot....................................................................................................65
3.4.1 Robot control..........................................................................................................................................................65
3.4.2 Motion control ........................................................................................................................................................66
3.4.3 Motion parameters.................................................................................................................................................66
3.4.4 Host time ................................................................................................................................................................68
3.4.5 Brake control.......................................................................................................................................................... 68
3.4.6 Dynamic data configuration...................................................................................................................................69
3.5. Cyclic data received from the robot............................................................................................................71

Programming manual for Meca500 (for rmware 9.2.x) v
4. ETHERCAT COMMUNICATION ......................................................................................................................73
4.1. Overview......................................................................................................................................................73
4.1.1 Connection types....................................................................................................................................................73
4.1.2 ESI file ....................................................................................................................................................................73
4.1.3 Enabling EtherCAT .................................................................................................................................................73
4.1.4 LEDs .......................................................................................................................................................................73
4.2. Object dictionary.........................................................................................................................................74
4.2.1 Robot control..........................................................................................................................................................74
4.2.2 Motion control ........................................................................................................................................................75
4.2.3 Movement...............................................................................................................................................................75
4.2.4 Host time ................................................................................................................................................................76
4.2.5 Brake control.......................................................................................................................................................... 76
4.2.6 Dynamic data configuration...................................................................................................................................76
4.2.7 Robot status ...........................................................................................................................................................77
4.2.8 Motion status..........................................................................................................................................................78
4.2.9 Target joint set........................................................................................................................................................78
4.2.10 Target end-effector pose........................................................................................................................................79
4.2.11 Target configuration...............................................................................................................................................79
4.2.12 WRF ........................................................................................................................................................................80
4.2.13 TRF .........................................................................................................................................................................80
4.2.14 Robot timestamp....................................................................................................................................................81
4.2.15 Dynamic data..........................................................................................................................................................81
4.2.16 Communication mode (SDO)..................................................................................................................................83
4.3. PDO Mapping ..............................................................................................................................................83
5. ETHERNET/IP COMMUNICATION .................................................................................................................85
5.1. Connection types ........................................................................................................................................85
5.2. EDS file .......................................................................................................................................................85
5.3. Forward open exclusivity ............................................................................................................................85
5.4. Enabling Ethernet/IP..................................................................................................................................85
5.5. Output tag assembly...................................................................................................................................85
5.5.1 Robot control tag....................................................................................................................................................86
5.5.2 MoveID tag..............................................................................................................................................................86
5.5.3 Motion control tag ..................................................................................................................................................87
5.5.4 Motion command group of tags.............................................................................................................................87
5.5.5 Host time tag..........................................................................................................................................................87
5.5.6 Brake control tag....................................................................................................................................................88
5.5.7 Dynamic data configuration tag.............................................................................................................................88
5.6. Input tag assembly .....................................................................................................................................88
5.6.1 Robot status tag .....................................................................................................................................................90
5.6.2 Error code tag ........................................................................................................................................................91
5.6.3 Checkpoint tag .......................................................................................................................................................91
5.6.4 MoveID tag..............................................................................................................................................................91
5.6.5 FIFO space tag........................................................................................................................................................91
5.6.6 Motion status tag....................................................................................................................................................92
5.6.7 Offline program ID..................................................................................................................................................92

vi Programming manual for Meca500 (for rmware 9.2.x)
5.6.8 Target joint set........................................................................................................................................................92
5.6.9 Target end-effector pose........................................................................................................................................92
5.6.10 Target configuration...............................................................................................................................................93
5.6.11 WRF ........................................................................................................................................................................93
5.6.12 TRF .........................................................................................................................................................................93
5.6.13 Robot timestamp....................................................................................................................................................94
5.6.14 Dynamic data..........................................................................................................................................................94
6. PROFINET COMMUNICATION.......................................................................................................................95
6.1. PROFINET conformance class ...................................................................................................................95
6.1.1 PROFINET limitations on the Meca500 robot ........................................................................................................95
6.2. Connection types ........................................................................................................................................95
6.2.1 Limitations when daisy-chaining robots................................................................................................................95
6.2.2 PROFINET protocol over your Ethernet network................................................................................................... 95
6.3. Enabling PROFINET...................................................................................................................................96
6.4. Exclusivity of AR..........................................................................................................................................96
6.5. GSDML file ..................................................................................................................................................97
6.5.1 Meca500 modules and sub-modules..................................................................................................................... 97
6.6. Cyclic data...................................................................................................................................................97
6.7. Alarms ........................................................................................................................................................97
7. GLOSSARY ....................................................................................................................................................98

Programming manual for Meca500 (for rmware 9.2.x) vii
ABOUT THIS MANUAL
This manual describes the key concepts for industrial robots and the communication methods used with
our robots through an Ethernet-enabled computing device (IPC, PLC, PC, Mac, Raspberry Pi, etc.): using
either TCP/IP, EtherCAT, EtherNet/IP, or PROFINET protocols. To maximize flexibility, we do not use a
proprietary programming language. Instead, we provide a set of robot-related instructions, making it
possible to use any modern programming language that can run on your computing device.
The default communication protocol for the Mecademic robot is TCP/IP; it consists of a set of text-based
motion and request commands sent to and returned by the robot. Additional cyclic communication
protocols (EtherCAT, EtherNet/IP, and PROFINET) are also available and described in this manual.
However, even if you do not intend to use the TCP/IP protocol, it is necessary to read the chapter that
describes its text-based commands.
Reading the Meca500 User Manual and understanding the robot's operating principles is a prerequisite
to reading this Programming Manual.
Symbol definitions
The following table lists the symbols that may be used in Mecademic documents to denote certain
conditions. Particular attention must be paid to the warning messages in this manual.
SYMBOL DEFINITION
NOTICE. Identifies information that requires special consideration.
!
CAUTION. Provides indications that must be respected in order to avoid equipment or work (data) on the
system being damaged or lost.
!
WARNING. Provides indications that must be respected in order to avoid a potentially hazardous
situation, which could result in injury.


Programming manual for Meca500 (for rmware 9.2.x) 1
BASIC THEORY AND DEFINITIONS
1. BASIC THEORY AND DEFINITIONS
We are dedicated to technical accuracy, detail, and consistency, and use terminology that is not always
standard. It is therefore important to read this section very carefully, even if you have prior experience
with robot arms.
1.1. Definitions and conventions
1.1.1 Units
Distances that are displaced to or defined by the user are in millimeters (mm), angles are in degrees (°)
and time is in seconds (s), except for timestamps.
1.1.2 Joint numbering
The joints of the Meca500 are numbered in ascending order, starting from the base, as shown in
Figure1a.
1
2
3
4
5
6
(a) robot with all joints numbered and at zero degrees (b) robot's flange with joint 6 at zero degrees
Figure1: Robot's joint numbering and zero-degree joint positions
1.1.3 Reference frames
We use right-handed Cartesian coordinate systems (reference frames). These reference frames (according
to the original Denavit and Hartenberg convention) are shown in Figure2 (xaxes are red, yaxes are
green, and z axes are blue), but you only need to be familiar with four of them. These four reference
frames and the key term related to them are:

2 Programming manual for Meca500 (for rmware 9.2.x)
BASIC THEORY AND DEFINITIONS
•BRF: Base reference frame. Static reference frame fixed to the robot base. Its zaxis coincides with
the axis of joint 1 and points upwards, its origin lies on the bottom of the robot base, and its xaxis
is normal to the base front edge and points forward.
•WRF: World reference frame. The main static reference frame coincides with the BRF by default. It
can be defined to correspond to the BRF using the SetWrf command.
•FRF: Flange reference frame. Mobile reference frame fixed to the robot's flange (the 20-mm disk with
threaded holes at the extremity of the robot, shown in Figure1b). Its zaxis coincides with the axis
of joint 6, and points outwards. Its origin lies on the surface of the robot's flange. Finally, when all
joints are at zero, the yaxis of the FRF has the same direction as the yaxis of the BRF.
•TRF: Tool reference frame. The mobile reference frame associated with the robot's end-effector. By
default, the TRF coincides with the FRF. It can be defined with respect to the FRF with the SetTrf
command.
•TCP: tool center point. Origin of the TRF. (Not to be confused with the Transmission Control Protocol
acronym, which is also used in this document.)
Figure2: Reference frames for the Meca500
1.1.4 Pose and Euler angles
Some Meca500 commands accept pose (position and orientation of one reference frame with respect
to another) as an input. In these commands, and in the Meca500 web interface, a pose consists of a
Cartesian position, {x, y, z}, and an orientation specified in Euler angles, {α, β, γ}, according to the mobile
XYZ convention (also referred to as RxRyRz). In this convention, if the orientation of a frame F1with
respect to a frame F0is described by the Euler angles {α, β, γ}, it means that if you align a frame Fmwith
frame F0, then rotate Fm about its xaxis by αdegrees, then about its yaxis by βdegrees, and finally
about its zaxis by γdegrees, the final orientation of frame Fmwill be the same as that of frame F1.
Figure3 shows an example of specifying orientation using the mobile XYZ Euler angle convention. The
diagram on the right shows the black reference frame orientation with respect to the gray reference
frame with the Euler angles {45°, −60°, 90°}.

Programming manual for Meca500 (for rmware 9.2.x) 3
BASIC THEORY AND DEFINITIONS
Because there are infinitely many sets of Euler angles that correspond to a given orientation, the motion
commands that accept a pose as arguments, accept any numerical value for the three Euler angles (e.g.,
the set {378.34°, −567.32°, 745.03°}). However, we output only the equivalent Euler angle set {α,β,γ}, for
which −180° ≤ α ≤ 180°, −90° ≤ β ≤ 90° and −180° ≤ γ ≤ 180°. If you specify the Euler angles {α, ±90°, γ},
the controller will always return an equivalent Euler angle set in which α= 0. Thus, it is perfectly normal
that the Euler angles used to specify an orientation are not the same as the Euler angles returned by the
controller, once that orientation has been attained (see our tutorial on Euler angles).
(a) rotate 45° about the xaxis (b) rotate −60° about the new y axis (c) rotate 90° about the new z axis
Figure3: The three consecutive rotations associated with the Euler angles {45°, −60°, 90°}
The pose of the end-eector alone does not unequivocally dene the required joint angles (see
Section1.2.1).
1.1.5 Joint angles and joint 6 turn configuration
The angle associated with joint i(i = 1, 2, ..., 6), θi, will be referred to as joint angle i. Since joint 6 can
rotate more than one revolution, you should think of the joint angle as a motor angle, rather than as the
angle between two consecutive robot links.
A joint angle is measured about the zaxis associated with the given joint using the right-hand rule. Note
that the direction of rotation for each joint is engraved on the robot's body. All joint angles are zero
in the robot shown in Figure1. Note that unless you attach an end-effector with cabling to the robot
flange, there is no way of knowing the value of θ6just by observing the robot.
The mechanical limits of the first five robot joints are as follows:
−175° ≤ θ1 ≤ 175°,
−70° ≤ θ2 ≤ 90°,
−135° ≤ θ3 ≤ 70°,
−170° ≤ θ4 ≤ 170°,
−115° ≤ θ5 ≤ 115°.
Joint 6 has no mechanical limits, but its software limits are ±100 turns. Finally, define the integer ctas the
axis 6 turn configuration, so that −180° + ct360° < θ6 ≤ 180° + ct360°.
Joints can be further constrained using the SetJointLimits command.

4 Programming manual for Meca500 (for rmware 9.2.x)
BASIC THEORY AND DEFINITIONS
1.1.6 Joint set and robot posture
There are several possible solutions for joint angle values, for a desired location of the robot end-
effector with respect to the robot base (i.e., several possible sets {θ1, θ2, θ3, θ4, θ5, θ6}). The simplest way
to describe how the robot is postured, is by giving its set of joint angles. This set will be referred to as
the joint set, and occasionally as joint position.
For example, in Figure3, the joint set is {0°, 0°, 0°, 0°, 0°, 0°}, although, it could have been {0°, 0°, 0°, 0°,
0°, 360°}, and you wouldn't be able to tell the difference.
A joint set completely defines the relative poses (i.e., the "arrangement," of the seven robot links,
starting with the base and ending with the end-effector). This arrangement is called the robot posture.
Thus, the joint sets {θ1, θ2, θ3, θ4, θ5, θ6} and {θ1, θ2, θ3, θ4, θ5, θ6 + ct360°}, where −180° < θ6 ≤ 180° and
ct is the axis 6 turn configuration, correspond to the same robot posture. Therefore, a joint set has the
same information as a robot posture AND an axis 6 turn configuration.
1.2. Configurations, singularities and workspace
1.2.1 Inverse kinematic solutions and configuration parameters
Meca500's inverse kinematics generally provide up to eight feasible robot postures for a desired pose
of the TRF with respect to the WRF (Figure4), and many more joint sets (since if θ6is a solution, then
θ6±n360°, where n is an integer, is also a solution). Each of these solutions is associated with one of
eight robot posture configurations, defined by three parameters: cs, ceand cw. Each of these parameters
corresponds to a specific geometric condition on the robot posture (see Figure5):
•cs (shoulder configuration parameter):
– cs= 1, if the wrist center (where the axes of joints 4, 5 and 6 intersect) is on the "front" side of
the plane passing through the axes of joints 1 and 2 (see Figure5a). The condition cs= 1 is often
referred to as "front".
– cs = −1, if the wrist center is on the "back" side of this plane (see Figure5c).
•ce (elbow configuration parameter):
– ce= 1, if θ3 > −arctan(60/19) ≈ −72.43° ("elbow up" condition, see Figure5d);
– ce = −1, if θ3 < −arctan(60/19) ≈ −72.43° ("elbow down" condition, see Figure5f).
•cw (wrist configuration parameter):
– cw= 1, if θ5 > 0° ("no flip" condition, see Figure5g);
– cw = −1, if θ5 < 0° ("flip" condition, see Figure5i).
Figure4 shows an example all eight possible robot postures, described by the posture configuration
parameters {cs, ce, cw}, for the pose {77 mm, 210 mm, 300 mm, −103°, 36°, 175°} of the FRF with respect
to the BRF.
Figure5 shows an example of each robot posture configuration parameter, and limit conditions, which
are called singularities. Note that the popular terms front/back and elbow-up/elbow-down are misleading
as they are not relative to the robot base but to specific planes that move when some of the robot joints
rotate.

Programming manual for Meca500 (for rmware 9.2.x) 5
BASIC THEORY AND DEFINITIONS
(a) {1, 1, 1} (b) {1, 1, −1} (c) {1, −1, 1} (d) {1, −1, −1}
(e) {−1, 1, 1} (f) {−1, 1, −1} (g) {−1, −1, 1} (h) {−1, −1, −1}
Figure4: An example showing all eight possible robot postures
The robot calculates the solution to the inverse kinematics that corresponds to the desired posture
configuration, {cs, ce, cw}, defined by the SetConf command. In addition, it solves θ6by choosing the
angle that corresponds to the desired turn configuration, ct (an integer in the range ±100), defined by
the SetConfTurn command. The turn is therefore the last inverse kinematics configuration parameter.
Both the turn configuration and the set of robot posture configuration parameters are needed to
pinpoint the solution to the robot inverse kinematics (i.e., to pinpoint the joint set corresponding to the
desired pose). However, there are major differences between the turn and robot posture configuration
parameters; mainly that the change of turn does not involve singularities. This is why different
commands are used (SetConf and SetConfTurn, SetAutoConf and SetAutoConfTurn, etc.).

6 Programming manual for Meca500 (for rmware 9.2.x)
BASIC THEORY AND DEFINITIONS
(a) cs= 1, front (b) shoulder singularity (c) cs = −1, back
(d) ce = 1, elbow up (e) elbow singularity (f) ce = −1, elbow down
(g) cw= 1, noflip (h) wrist singularity (i) cw = −1, flip
Figure5: Posture conguration parameters and the three types of singularities
Though it is possible to calculate the optimal (the shortest move from current robot position) inverse
kinematic solution (commands SetAutoConf and SetAutoConfTurn), we highly recommend that you
always specify the desired values for the configurations parameters (with the commands SetConf and
SetConfTurn) for every Cartesian-coordinates motion command (i.e., MovePose and the various MoveLin*
commands), when programming your robot in online mode.

Programming manual for Meca500 (for rmware 9.2.x) 7
BASIC THEORY AND DEFINITIONS
Thus, if you are teaching the robot position and want that later its end-effector moves to the current
pose along a linear path, you need to record not only the current pose of the TRF with respect to
the WRF (by retrieving it with GetRtCartPos), but also the definitions of the TRF and the WRF (with
GetTrf and GetWrf), and finally the corresponding configuration parameters (with GetRtConf and
GetRtConfTurn). Then, when you later want to approach this robot position with MoveLin from a starting
robot position, you need to make sure the robot is already in the same robot posture configuration and
that θ6is no more than half a revolution away from the desired value. If, however, you do not need the
robot's TCP to follow a linear trajectory, then you should better get the current joint values only (using
GetRtJointPos) and later go to that robot position using the MoveJoints command, thus not having to
record and then specify the configuration parameters.
1.2.2 Automatic configuration selection
The automatic configuration selection should only be used once you understand how this selection is
done, and mainly while programming and testing. For example, when jogging in Cartesian space with
the Meca500 web interface, the automatic configuration selection is always enabled. Or, if a target
pose is identified in real-time based on input from a sensor (e.g., a camera), enabling the automatic
configuration selection will increase your chances of reaching that pose, and in the fastest way.
Figure6 illustrates how the automatic and manual configuration selections work.
MovePose
1 2
Notes:
1. SetConf(cs,ce,cw) disables AutoConf, while SetAutoConf(1) disables the desired posture setting. When SetAutoConf(0)
is executed, the new desired posture configuration will be the one corresponding to the current robot position.
2. SetConfTurn(ct) disables AutoConfTurn, while SetAutoConfTurn(1) disables the desired turn setting. When
SetAutoConfTurn(0) is executed, the new desired turn will be the one corresponding to the current value of θ6.
3. MoveJoints* ignores any desired posture or turn configuration and, inversely, has no effect on the posture and turn
configuration settings.
4. MovePose will respect any desired posture or turn configuration, as long as the desired robot position is reachable.
5. If a desired posture configuration is set, MoveLin or MoveLinRel* will be executed only if the initial and final posture
configurations are the same as the desired one, while MoveLinVel* will start being executed only if the initial posture
configuration is the same as the desired one and will stop if the robot arrives at a singularity.
6. If a desired turn configuration is set, MoveLin or MoveLInRel* will be executed only if the initial and final turn
configurations are the same as the desired one, while MoveLinVel* will start being executed only if the initial turn
configuration is the same as the desired one and will stop if joint 6 has to change its turn configuration.
7. With AutoConf enabled, the robot may change its posture if it passes via certain singularities with a MoveLin*.
8. With AutoConfTurn enabled, the robot may change its turn configuration with a MoveLin*.
MoveLin
MoveLinRelTRF
MoveLinRelWRF
MoveLinVelTRF
MoveLinVelWRF
MoveJoints3
MoveJointsRel3
MoveJointsVel35/6
SetConf/SetConfTurn
SetAutoConf/SetAutoConfTurn
4
7/8
4
Figure6: Eect of conguration parameters on robot movement commands

8 Programming manual for Meca500 (for rmware 9.2.x)
BASIC THEORY AND DEFINITIONS
Firstly (Figure6, notes 1 and 2), setting a desired posture or turn configuration (with SetConf or
SetConfTurn, respectively) disables the automatic posture or turn configuration selection, respectively,
which are both set by default. Inversely, enabling the automatic posture or turn configuration selection,
with SetAutoConf(1) or SetAutoConfTurn(1), respectively, removes the desired posture or turn
configuration, respectively. At any moment, if SetAutoConf(0) or SetAutoConfTurn(0) is executed, the
robot posture or turn configuration of the current robot position is set as the desired posture or turn
configuration, respectively.
Secondly (Figure6, note 3), the commands MoveJoints, MoveJointsRel, and MoveJointsVel ignore
the automatic and manual configuration selections. Thus, the robot may end up in a posture or
turn configuration different from the desired ones, if such were set. If you want to update the
desired configurations with the current ones, simply execute the commands SetAutoConf(0) or
SetAutoConfTurn(0).
Thirdly, MovePose respects any desired posture or turn configuration, as long as the desired robot
position is reachable (Figure6, note 4). In contrast, if automatic posture and/or turn configuration
selection is enabled, MovePose will choose the joint position, corresponding to the desired end-effector
pose, that is fastest to reach, and that satisfies the desired posture or turn configuration, if any.
Fourthly, in the case of MoveLin* commands, the desired posture and turn configurations will force the
linear move to remain within the specified configuration or turn (Figure6, notes 5 and 6). This means
that a MoveLin or MoveLinRel* command will be executed only if the posture and turn configurations
of the initial and final robot positions are the same as the desired configurations. In the case of
MoveLinVel*, the robot will start to move only if the posture and turn configurations of the initial and
final robot positions are the same as the desired configurations, and will stop if desired configuration
parameter has to change. When automatic configuration selection is enabled, a MoveLin* command may
lead to changing the posture (if passing through a wrist or shoulder singularity) or turn configuration
along the path.
Finally, note that there is currently no way of specifying only one of the posture configuration
parameters and leaving the choice of the others to the robot controller. However, there is an indirect
way to specify the elbow and wrist configurations, though this can't be done "on the fly". Indeed, if you
prefer to always stick to one of the two possible wrist configurations, you can simply limit the range of
joint 5, to either positive or non-negative values, using the command SetJointLimits. Similarly, you can
fix the elbow configuration parameter by setting the range of joint 3 to be always smaller or larger than
−arctan(60/19) ≈ −72.43°.
1.2.3 Workspace and singularities
Users often oversimplify the workspace of a six-axis robot arm as a sphere of radius equal to the reach
of the robot (the maximum distance between the axis of joint 1 and the center of the robot's wrist). The
truth is that the Cartesian workspace of a six-axis industrial robot is a six-dimensional entity: the set of
all attainable end-effector poses (see our tutorial on workspace, available on our web site). Therefore,
the workspace of a robot depends on the choice of TRF. Worse yet, as we saw in the preceding section,
for a given end-effector pose, we can generally have eight different robot postures (Figure4). Thus, the
Cartesian workspace of a six-axis robot arm is the combination of eight workspace subsets, one for
each the eight robot posture configurations. These eight workspace subsets have common parts, but
there are also parts that belong to only one subset (i.e, there are end-effector poses accessible with only
one configuration, because of joint limits). Therefore, in order to make optimal use of all possible end-
effector poses, the robot must often pass from one subset to the other. These passages involve so-called
singularities and are problematic when the robot's end-effector is to follow a specific Cartesian path.

Programming manual for Meca500 (for rmware 9.2.x) 9
BASIC THEORY AND DEFINITIONS
Any six-axis industrial robot arm has singularities (see our tutorial on singularities). However, the
advantage of robot arms like the Meca500, where the axes of the last three joints intersect at one point
(the center of the robot's wrist), is that these singularities are very easy to describe geometrically (see
Figure5). In other words, it is very easy to know whether a robot posture is close to singularity in the
case of the Meca500.
In a singular robot posture, some of the joint set solutions corresponding to the pose of the TRF may
coincide, or there may be infinitely many joint sets. The problem with singularities is that at a singular
robot posture, the robot's end-effector cannot move in certain directions. This is a physical blockage,
not a controller problem. Thus, singularities are one type of workspace boundary (the other type occurs
when a joint is at its limit, or when two links interfere mechanically).
Take the Meca500, for example, at its zero posture (Figure1). At this robot posture, the end-effector
cannot be moved laterally (i.e., parallel to the yaxis of the BRF); it is physically blocked. Technically, it
could move, but it would need to rotate joints 4 and 6 a quarter of turn in opposite directions first. Thus,
singularities are not some kind of purely mathematical problem. They represent actual physical limits.
There are three types of singular robot positions, and these correspond to the conditions under which
the configuration parameters cs, ce, and cware not defined. The most common singular robot posture
is called a wrist singularity and occurs when θ5 = 0° (Figure5h). In this singularity, joints 4 and 6 can
rotate in opposite directions at equal velocities while the end-effector remains stationary. You will run
into this singularity frequently. The second type of singularity is called an elbow singularity (Figure5f). It
occurs when the arm is fully stretched (i.e., when the wrist center is in one plane with the axes of joints 2
and3). In the Meca500, this singularity occurs when θ3 = − arctan(60/19) ≈ −72.43°. You will run into this
singularity when you try to reach poses that are too far from the robot base. The third type of singularity
is called a shoulder singularity (Figure5h). It occurs when the center of the robot's wrist lies on the axis
of joint 1. You will run into this singularity when you work too close to the axis of joint 1.
1.2.4 Crossing singularities with linear Cartesian-space movements
Although singularities can be a nuisance when controlling the robot in Cartesian space and should
usually be avoided in production mode, we have made it possible to cross them to facilitate
programming our robot. With the release of firmware 9.1, the Meca500 can start at or pass through
wrist and shoulder singularities, while executing any MoveLin* command, or end at any singularity
while executing a MoveLin* or MovePose command. Furthermore, the passage respects the posture
configuration selection settings (Figure6). Figure7 illustrates how this new feature makes it possible
to follow longer linear paths. In that figure, we start from an elbow singularity, pass through a wrist
singularity, then through a shoulder singularity, and then end at another elbow singularity, all with a
single MoveLin* command, and in AutoConf.
There are two possible situations when crossing a wrist singularity. Consider Figure8a, where AutoConf
is enabled, the robot starts from robot position A, passes without any interruption through the singular
configuration Z1 (where all joints are at zero degrees) and goes to robot position B, all with a single
MoveLin* command. In the process, the robot changes the posture parameter cw from 1 to −1. However,
if you execute SetConf(1,1,1), then request the robot to move with MoveLin* to the end-effector pose B,
starting from robot position A, the robot will refuse the motion, since that would require joint 4 to rotate
180° or −180° when reaching robot position Z1. This is impossible since the range of joint 4 is ±170°.

10 Programming manual for Meca500 (for rmware 9.2.x)
BASIC THEORY AND DEFINITIONS
Figure7: By crossing singularities, the Meca500 can execute longer linear movements
(a) A↔B via Z1, only possible with
AutoConf(1)
(b) C↔D1 via Z2, with AutoConf(1) (c) C↔D2 via Z2 and stationary
re-orientation, with SetConf(1,1, −1)
Figure8: Crossing a wrist singularity with AutoConf(1) or with a desired posture conguration
Similarly, consider Figure8b, where AutoConf is enabled, the robot starts from position C, passes
without any interruption through the singular configuration Z2 (where θ1= θ2= θ3= θ5 = 0°, θ4=90°,
θ6 = −90°) and goes to robot position D1, all with a single MoveLin command. In the process, the
robot changes posture parameter cw from −1 to 1. However, as shown in Figure8c, if you execute
SetConf(1,1,−1), then request the robot to move to the end-effector pose D1, starting from robot
position C, the robot will execute the MoveLin command, but when it reaches configuration Z2, joint4
will rotate −180° and joint6 will rotate 180°, at the same time while the end-effector will remain
stationary. After that, the robot will continue its linear motion and reach the robot position D2 (which
corresponds to the same pose as D1).
In contrast, since shoulder singularities are much less frequent, yet much more complex to handle, the
robot can currently cross them only in AutoConf. More precisely, when executing a linear move, the
robot will never stop at a shoulder singularity to reorient its joints 1, 4 and 6 while keeping the end-
effector stationary. Thus, the motion sequence shown in Figure9acannot be executed with a single
MoveLin* command, whatever the state of posture configuration selection. However, in AutoConf, you
can cross a shoulder singularity, as shown in Figure9b.
To experiment with shoulder singularities, simply execute SetTRF(0,0,−70,0,0,0), to bring the TCP at the
wrist center, then SetWRF(0,0,0,0,0,0), and then bring the TCP to a position where its coordinates xand y
are zero.
Other manuals for Meca500 R3
2
This manual suits for next models
1
Table of contents
Other Mecademic Robotics manuals

Mecademic
Mecademic MEGP 25E User manual

Mecademic
Mecademic Meca500 User manual

Mecademic
Mecademic Meca500 User manual

Mecademic
Mecademic Meca500 User manual

Mecademic
Mecademic MEGP 25E User manual

Mecademic
Mecademic Meca500 R3 User manual

Mecademic
Mecademic Meca500 (R3) Owner's manual

Mecademic
Mecademic Meca500 R3 User manual

Mecademic
Mecademic Meca500 User manual

Mecademic
Mecademic Meca500 User manual