This interface specification describes how an RS-232 serial enabled device can communicate with the PM2+ Monitor. An external device can receive distance, pace, time and heart rate information from the PM2+. The document is intended to aid experienced programmers who already possess a working knowledge of a programming language and RS-232 communication.
Requirements
To interface with a PM2+ Monitor running with microcode v141 or v138, an RS-232 device needs to be set to run at 9600 baud, 8bits, no parity, with one stop bit. Connect the serial cable to the top jack on the back of the PM2+ Monitor as it would be connected if you were using E-Row. Please make sure the serial communication is set up on your machine.
Contents
This document first outlines the commands and data formats that are supported by the PM2+ Monitor. A description of the status byte follows at the end of this section. Following this section is an example of serial communication between a PC and the PM2+.
Two examples of sample code are included with this document. The first sample is PALM source code that has been used in a Palm application. The second example is a Windows based routine that has been compiled and run under Borland C++ Builder 4.0. These examples are meant to illustrate the interface protocol and are not meant to be examples of exemplary programming.
At the end of this document is a description of the physical connections that describes how to physically connect the PM2+ to a PC. A serial cable should have been included with your purchase of a PM2+, but additional cables can be ordered from Concept2.
Concept2 Interface Specification Support
Support will be provided solely through an online forum/web page, FAQ or through email. Concept2 does not provide support for the PM2+ interface specification.
Command/Data Sequences
The notation "0x" followed by two numbers or letters (A–F) indicates a hexadecimal byte value.
| Send | Receive | Distance |
|---|---|---|
| 0xB0 | To receive distance data from the PM2+, send these bytes. | |
| 0x00 | ||
| Status Byte DistanceLSB Distance1 Distance2 Distance MSB |
See Status Byte Info Floating point representation of distance in meters. |
| Send | Receive | Pace |
|---|---|---|
| 0xB1 0x00 |
To receive pace data from the PM2+, send these bytes. |
|
| Status Rate PaceLSB Pace1 Pace2 PaceMSB |
Integer representation of stroke rate in Strokes/min. Floating point representation in seconds/meter. |
| Send | Receive | Time |
|---|---|---|
| 0xB3 0x00 |
To receive elapsed time data from the PM2+, send these bytes. |
|
| Status Byte TimeLSB Time1 Time2 TimeMSB |
Floating point representation of elapsed time in seconds. |
| Send | Receive | Heart Period |
|---|---|---|
| 0xB2 0x00 |
To receive heart period data from the PM2+, send these bytes. |
|
| HrLSB HrMSB |
Integer representation of heart period. Heart rate = 576,000/heart period. |
| Status Byte | Mask | First Byte received in a distance query |
|---|---|---|
| END_OF_WORKOUT END_OF_STROKE WORK_DISTANCE WORK_TIME LOW_BATTERY |
0X01 0X02 0X04 0X08 0X40 |
If set, end of workout has been reached If set, end of stroke has been reached If set, erg is set for a distance workout If set, erg is set for a time workout If set, get a new battery |
|
The only bits that need to be monitored are END_OF_STROKE, END_OF_WORKOUT and WORK_DISTANCE. The other bits are used to run a race, which is not covered in a published specification. Updates to erg PACE occur at the end of each stroke, so monitor the END-OF_STROKE status bit to know when to read this value. You can read pace continuously, but it only changes once per stroke. The END_OF_STROKE status bit is cleared when the pace value is read. It is reset on the next end of stroke event. If the erg has been set for a distance workout (WORK_DISTANCE is set), you will need to monitor the END_OF_WORKOUT bit. When this bit is set, the value in the distance field (normally distance during the workout) will now report the actual time to complete the specified distance in seconds. This situation only occurs at the end of a distance workout. See example of serial communication. |
||
Sample PM2+ Communication
Get distance, pace and heart rate data from PM2+
| Send | Receive | Pace |
|---|---|---|
| 0xb0 0x00 |
Query Distance Erg number (always zero for a single erg) |
|
| 0xc4 0xcb 0x00 0x2c 0x42 |
erg status: (distance workout) float distance float distance float distance float distance (43.0 meters complete) |
|
| 0xb1 0x00 |
Query Stroke Pace Erg number |
|
| 0x2d 0x9a 0x41 0x51 0x3e |
erg stroke rate float pace float pace float pace float pace (0.2) |
|
| 0xb2 0x00 |
Query Heart Rate Erg number |
|
| 0x00 0x00 |
int heart period int heart period (0) |
|
| 0xb0 0x00 |
Query distance Erg number (always zero for a single erg) |
|
| 0xc5 0x40 0xa1 0xc9 0x41 |
erg status: (distance workout) (end of workout) float distance float distance float distance float distance (25.2*) *Note: This value is seconds to complete the workout distance because this is at the end of a distance workout. |
Physical Connections
When viewed from the back of the PM2+, the following table describes the pins for the top communication jack, J2, where pin 1 is the right most pin. The table also assumes the use of the Concept2 provided cable and computer serial port connectors (either 9 pin or 25 pin).
| PM2+ RJ-11 Pin | PM2+ Signal Description | DTE Signal Description | RS232 9 Pin (DTE device) |
RS232 25 Pin (DTE device) |
|---|---|---|---|---|
| 1 | +12V (see note) | n/c | n/c | |
| 2 | Signal Ground Common | Signal Ground Common | 5 | n/c |
| 3 | Received Data | Transmitted Data (TD) | 3 | 2 |
| 4 | Transmitted Data | Received Data (RD) | 2 | 3 |
| 5 | Signal Ground Common | Signal Ground Common | n/c | 7 |
| 6 | 12V Return (see note) | n/c | n/c | |
| Note: When powered by an external 9 volt power supply, the RJ-11 pins 1 and 6 are used to supply 12V to power downstream PM2+'s that are daisy chained together. Since this power supply is not normally used, a standard 4 pin RJ-11 phone line can be used instead of the 6 pin cable supplied with the PM2+. | ||||
Equations
Power (watts) = 2.80 / Pace (sec/meter)³
The calories are calculated from the power (in watts) assuming a 25% efficiency in conversion of human energy to flywheel energy and a 300 calories/per hour cost to move the body up and down the slide (this is based on a 175 lb person):
Kcals/hr = Power (watts) x (4.0 x 0.8604 Kcals/watt) + 300 Kcals/hr