Programming manual for Meca500 (for firmware 9.2.x)
65
COMMUNICATING OVER CyCLIC PROTOCOLS
The following sequence must be followed:
•
Initially (at application startup), clear both the MoveID and SetPoint fields.
•
Then, to add a motion command to the robot's motion queue,
– set the MotionCommandID to the value corresponding to the desired command,
– enter the desired values for the command arguments,
– change MoveID to a different non-zero integer value,
– set SetPoint to 1.
•
To stop the robot immediately, set the PauseMotion bit or the ClearMotion bit.
Remember that the MoveID and MotionCommandID fields, as well as the command arguments
must not be changed until the robot acknowledges the previous motion command, by returning the
corresponding MoveID in its cyclic data.
3.3.4 Sending cyclic motion commands (velocity mode)
The only cyclic motion commands are the three velocity mode commands:
MoveJointsVel
,
MoveLinVelWrf
,
MoveLinVelTrf
. They can be sent every cycle, with MoveID kept at 0 and SetPoint set
to 1.
The following sequence must be followed:
•
Initially (at application startup), clear both the MoveID and SetPoint fields.
•
To start moving the robot,
– set MotionCommandID to the ID corresponding to the desired velocity mode command,
– enter the desired values for the command six arguments.
– set SetPoint to 1.
•
To change the velocity at any time (at every cycle, if needed), simply change the six arguments of
the command.
•
To stop the robot, you must reset SetPoint to 0.
Using position mode Command IDs in cyclic mode (i.e.,
MoveJoints
, with
MoveID
set to 0, and
SetPoint
set to 1) will quickly fill up the motion queue with copies of the same command, one
per cycle, which is certainly not the desired result.
3.4. Cyclic data that can be sent to the robot
The protocols' cyclic data contains the following fields for data that can be sent to the robot, allowing to
perform the commands and actions described above.
See Sections 4–6
for detailed protocol-specific information about each field (like bit-offset, or protocol-
specific identifier). Below is the detailed description of each field that applies to the cyclic protocols.
3.4.1 Robot control
lists the fields that control the status of the robot.