Checksum - RayTek MARATHON MM SERIES Operating Instructions Manual

High-performance
Table of Contents

Advertisement

?$
gives the burst string parameters while in poll mode, e.g. "UTIE"
?X$
gives the burst string content while in poll mode, e.g. "UC T0150.3 I0027.1 E0.950"
Return from burst mode to poll mode
4-Wire Communication:
2-Wire Communication:

10.5 Checksum

The destination for the burst string is often a Windows PC. The Windows operating system is non
deterministic and known to let the buffer of the serial communication overflow. To test the burst string
a checksum can be added to it by writing <CS> to the burst string definition string ($=...).
The <CS> command can also be used in the polling mode. <CS=1> activates the checksum transfer as a
3 digit integer number.
Example:
?CS
//asks for the checksum status
!CS0
//answer: no checksum activated
CS=1
//enable the checksum calculation
!CS1 CS048
//answer: checksum is activated, checksum added, checksum in decimal format
Character Transmission Check
You can check the correctness of transmitted strings by evaluating the block check character (BCC), the
checksum. This can be done by taking the exclusive OR (XOR) of the ASCII values of all the characters
transmitted from the start character (here: "!") up to the "S" but excluding the checksum value itself
(here: 127), carriage return <CR> and line feed <LF>. For example, the shaded characters are included as
follows:
! E 0 . 5 <space> C S 127 <CR> <LF>
Please note, the start character can be one of the following: "!", "?", "*", "#", <multidrop address>, <first
character of the burst string>.
You can evaluate the received string easily by converting the ASCII values to Binary and progressively
adding the Binary values together, minding the following rules for taking the XOR:
0
1
1
0
0
1
0
1
0
0
1
1
The sent checksum from the exemplary line above needs to be identical to the calculated checksum
below.
Marathon MM
send "V=P"
send "V=P". It could be necessary to send the command more than one
times.
Rev.
D7 Jul 2017
Programming Guide
69

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents