ScanMeg Inc.
Serial link protocol
The serial link transmits the dimension and the position of the object presently within the field of
view. The communication speed is selectable by accessing the right parameter menu in the SIM
module. The number of bits, the parity and the number of stop bits are fixed and set to:
XXXX,8,N,2 where XXXX represents the Baud rates from 9600 to 115,200 Bds
Data format
Regardless if we have selected the dimension or the position, the value sent on the serial link is
written in BCD ASCII format. Each value is represented by a four digit number. According to the
system used, the value of the 4 digits is:
Metric
XXXX where the number is in 1/10 of mm
Imperial
XXXX Where the number is in 1/10 of inch
For example, if the value is 236, this value will be sent as the four digits 0236. Each digit is
converted to ASCII format before the SIM‐P module transmits them. Using the same example, 0236
will be converted to 48, 50, 51, and 54 respectively or in hexadecimal form the data sent will be:
0x30, 0x32, 0x33, and 0x36.
Protocol
The transmission always starts with a LF (0x0A) and finishes with a CR (0x0D). Between these two
delimiters, the dimension (4 BCD ASCII bytes) and the position (4 BCD ASCII bytes) are present in the
same order as described below. At each scan, the transmitting buffer is emptied, and the SIM
module with the two delimiter characters will always send 10 bytes. In summary, the protocol is:
To demonstrate this protocol, here is an example. If the scan result of the scanner is a dimension of
12.2 mm and the object is located at position 4.6 mm, the SIM module will send:
LF 0 1 2 2 0 0 4 6 CR
In Hexadecimal, this communication is:
0x0A 0x30 0x31 0x32 0x32 0x30 0x30 0x34 0x36 0x0D
Dimension Position
User Manual
LF DDDD PPPP CR
16
Module SIM‐P
Version 1.3
Need help?
Do you have a question about the SIM-P and is the answer not in the manual?