Serial Bus Communication Protocol
This tech paper describes the serial bus communication protocol for the RTMS. This information is most useful to systems integrators.
Four pins (Tx, Rx, 2x Serial and Gnd.) provide two-way serial data communications in an isolated RS-232 interface. Signalling is asynchronous at a 9600-baud rate. The data format is binary in standard NRZ, 8 bits, 1 Stop bit, No parity. The RTMS can operate in either Normal (point-to-point) or Polled (multi-drop) mode. The serial bus is used for setup purposes and may be used operationally to get data as follows:
Every 0.1 second, a TARGETS message is showing targets in all range bins.
Every 30 seconds (or other Message Period set during setup in the range of 10-600 sec.) four blocks of data will be transmitted: VOLLONG, VOLUME, OCCUPANCY and SPEED.
All RTMS messages have the same byte format: Header, Qualifier, Length, Data1, Data2, .....DataN and Checksum.
Header is $FF, and Qualifier indicates the message type. Length denotes the number of following data bytes. All data bytes carry binary data. Checksum byte carries the checksum of all the data-bytes.
TARGETS (Qualifier = $18) is a message of 4 bytes. Each of the 32 bits indicates whether there is a target in the respective range bin. This high rate (0.1 sec) message can be turned off during the setup.
RTMSstat (Qualifier = $19) is a message of 11 bytes, containing technical diagnostic information. The message is transmitted every 5 sec. if Targets messages are On.
VOLLONG (Qualifier = $1b) is a block of 9 bytes. Each of the first 8 bytes holds the number of long-vehicles which crossed the respective zone in the preceding counting period. The 9th byte is spare. An alternate setup will produce instead of long-vehicles, average Headway in 0.1 sec units.
VOLUME (Qualifier = $10) is a block of 9 bytes. Each of the first 8 bytes holds the number of vehicles, which crossed the respective zone in the preceding counting period. The 9th byte holds a message order number which increments on every message.
OCCUPANCY (Qualifier = $11) is a block of 9 bytes. Each of the first 8 bytes holds the percentage time of vehicle presence in the respective zone in the preceding counting period. The 9th byte holds the SENSOR ID number as defined by the user.
SPEED (Qualifier = $12) is a block of 11 bytes. Each of the first 8 bytes holds the average speed of vehicles in the respective zone in the preceding counting period.
The next two bytes hold the direction and average speed for the forward-looking mode respectively (based on zones 1,2 and 3 speed-trap time and Doppler measurement). The 11th byte contains health-status information on the RTMS without diagnostics. Good values for this byte are: 10,20,30,40,50,60,70. All other values (e.g. 11, 21 etc.) indicate a problem with the unit.
POLLED V. NORMAL DATA TRANSMISSION
At the end of the Message Period, the RTMS (when in Normal or Stat Data Transmission mode) spontaneously transmits the 4 statistic messages. In the Polled mode, it does not transmit, but places the messages into a buffer. It will transmit the messages only if requested by a Data Request command, addressed to the correct SENSOR ID. If the statistical messages were not sent before the next Message Period ends, the old data is overwritten by fresh data.
DATA REQUEST (Qualifier = $8F) is a command of 1 byte, specifying the Sensor ID. In polled mode the RTMS will transmit data only if it receives this message with the correct ID and it has data in its buffer.
POLLED-BIT REQUEST (Qualifier = $90) is a command of 1 byte, specifying the Sensor ID. When received with correct ID, the RTMS will enter a Self-Test and deposit the diagnostic message with the ID in the buffer.
FLUSH-BUFFER REQUEST (Qualifier = $1F) is a command of 1 byte, indicating the Sensor ID. In polled mode, the RTMS with the right ID will clear its buffer when receiving this message. The polling computer should send this message after receiving a good set of statistical messages.
An adjunct to the Polled mode is the multi-drop communications capability. A special (opto-9) RTMS signal provides the RS-232 RTS signal to the modem, to enable its carrier only during the transmission of data. In this mode, multiple RTMS-modem pairs can hang on a single 4-wire phoneline (or 2-fibre) or several RTMS units can hang on a single modem and report data to the centre.
Direction Message Qualif.(Hex) Length(Dec) In response to:
RTMS > PC Volume 10 9 every Msg. Period (30 sec.?)
RTMS > PC Occupancy 11 9 in Normal mode
RTMS > PC Vol. Long 1b 9 or if Data Request with proper
RTMS > PC Speed 12 11 Sensor ID received in Polled mode.
RTMS > PC Targets 18 4 every 0.1 sec. in Normal mode only.
RTMS > PC RTMSstat 19 11 every 5 sec. in Normal mode only.
RTMS > PC Diagnostic 08 3 to BIT Request
RTMS > PC Diagnostic 1d 3 to P.BIT Request
RTMS > PC ACK 1c 0 messages received correctly
RTMS > PC NAK 1a 0 messages received incorrectly
PC > RTMS BIT Req. 88 0 in Normal mode only
PC > RTMS Data Request 8f 1 in Polled mode only
PC > RTMS P.BIT Req. 90 1 in Polled mode only
PC > RTMS Buffer-Flush 1f 1 in Polled mode to flush RTMS buffer request
The Built In Test Diagnostic message (08) 3 bytes interpretation is:
bit1 (LSB) Power Supply Fault
bit 2 Modulator Signal Fault
bit 3 Microwave Module Fault
bit 4 Temperature Calibrator Fault
bit 5 Modulator Memory Fault
bit 6 DSP Fault
bit 7 Program Memory Fault
bit 8 (MSB) ADC Fault
Second and third bytes: RTMS software revision.