32
⿎
How to calculate the check sum
Convert the data from the start code to those before the check sum into the hexadecimal values according to the ASCII
code table and add them all together.
When the character code other than ASCII code is used in the data, convert them into the hexadecimal values according to
the each character code table.
Check sum is the value calculated by converting the lower one-byte of the total value into two characters in the ASCII code.
Calculation example
• Calculating the check sum of the following setting request data
Start code
STX
Command
“LPW”
Sub command
“S”
Data example:
[Laser power]
“042.5”
Check
sum
End code
CR
02
4C 50 57
53
30 34 32 2E 35
34 31
0D (HEX)
• Convert the start code to the end of data into hexadecimal values and add them all together. Include the start code for
the addition.
02 + 4C + 50 + 57 + 53 + 30 + 34 + 32 + 2E + 35 = 241 (HEX)
• “41”, which is the lower one-byte (lower two-digit) characters of 241 (HEX), is converted to 34 31 (HEX) in the two-
character ASCII code.
2-3-2 Request data
Request data in the following format will be transmitted when you control the laser marker from the external device.
⿎
Setting request data format
Request data to modify or create the laser marker data or to control the laser marker operations.
The start code is [STX]: 02 (HEX). The sub command is “S”.
Start code
[STX]
Command
Sub command
“S”
Variable-length data or fixed-length
data
Check sum
End code
1-byte
3-byte
1-byte
The maximum data length is
defined per command
2-byte
or N/A
1-byte
or 2-byte
⿎
Readout request data format
Request data to read out the status or setting data of the laser marker.
The start code is [STX]: 02 (HEX). The sub command is “R”.
Start code
[STX]
Command
Sub command
“R”
Variable-length data or fixed-length
data
Check sum
End code
1-byte
3-byte
1-byte
The maximum data length is
defined per command
2-byte
or N/A
1-byte
or 2-byte
Content of variable-length data/fixed-length data part
The content to specify varies depending on the command.
Use ASCII code to input the numeric values or character strings.
For the characters which cannot be indicated with ASCII code, use Shift JIS code.
There is no separating character among the each terms. Input them in a row.
Some items can be omitted for some commands.
ンㄆㄇㄆㄓㄆㄏㄆ
• For details on how to input variable-length data or fixed-length data, refer to “2-3-4 Character input method” (P.36)
and “2-3-5 Character data input method” (P.37).
ME-LP-GS-SR-COMP-3
Summary of Contents for LP-GS Series
Page 11: ...1 Preparation of Command Control ME LP GS SR COMP 3...
Page 26: ...2 Communication Control Basics ME LP GS SR COMP 3...
Page 50: ...3 Data Format for Each Command ME LP GS SR COMP 3...
Page 136: ...136 MEMO ME LP GS SR COMP 3...
Page 137: ...Troubleshooting ME LP GS SR COMP 3...
Page 163: ...Character Code Table ME LP GS SR COMP 3...
Page 176: ...Index ME LP GS SR COMP 3...
Page 178: ...178 W Warning 154 ME LP GS SR COMP 3...
Page 179: ......
Page 180: ...Panasonic Industrial Devices SUNX Co Ltd 2014 2019 April 2019...