Moxa MPC-2240Z [57/64] Downloading rgb files

Moxa MPC-2240X [57/64] Downloading rgb files
MPC-2240 Hardware Manual Display Control Interface
6-5
IHCHK = 0xFF – [the sum of bits 0, 1, 2, 3, 4, 5]
If a message is received with an incorrect checksum, the display will resend the message with the attention
code (byte 0) set to NAK, unless it is a broadcast message in RS-485, in which case there will be no NAK.
DATA (Data Field)
The data field must have a LEN larger than 0; some commands do not have any data, so this field is left blank.
IDCHK (Inverse Data Checksum)
This is a simple 8-bit checksum of the data field, message bytes 7 to 7+ (LEN-1) after a bit-wise inversion has
been performed on each bit. This means that the IDCHK bit is equal to 0xFF - the sum of all data bits:
IDCHK = 0xFF – [the sum of bits 7 to 7+[LEN-1]]
If the message carries no data, then this checksum is not transmitted.
Except for broadcast messages in RS-485 (see above, IHCHK), if a message is received with an incorrect
checksum, the display will resend the message with the attention code (byte 0) set to NAK.
If included, this bit will always be the final bit in a packet.
Downloading RGB Files
This feature returns the ECDIS RGB file that is currently saved to the EEPROM; consequently, it is only available
for type-approved ECDIS models.
Use the following commands for downloading RGB files.
Command Description
DL? Data: none (0 byte)
ACK: Total packet numbers (1 byte)
DLN Data: Appointed packet (1 byte)
ACK: File content (30 bytes maximum, except
for the last packet)
The command DL? will send a request to the micro controller and ask how many packets that need to be
downloaded. The reply from the micro controller shall be used when using the command DLN to download the
specific packets. Refer to the following section for detailed descriptions of the DL? and DLN.
Query the RGB File Size (in packets): DL? Command
Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6
Hex 0x7 0xFF 0x44 0x4C 0x3F 0x0 0x2A
ASCII D L ?
Download the RGB File: DLN Command
Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8
Hex 0x7 0xFF 0x44 0x4C 0x4E 0x1 0x1A 0x50 0xAF
ASCII D L N
Here is sample command to read and return packet zero of the RGB file:
0x07 0xFF 0x44 0x4C 0x4E 0x01 0x1A 0x00 0xFF
And this is the ACK packet that is returned, with data packet 0 located in the Data section.
0x06 0xFF 0x44 0x4C 0x4E 0x20 0xFC 0x00 - Data IDCHK
Data should be the real value of the RGB file package 0.

Содержание

Скачать