Unitech MR350MKII manual Cmd, STX ESC L a . E X E CS1 CS2 Addr

Models: MR350MKII

1 86
Download 86 pages 30.91 Kb
Page 65
Image 65

ADDR Terminal address (A-Y,0-6) + 80H

CMD

Network command to terminal, 2 bytes, A-F,0-9

CS1

Checksum, first byte

CS2

Checksum, second byte

The checksum is calculated by adding each byte of the transmission, ADDR, and length of data block (excluding STX and ETX). CS1 is high nibble (4 bits) +40H and CS2 is low nibble +40H.

Example: Command to load the file named A.EXE

STX ESC L A . E X E CS1 CS2 ADDR

Data block

= ESC L A . E X E (excluding STX)

Length of data block

= 7

CS

= ESC + L + A + . + E + X + E + ADDR + 7

CS1

= high nibble of CS + 40H

CS2

= low nibble of CS + 40H

The ASCII data characters and their values are as follows:

STX 0x02

ETX 0x03

ACK 0x06

NAK 0x15

DC1 0x11

ESC 0x1B

EOT 0x04

The maximum frame size including protocol control characters is 128 bytes. Transparent transmission of protocol control characters STX and ETX is achieved by preceding them with a '\' (backslash) character. Transparent transmission of the '\' character is achieved by sending two '\' characters consecutively.

Rule of data convention during data transmission:

1)One-byte data converted to two-byte data

4-64

Page 65
Image 65
Unitech MR350MKII manual Cmd, STX ESC L a . E X E CS1 CS2 Addr, Rule of data convention during data transmission