![ActivMedia Robotics Pioneer 2 TCM2 Скачать руководство пользователя страница 12](http://html1.mh-extra.com/html/activmedia-robotics/pioneer-2-tcm2/pioneer-2-tcm2_manual_2843941012.webp)
TCM2 Operation and Programming
8
Table 3-2 TCM2 P2OS Command Set
P2OS
Command
Argument
(TCM2
Command)
Action
0
Module off (software only; not low-power standby)
1
Compass only (default); reading in standard SIP
2
Send single TCM2 SIP
45
(TCM2)
3
Send TCM2 SIPs continuous (~5 Hz)
4
Enable user calibration
5
Enable auto calibration
6
Stop calibration and send one TCM2 SIP, then revert to
default mode 1.
7
Soft reset (cycle power to hard reset)
Mode 0
Disable the TCM2 servers by sending the TCM2 P2OS command 45 with a 0 argument. For example,
from the Saphira Colbert interaction window, type:
sfRobotComInt(45,0);
In mode 0, the TCM2 Module’s P2OS servers are disabled, but not necessarily the Module itself.
Use mode 0 when you disconnect the Module from the robot, or when you power it down by sliding the
RADIO power switch off. Also, put the P2OS TCM2 servers in disabled mode 0 when you control and
query the Module with the alternative TTY2 and GETAUX P2OS features (see next section).
Using the P2OS configuration utility,
p2oscf
, reset the
compass
parameter value to 0 and save the
setting to the microcontroller EEPROM to permanently disable the TCM2 P2OS servers. Change the
compass parameter value to 2 to enable the TCM2 servers in P2OS version 1.6 or later.
Default Mode 1
By default, after startup or RESET, or when disconnected from or first connected to a client, the
TCM2 Module reverts to mode 1. When in mode 1, the P2OS TCM2 servers only read the Module’s
compass. That compass reading relative to magnetic north gets included in the standard Server
Information Packet (SIP) that P2OS regularly sends to the connected client. Saphira version 6.2, for
example, displays the compass reading as part of the robot information segment of its main GUI window
(Comp: in Figure 3-1).
Appendix A contains the standard SIP details. The compass value has a ±2° precision.
Modes 2 and 3; TCM2 Server Information Packet
Your Pioneer 2-connected client software may request more detailed information from the TCM2
Module. In response to the TCM2 P2OS command 45 from a connected client, the TCM2 server will
send one (command argument 2) or a continuous stream (command argument 3) of a special Server
Information Packet containing compass, inclinometer, magnetometer, and thermometer readings (Table 3-
3).
Details about the meaning and precision of the TCM2 values are found in
the TCM2 User’s Manual
that came with the Module. You may also change the units for the values by configuring the Module with
the TCM2 software or by sending discrete TCM2 commands via the P2OS TTY2 command.