
6-12 Communications
Checksum
Calculating Checksum The PS-6144 calculates checksums in four steps:
1. Add the ASCII values of the command string, not including STX (!) or ETX (<CR>).
2. Make the decimal value from Step 1 negative.
3. Convert the value from Step 2 to hex.
4. Use the two least significant digits from Step 3.
The following examples will clarify how Checksums are calculated:
Example 1—Command 0A: Request RPM from Controller #1
Command: !010A<CSM><CR>
Checksum Calculation:
0 1 0 A
| | | |
48+49+48+72 = 217(decimal)
–217 decimal = FF27 hex; therefore: Checksum = 27
String sent to controller = !010A27<CR>
Example 2—Command 25: Add Pulse to Control #2
Pulse Values: Program 15, Output Channel 9, “On” at 25, “Off” at 290
Command: !02250E0800190122<CSM><CR>
Checksum Calculation:
0 2 2 5 0 E 0 8 0 0 1 9 0 1 2 2
| | | | | | | | | | | | | | | |
48+50+50+53+48+69+48+56+48+48+49+57+48+49+50+50 = 821(decimal)
–821 decimal = FCCB hex; therefore: Checksum = CB
String sent to controller = !02250E0800190122CB<CR>
Error Codes
Error Replies If a command sent to the PS-6144 cannot be processed for any reason, the controller
sends a reply in the following format:
N <error code> CSM <CR>
The error codes are listed below.
Code Name Meaning
00 OK Processed ok.
01 BAD BUFFER Buffer not correct.
02 NOT OUR ADDRESS To someone else.
03 BAD COMMAND Illegal command.
04 BAD DATA Illegal data.
05 NOT IN MOTION Can’t do while running.
06 TOO MANY TIMERS Too many timers for time base.
07 NOT AN OPTION Option not on unit.
08 NOT STOPPED Can’t do this unless STOPPED.
09 BAD FORMAT Bad input or output format string.
0A TIMEOUT Timeout error.
0B BAD KEY Illegal key value.
0C FLASH ERROR Flash programming error.
0D BAD PROGRAM# Illegal program number.
0E BAD CHANNEL# Illegal channel number.
0F KEYBOARD CONFLICT Conflict with keyboard activity.
Kommentare zu diesen Handbüchern