Transmission of Scanner Commands
MP150 Protocol Rev. B4 Aug 2019 9
3 Transmission of Scanner Commands
Commands serve to setup functional modes and parameters in the scanner.
3.1 Command structure
Commands are generally transmitted from the PC to the scanner, and have the following format:
SOH Operation Code [Sector] [Parameter] EOT BCC
The [Operation Code] and [Parameter] are to be find in section 7.1 and the [Sector] is described in section
5.2.
The frame (composed of SOH, EOT and BCC) may be left out, but should be used in the RS485
connection to avoid communication errors. (The predecessor MP50 did require the frame.)
If a command was sent with the frame, then the scanner will answer with the frame. The decision
with/without frame is made at the first sign (SOH or not SOH).
These ASCII control characters used in the protocol with their associated decimal and hexadecimal
values are the following:
During command and parameter transmission, transmission reliability is checked with a Block
Character Checksum (BCC).
The BCC is transmitted as the last byte of the command or parameter string. The BCC is a modulo 256
sum of all previously transmitted characters and bitwise OR-ed with 80H or 128D (to set the highest bit
of the BCC).
Example (send the command AR):
SOH 01H
”A” 41H
”R” 52H
+ EOT 04H
BCC = 98H
and afterwards, bitwise OR-ed with 80H yields (which, in this case, does not change the byte’s value):
BCC = 98H