Chapter 3 Programming; Generic Controls; Generic Control Mode Commands - ActivMedia Robotics Pioneer 2 Arm Manual

Table of Contents

Advertisement

Programming
Programming
Pr
Pr
Pr
ogramming
ogramming
ogramming
Chapter 3
Because it is attached to the robot's microcontroller, all Pioneer 2 Arm software
commands, controls, and responses pass through the onboard operating system
software, P2OS.
provide convenient and advanced control of the Pioneer 2 Arm from your robotics
software clients. There also is a way to bypass these P2OS servers and manage the Arm
through its generic controller commands. In all cases, command and control of the
Pioneer 2 Arm needs an established client-server connection between P2OS and your
software running on a host PC.

Generic Controls

The Pioneer 2 Arm's generic controller responds to a simple set of commands that
enable/disable power to the servos and position the servo-driven joints. They also let you
query the controller software version number and accessory digital I/O.
However, the Pioneer 2 Arm's generic software has no provision for controlling joint
speeds. The servo motors adjust to their new position as fast as they can, leading to
some pretty wild swings unless you are careful. Nor, with the generic commands, can
you query for the current position of a joint. The P2OS Arm support servers, on the other
hand, give you control over joint speeds and maintain current position information, as
well as a variety of other advanced and convenient features.
recommend that you program to the P2OS Arm servers and not to the Arm's generic
command set.
The Pioneer 2 Arm's generic control protocols consist of a header byte (0xFF) followed by
a command byte and one or two command parameters. The most significant bit (b
the command byte determines the mode—set the bit for Control Mode; clear it for Servo
Positioning commands. The next three most significant bits of the command byte (b
select the board number; always 0 for the Pioneer 2 Arm. The remaining bits of the
command byte depend on the command mode.

Generic Control Mode Commands

The Pioneer 2 Arm's generic Control Mode lets you enable/disable power to the servos,
and query for the controller's software version number.
supports three digital control bits and two analog input channels. Only digital channel 0
is connected, and it controls power to the Arm's servo motors.
Table 1. Pioneer 2 Arm generic Control Mode commands
Control Mode
Command Bytes
0xFF, 0xC1
0xFF, 0xC0
0xFF, 0x80
0xFF, 0x85
Carriage return (0x0D) and line-feed (0x0A) characters.
7
10
P2OS1_H and later versions have a set of Arm-special servers that
Description
Servo Power ON
Servo Power OFF
Request version number
Read digital port states
Which is why we
The native Arm controller
Board Response
None
None
ASCII-encoded
version
7
followed by 0x0D, 0x0A
0-7 corresponding to ports 0, 1 and
2, followed by 0x0D, 0x0A
) of
7
)
4-6
number,

Advertisement

Table of Contents
loading

Table of Contents