DATE: 10/Oct./2006 Communication Protocol Specification For SCIP2.0 Standard All Page Modified X8 Web Link, LED blinking after changed to SCIP2.0, MDMS-Command explanation, Bit rate as a standard.
Table of Contents 1. Introduction 2. Switching to SCIP2.0 3. Changing the Default Settings 4. Interface and Settings 5. Measurement Direction and Points 6. Data Encoding and Decoding 2-Character Encoding 3-Charater Encoding 4-Character Encoding 7. Communication Format 8. Sensor Commands MDMS-Command GDGS-Command BM-Command QT-Command RS-Command TM-Command SS-Command CR-Command HS-Command DB-Command VV-Command PP-Command II Command 9.
1. Introduction SCIP2.0 standard is developed by sensor interface research group*1 with the aim of providing flexible and efficient sensor interfacing for robotic applications. This document describes communication system in SCIP2.0 and applicable to all sensors*2 compatible with this standard. *1 Intelligent Robot Laboratory, University of Tsukuba (http://www.roboken.esys.tsukuba.ac.jp) *2 For details see, H. Kawata, W. Santosh, T. Mori, A. Ohya and S.
. Interface and Setting Sensor is equipped with RS232C and/or USB for interfacing with an external device, the Host. Communication can be done via any one of these interfacing channels. In sensors having both interfaces if host and sensor is connected with both channels, USB connection will have the priority. It is also possible to switch between USB and RS232C connection by plugging and unplugging the USB cable on the sensor side even when the sensor is operating.
. Measurement Direction and Data Points This section gives some basic information on sensor’s measurement parameters. These parameters are important when reading the measurement data from sensor. Figure 1 shows sensor’s measurement details. The scanner rotates in an anti-clockwise direction when viewed from top. Detection Range (E) is maximum angle the sensor scans for measurement. Angular Resolution is defined as the 360degree divided by the Slit Division (F). Measurement points are called Steps.
. Data Encoding and Decoding Sensor’s data are encoded to reduce the transmission time between host and sensor. These data should be decoded at the host side before processing them. There are three types of encoding technique applied in the sensor depending upon the data size. 5.1 Two-Character Encoding 5.2 Three-Character Encoding 5.3 Four-Character Encoding 6.1 Two-Character Encoding This encoding technique is applied to express data having maximum length of 12 bits.
6.2. Three-Character Encoding This encoding technique is applied to express data having maximum length of 18 bits. Encoding is done by separating data into upper, middle and lower 6 bits and then 30H is added to convert them into ASCII characters. Figure 4 and 5 shows the Three-Character encoding and decoding example.
6.3. Four-Character Encoding This encoding technique is applied to express data having maximum length of 24 bits. Encoding is done by separating data into four parts of 6 bits each and then 30H is added to convert them into ASCII characters. Figure 6 and 7 shows the Four-Character encoding and decoding example.
7. Communication Format Sensor and host exchange data using set of predefined commands. These commands have specific format known as communication format. Figure 8 and 9 shows the basic communication format between host and sensor in SCIP2.0. Communication is initiated form host by sending a Command that consists of Command-Symbol, Parameter, String Characters followed by line feed or carriage return or both.
8. Sensor Commands Sensor commands are predefined codes in communication format (see section 6). Host and sensor exchange data using these commands. There are 13-types of predefined sensor commands in SCIP2.0. NOTE: Host can send multiple commands at one time to sensor and sensor replies to each command progressively. However sensor will not accept multiple commands of same type sent at once. In such case sensor will reply only once and sends error code thereafter.
(SENSOR → HOST) When Status is not ‘99’ or ‘00’ M D or S Starting Step Number of Scans Status LF Sum End Step Cluster Count String Characters LF Scan Interval LF LF (SENSOR → HOST) M D or S Starting Step Number of Scans 0 0 LF P End Step Cluster Count String Characters LF Scan Interval LF LF Transmitted only once even for commands with multiple numbers of scan after receiving MDMS-Command during normal operation.
Time Stamp: Sensor has 24bit internal timer with 1msec resolution. Time stamp is a timer value at 0th step of every scan (Figure 1). Received Time Stamp is Four-Character encoded data (see section 5). Note: Measurement data may contain error codes under certain circumstances. Table 3 and 4 shows the list of error codes and error details.
8.2 [GDGS-Command] Whenever sensor receives this command it supplies the latest measurement data to the host. If the laser is switched off, it should be switched on by sending BM-Command (see section 7.2) before the measurement. Laser should be switched off if necessary by sending QT-Command (see section 7.3) after measurement is complete.
8.3 [BM-Command] This command will illuminate the sensor’s laser enabling the measurement. When sensor is switched on in SCIP2.0 mode or switched to SCIP2.0 by command the laser is initially in off state by default. In this state sensor can not perform the measurement. Laser state can be verified by green LED on the sensor. Laser is off if the LED blinks rapidly and it is ON when LED glows continuously.
8.6 [TM-Command] This command is used to adjust (match) the host and sensor time. Sensor should be switched to adjust mode before requesting its time and mode should be switched off after the adjustment. When the sensor is in adjustment mode laser is switched off and it will not accept any other commands unless the mode is terminated. Sending multiple TM Command with different string lengths and comparing the time can estimate average data transmission time between sensor and host.
8.7 [SS-Command] This command will change the communication bit rate of the sensor when connected with RS232C. (HOST → SENSOR) S (53H) S (53H) Bit Rate (6 byte) String Characters LF Bit Rate: 019200 --- 19.2 Kbps 038400 --- 38.4 Kbps (Some sensor models may not be compatible to this speed) 057600 --- 57.6 Kbps. 115200 --- 115.2 Kbps. 250000 --- 250.0 Kbps 500000 --- 500.0 Kbps 750000 --- 750.0 Kbps.
8.8 [CR-Command] This command is used to adjust the sensor’s motor speed. When multiple sensors are used in the same environment their motors can be made to run at different speed to avoid light interference using this command. Note: UTM-30LX is not compatible to this command. (HOST → SENSOR) C (43H) R (52H) Speed Parameter (2 byte) String Characters LF Speed Parameter: 00 --- Default Speed. 01 ~ 10 --- Changes speed to 10 different levels. 99 --- Reset to initial speed.
8.9 [HS-Command] This command will switch between high sensitivity and normal sensitivity modes. Sensor’s detection ability will increase about 20% in the high sensitivity mode. However there may be chances of measurement errors due to strong reflective objects near 22m. Note: This command is not compatible in all versions of UTM-30LX and URG-04LX with firmware versions earlier than 3.2.00.
8.10 [DB-Command] This command will simulate the malfunction of the sensor (see Annex A). Depending upon the sent parameter sensor responds to the malfunction of MDMS, GDGS, BM and II Commands. If the parameters is ‘01’ or ‘02’ sensor immediately simulates the malfunction. In case the parameters is ‘03’, ‘04’ or ‘05’ sensor will respond after sending the MDMS-Command having scan count more than 20 with malfunction during continuous mode.
8.11 [VV-Command] Sensor transmits version details such as, serial number, firmware version etc on receiving this command. . (HOST → SENSOR) V (56H) V String Characters LF . (SENSOR → HOST) V V String Characters Vendor Information ; LF Sum 0 0 P LF LF Product Information ; Sum LF Firmware Version ; Sum LF Protocol Version ; Sum LF Sensor Serial Number ; Sum LF LF Example: V V [LF] 0 0 P [LF] VEND: Hokuyo Automatic Co., Ltd;[ [LF] PROD: SOKUIKI Sensor URG-04LX; [ [LF] FIRM: 3.
8.12 [PP-Command] Sensor transmits its specifications on receiving this command. . (HOST → SENSOR) P (56H) P String Characters LF .
8.13 [II-Command] Sensor transmits its running state on receiving this command. . (HOST → SENSOR) I (49H) I String Characters LF . (SENSOR → HOST) I I String Characters LF ; Sum Sensor Model 0 0 P LF LF Laser illumination state ; Sum LF Motor Speed ; Sum LF Measurement Mode ; Sum LF Bit Rate for RS232C ; Sum LF Time Stamp ; Sum LF Sensor Diagnostic ; Sum LF LF Example: II [LF] 0 0 P [LF] MODL: URG-04LX (Hokuyo Automatic Co., Ltd.
9. Response to Invalid Commands Whenever sensor receives undefined commands or without valid parameters in it, the error status will have one of the following values. Error Status: 0A --- Unable to create transmission data or reply command internally. 0B --- Buffer shortage or command repeated that is already processed 0C --- Command with insufficient parameters 1 0D --- Undefined Command 1 0E --- Undefined Command 2 0F --- Command with insufficient parameters 2.
Annex A: Example of error status during continuous measurement mode. Transmit DB-Command (Only for simulation) Transmit MD-Command Normal Remaining Scan Count Error Status Diagnostics Error Detection Diagnosis time approx. 6 sec Normal Operation Confirmed Return to Normal Status Normal Normal » Diagnostics » Normal TITLE Communication Protocol Specification For SCIP2.0 DRAWING NO.
Transmit DB-Command (Only for simulation) Transmit MD-Command Normal Remaining Scan Count Reset to 0 Error Status Malfunction Status Diagnostics Error Detection Diagnosis time approx. 20 sec Malfunction Confirmed Error II, BM and MD-Command Also Transmit Error Status Normal » Diagnostics » Error Transmit DB-Command (Only for simulation) Transmit MD-Command Normal Remaining Scan Count Reset to 0 Normal Status Error Status Malfunction Confirmed Diagnosis time approx. 0.