SCIP 2.0 Commmunication Protocol
SCIP 2.0 Commmunication Protocol
/2006
X8
X6
X3
SYMBOL
APPROVED
CHECKED
DRAFTED
Maejima
Kawata
DESIGNED
Kawata
Kawata
PR5446
2,4,6,9
2007/08/03
Kawata
PR5325
2,3,4,
2006/12/08
Kawata
PR5205
3, 12
2006/11/01
Kawata
PR5181
DATE
AMENDED
DWG.NO
PAGES
TITLE
Mori
2008/03/21
DRAWING
NO.
C-42-03320B
1/25
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. Response to Invalid Commands
Annex A
TITLE
DRAWING
NO.
C-42-03320B
2/25
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. Yuta, "Development of ultra-small
lightweight optical range sensor system", IEEE/RSJ International Conference on Intelligent Robots
and Systems (IROS2005), pp.3277-3282 2005-8 Edmonton
LF
LF
(SENSOR HOST)
S
Status
LF
LF
TITLE
URG-04LX
YES
YES
YES
DRAWING
NO.
UBG-04LX-F01
NO
YES
YES
UHG-08LX
NO
NO
YES
C-42-03320B
UTM-30LX
NO
NO
NO
3/25
Parity
:None
Data Bit
:8
Stop Bit
:1
USB
Version
:2.0
Speed
Class
TITLE
DRAWING
NO.
C-42-03320B
4/25
5.
Step B
Direction of Rotation
Step C
Step D
Step A
Dead Zone
Step 0
Step 0
Step A
Step B
Step C
Step D
E
F
URG-04LX
UBG-05LX-F01
UHG-08LX
UTM-30LX
0
44
384
725
768
239.77
1024
0
44
384
725
768
239.77
1024
0
0
384
768
768
270.35
1024
0
0
540
1080
1080
270.25
1440
UTM-30LX
(Sample)
0
0
562*6
1100
1120
282.00
1440
TITLE
DRAWING
NO.
C-42-03320B
5/25
1,234 mm
0100110100102
Separation
0100112
0100102
Hexadecimal Equivalent
13H
12H
Add 30H
43H
42H
ASCII Equivalent
C
B
CB
B
Hexadecimal Equivalent
43H
42H
Subtract 30H
13H
12H
Binary Equivalent
0100112
0100102
Merge
0100110100102
Decimal Equivalent
1,234
Figure 3: 2-Character Decoding Example
TITLE
DRAWING
NO.
C-42-03320B
6/25
5,432 mm
10101001110002
Separation
0000012 0101002 1110002
Hexadecimal Equivalent
1H
14H
38H
Add 30H
31H
44H
68H
ASCII Equivalent
1
D
h
1Dh
D
h
Hexadecimal Equivalent
31H
44H
68H
Subtract 30H
1H
14H
38H
Binary Equivalent
0000012
0101002 1110002
Merge
0000010101001110002
Decimal Equivalent
5,432
TITLE
DRAWING
NO.
C-42-03320B
7/25
16,000,000 msec
1111010000100100000000002
Separation
1111012 0000102 0100002 0000002
Hexadecimal Equivalent
3DH
2H
10H
0H
Add 30H
6DH
32H
40H
30H
ASCII Equivalent
m
2
@
0
m2@0
2
@
0
Hexadecimal Equivalent
6DH
32H
40H
30H
Subtract 30H
3DH
2H
10H
0H
Binary Equivalent
1111012
0000102 0100002
0000002
Merge
1111010000100100000000002
Decimal Equivalent
16,000,000
TITLE
DRAWING
NO.
C-42-03320B
8/25
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. When sensor
receive commands it sends Reply with the Command Echo, status, sum, line feed, data related to the command,
sum and two continuous line feed as a termination code.
(HOST SENSOR)
Command Symbol
Parameter
String Characters
(Max. 16 letters)
Command
(SENSOR HOST)
Command Symbol
Parameter
String Characters
LF
Status
Sum
LF
Data
Sum
LF
LF
Command Echo
Reply
Command Symbol is 2 bytes code at the beginning of every command. Each command has specific
symbols for verification.
Parameter is information that is required to change sensor settings or to request the additional data.
String Characters are optional information in the command. They are used to verify the reply when same
command is repeated more than once, such as by sending different String Characters in each command and
checking the command echo. Maximum length of the String Characters is 16-letters made with
combination of any English letters, numbers, blank space and symbols ., _, +, @. They must be
separated by semicolon- ; -at the beginning to separate from parameter.
Line Feed (LF) or Carriage Return (CR) is terminating code. Command can have LF or CR or both as
termination code but reply will always have two continuous LF as its termination code.
Status is 2 bytes data in the reply that informs normal processing if command is authenticated or errors if
undefined, invalid or incomplete command is received by sensor. Status other than 00 and 99 are error
codes
Sum is 1 byte data used in authentication. It is calculated by adding data between two linefeeds, taking the
lower 6 byte of this sum and finally adding 30H to this sum.
Example:
[LF] Hokuyo [LF] = 48H+6fH+6bH+75H+79H+6fH = 27fH = 1001 1111112
Sum = 1111112 = 3fH+30H = 6fH = o
Data is main information related to the command. It is separated by LF and sum after every 64 bytes if
exceeds 64 bytes.
TITLE
IMPORTANT: $(24H) is a reserved letter for special mode. Do not use it in the commands.
Communication Protocol Specification
For
SCIP2.0
DRAWING
NO.
C-42-03320B
9/25
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.
Comparing the command echo and sum can identify errors in communication.
All the characters in the Command and Reply are ASCII code.
8.1 [MDMS-Command]
This is a sensor data acquisition command. Whenever sensor receives this command it transmits the eco with
status 00 followed by the reply having measurement data that was taken after the command was received.
Laser switches on automatically before the measurement and switched off after completing the number of scans
defined in the command.
(HOST SENSOR)
M (4dH)
D (44H) or S (53H)
Number of Scans
(2 bytes)
Starting Step
(4bytes)
String Characters
(max 16-letters)
End Step
(4 bytes)
Cluster Count
(2bytes)
Scan Interval
(1 byte)
LF
(1 byte)
Command symbol can be either MD or MS. MD is for three character encoded data and MS is for two
character encoded data (see section 5).
Starting Step and End Step:
Starting step and End Step can be any points between 0 and maximum step (see section 4). End Step
should be always greater than Starting step.
Example:
To obtain data from step 10 to 750.
Starting point : 0010 (30H,30H, 31H, 30H)
End Point
: 0750 (30H, 37H, 35H, 30H)
Cluster Count:
Cluster Count is the number of adjacent steps that can be merged into single data and has a range 0 to
99. When cluster count is more than 1, step having minimum measurement value (excluding error) in the
cluster will be the output data.
Example: If Cluster Count is 3 and measurement values of 3 adjacent steps in this cluster are 3059,
3055 and 3062, the received data from the sensor will be 3055.
Scan Interval and
Skipping the number of scans when obtaining multiple scan data can be set in Scan Interval. The value
should be in decimal.
Number of Scans:
User can request number of scan data by supplying the count in Number of Scan. If Number of Scan is
set to 00 the data is supplied indefinitely unless canceled using [QT-Command] or [RS-Command].
The value should be in decimal.
TITLE
DRAWING
NO.
C-42-03320B
10/25
(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
LF
End Step
Cluster Count
String Characters
LF
Scan Interval
LF
LF
D or S
Starting Step
Remaining Scans
9
Data
LF
LF
Sum
End Step
Cluster Count
String Characters
Time Stamp (4byte)
LF
Scan Interval
LF
Sum
LF
LF
When data is more than 64 bytes and terminates without remaining bytes
M
D or S
Starting Step
Remaining Scans
9
LF
LF
End Step
Cluster Count
String Characters
Scan Interval
LF
Sum
Sum
LF
--------------------------------
Sum
LF
Sum
LF
LF
LF
When data is more than 64 bytes and terminates with remaining bytes
M
D or S
Starting Step
Remaining Scans
9
LF
LF
End Step
Cluster Count
String Characters
Scan Interval
LF
Sum
LF
--------------------------------
Sum
LF
Sum
LF
Sum
LF
Sum
LF
LF
When the host requests multiple measurement data, reply from the sensor will be the number of
remaining scan (Remaining Scans) in the echo instead of Number of Scan.
Status:
00 --- Command received without any Error
01 --- Starting Step has non-numeric value.
02 --- End Step has non-numeric value.
03 --- Cluster Count has non-numeric value.
04 --- End Step is out of range.
05 --- End Step is smaller than Starting Step.
06 --- Scan Interval has non-numeric value.
07 --- Number of Scan has non-numeric value.
21~49 --- Processing stopped to verify the error.
50~97 --- Hardware trouble (such as laser, motor malfunctions etc.)
98 --- Resumption of process after confirming normal laser operation.
Data: If measurement data exceeds the maximum range the output will be the maximum value (ex. 5600)
Note:
During continuous measurement if diagnostics suspects some malfunction, data processing will be
temporarily stopped to confirm the error. Confirmation may take up to 10 sec, during this period the status
will be 21~49. If no malfunction is detected sensor resumes the measurement after transmitting the status
98. Otherwise it will transmit the corresponding error status (see Annex A for details).
TITLE
DRAWING
NO.
C-42-03320B
11/25
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.
Table 3: ERROR CODES (URG-04LX, UBG-04LX-F01, UHG-08LX)
Error Code
Error Details
Others
10~17
Others
18
19
Non-Measurable Step
TITLE
Error Details
Other Errors
DRAWING
NO.
C-42-03320B
12/25
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.
(HOST SENSOR)
G (47H)
Starting Step
(4bytes)
D (44H) or S (53H)
End Step
(4 bytes)
Cluster Count
(2bytes)
String Characters
LF
D or S
Status
2.
Starting Step
Sum
LF
End Step
Cluster Count
String Characters
LF
End Step
Cluster Count
String Characters
LF
LF
D or S
Data
3.
Starting Step
LF
Time Stamp
Sum
LF
LF
Sum
LF
When data is more than 64 bytes and terminates without remaining bytes
G
0
D or S
0
Starting Step
LF
End Step
Time Stamp
Sum
LF
------------------------------
Sum
LF
Sum
LF
4.
Cluster Count
Sum
String Characters
LF
LF
LF
When data is more than 64 bytes and terminates with n-remaining bytes
G
0
D or S
0
Starting Step
LF
End Step
Time Stamp
Cluster Count
Sum
Sum
LF
------------------------------
Sum
LF
Sum
LF
Sum
LF
String Characters
LF
LF
LF
Status:
01 --- Starting Step has non-numeric value.
02 --- End Step has non-numeric value
03 --- Cluster Count has non-numeric value.
04 --- End Step is out of range
05 --- End Step is smaller than Starting Step.
10 --- Laser is off.
50~98 --- Hardware trouble (such as laser, motor malfunction etc.)
Time Stamp:
Same as in MDMS-Command (see section 7.1)
TITLE
DRAWING
NO.
C-42-03320B
13/25
8.3 [BM-Command]
This command will illuminate the sensors 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.
(HOST SENSOR)
B (42H)
M (4dH)
String Characters
LF
(SENSOR HOST)
B
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Command received without any Error
01 --- Unable to control due to laser malfunction.
02 --- Laser is already on.
Note:
Laser is initially switched off and sensors measurement state is disabled by default in SCIP2.0 system.
8.4 [QT-Command]
This command will switch off the laser disabling sensors measurement state.
(HOST SENSOR)
Q (51H)
T (54H)
String Characters
LF
(SENSOR HOST)
Q
String Characters
LF
LF
LF
8.5 [RS-Command]
This command will reset all the settings that were changed after sensor was switched on. This turns Laser off,
sets motor speed and bit rate back to default as well as reset sensors internal timer.
(HOST SENSOR)
R (52H)
S (53H)
String Characters
LF
.
(SENSORHOST)
R
TITLE
String Characters
LF
DRAWING
NO.
LF
LF
C-42-03320B
14/25
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.
(HOST SENSOR)
T (54H)
M (4dH)
Control Code
(1 byte)
String Characters
LF
Control Code:
0 --- Adjust mode on
1 --- Time request
2 --- Adjust mode off
(SENSOR HOST)
1. When the Control Code is 0 or 2 or status is not 00.
T
Control Code
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Command received without any Error
01 --- Invalid Control Code.
02 --- Adjust mode on command is received when sensors adjust mode is already on
03 --- Adjust mode off command is received when sensors adjust mode is already off
04 --- Adjust mode is off when requested for time.
2. When the Control Code is 1
T
String Characters
LF
LF
Time
(4 byte)
Sum
LF
LF
Time:
Sensors internal timer reading.
TITLE
DRAWING
NO.
C-42-03320B
15/25
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.
(SENSOR HOST)
S
Bit Rate
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Command received without any Error
01 --- Bit Rate has non-numeric value.
02 --- Invalid Bit Rate
03 --- Sensor is already running at the defied bit rate.
04 --- Not compatible with the sensor model.
Note:
1. See sensor specification for default bit rate during shipment.
2. Bit rate change is implemented only after sensor returns the status 00.
3. When sensor is connected with USB, bit rate change will not have any effect on the communication
speed, but the command will be accepted and effective when connection is changed to RS232C.
TITLE
DRAWING
NO.
C-42-03320B
16/25
8.8 [CR-Command]
This command is used to adjust the sensors 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.
(SENSOR HOST)
C
Speed Ratio
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Command received without any Error
01 --- Invalid Speed Ratio
02 --- Speed Ratio is out of range.
03 --- Motor is already running on the defined speed
04 --- Incompatible with the current sensor model
TITLE
DRAWING
NO.
C-42-03320B
17/25
8.9 [HS-Command]
This command will switch between high sensitivity and normal sensitivity modes. Sensors 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.
(HOST SENSOR)
H (48H)
S (53H)
Parameter
(1 byte)
String Characters
LF
Parameter:
0 --- Normal mode
1 --- High sensitivity mode
(SENSOR HOST)
S
Bit Rate
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Normal Operation
01 --- Parameter Error
02 --- Already running on the set mode
03 --- Incompatible with current sensor model
TITLE
DRAWING
NO.
C-42-03320B
18/25
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.
Note: This command is not compatible in URG-04LX with firmware versions earlier than 3.3.00.
Some versions of URG-04LX may not be compatible to this command.
Laser radiation will stop but motor keeps running during simulation.
(HOST SENSOR)
D (44H)
B (42H)
Parameter
(2 byte)
String Characters
LF
Parameter:
01 --- Simulate sensor malfunction in SCIP1.1
02 --- Simulate sensor malfunction in SCIP2.0
03 --- Simulate sensor malfunction during continuous mode [Normal Error Normal]
04 --- Simulate sensor malfunction during continuous mode [Normal Error Malfunction]
05 --- Simulate sensor malfunction during continuous mode [Normal Malfunction]
10 --- End simulation.
(SENSOR HOST)
D
Parameter
String Characters
LF
Status
Sum
LF
LF
Status:
00 --- Normal Operation
01 --- Parameter Error
02 --- Already running on the set mode
03 --- Simulation mode is already ended
04 --- Incompatible with current sensor model
05 --- Sensor is in error state.
TITLE
DRAWING
NO.
C-42-03320B
19/25
8.11 [VV-Command]
Sensor transmits version details such as, serial number, firmware version etc on receiving this command.
.
(HOST SENSOR)
V (56H)
String Characters
LF
.
(SENSOR HOST)
V
String Characters
Vendor Information
LF
Sum
LF
LF
Product Information
Sum
LF
Firmware Version
Sum
LF
Protocol Version
Sum
LF
Sum
LF
LF
TITLE
DRAWING
NO.
C-42-03320B
20/25
8.12 [PP-Command]
Sensor transmits its specifications on receiving this command.
.
(HOST SENSOR)
P (56H)
String Characters
LF
.
(SENSOR HOST)
P
String Characters
LF
Sensor Model
Sum
LF
LF
Sum
LF
Sum
LF
Sum
LF
Sum
LF
Sum
LF
Sum
LF
Sum
LF
LF
TITLE
DRAWING
NO.
C-42-03320B
21/25
8.13 [II-Command]
Sensor transmits its running state on receiving this command.
.
(HOST SENSOR)
I (49H)
String Characters
LF
.
(SENSOR HOST)
I
String Characters
LF
Sum
Sensor Model
LF
LF
Sum
LF
Motor Speed
Sum
LF
Measurement Mode
Sum
LF
Sum
LF
Time Stamp
Sum
LF
Sensor Diagnostic
Sum
LF
LF
TITLE
DRAWING
NO.
C-42-03320B
22/25
TITLE
DRAWING
NO.
C-42-03320B
23/25
Normal
Error Status
Diagnostics
Error Detection
TITLE
DRAWING
NO.
C-42-03320B
24/25
Normal
Remaining Scan Count Reset to 0
Error Status
Malfunction Status
Diagnostics
Error Detection
Malfunction Confirmed
Error
II, BM and MD-Command Also Transmit Error Status
Normal
Normal Status
Error Status
Malfunction Confirmed
Error
II, BM and MD-Command Also Transmit Error Status
Normal Error
TITLE
DRAWING
NO.
C-42-03320B
25/25