Omega Engineering OMR-6520 How to Calculate Checksum Value, Format of OMR Commands, + 0x32 MOD

Models: OMR-6510

1 39
Download 39 pages 57.03 Kb
Page 9
Image 9
1.10.How to Calculate Checksum Value

1.10.How to Calculate Checksum Value

Format of OMR Commands

(LeadingCode)(Addr)(Command)(Data)[Checksum]<CR>

When checksum is enable then [Checksum] is needed, it is 2-character.

[Checksum] = ((LeadingCode)+(Addr)+(Command)+(Data)) MOD 0x100

Example 1: checksum is disable

 

User Command :

$012<CR>

 

 

 

Response

:

!01400600

 

 

Example 2: checksum is enable

 

 

 

 

 

 

 

User Command :

$012B7<CR>

 

 

 

Response

:

!01400600AC

 

 

‘$’ = 0x24

‘0’ = 0x30

‘1’ = 0x31

‘2’ = 0x30

 

B7 = ( 0x24 + 0x30 + 0x31

+ 0x32 ) MOD 0x100

 

 

‘!’ = 0x24

‘0’ = 0x30

‘1’ = 0x31

‘4’ = 0x34

 

‘6’ = 0x36

 

 

 

 

 

AC = ( 0x24 + 0x30 + 0x31 + 0x34 + 0x30 + 0x30 + 0x36 + 0x30

+ 0x30 ) MOD 0x100

Introduction 1-7

Page 9
Image 9
Omega Engineering OMR-6520, OMR-6510 manual How to Calculate Checksum Value, Format of OMR Commands, + 0x32 MOD, + 0x30 MOD