Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 518

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Special Instructions
7-28-4 FRAME CHECKSUM – FCS(––)
Limitations
Description
15
14
C:
Number of Items in Range
Calculation Units
Conversion to ASCII
500
Ladder Symbols
FCS(––)
C
R
1
D
This instruction is available in the CPM2A/CPM2C/SRM1(-V2) only.
The 3 rightmost digits of C must be BCD between 001 and 999.
DM 6144 to DM 6655 cannot be used for D.
FCS(––) can be used to check for errors when transferring data through commu-
nications ports.
When the execution condition is OFF, FCS(––) is not executed. When the
execution condition is ON, FCS(––) calculates the frame checksum of the speci-
fied range by exclusively ORing either the contents of words R
bytes in words R
to R
1
converted to ASCII and output to the destination words (D and D+1).
The function of bits in C are shown in the following diagram and explained in
more detail below.
13
12
11
Not used. Set to zero.
The number of items within the range (N) is contained in the 3 rightmost digits of
C, which must be BCD between 001 and 999.
The frame checksum of words will be calculated if bit 13 is OFF and the frame
checksum of bytes will be calculated if bit 13 is ON.
If bytes are specified, the range can begin with the leftmost or rightmost byte of
R
. The leftmost byte of R
1
When bit 12 is OFF the bytes will be ORed in this order: 1, 2, 3, 4, ....
When bit 12 is ON the bytes will be ORed in this order: 2, 3, 4, 5, ....
The byte frame checksum calculation yields a 2-digit hexadecimal value which is
converted to its 4-digit ASCII equivalent. The word frame checksum calculation
@FCS(––)
C
R
1
D
+N–1. The frame checksum value (hexadecimal) is then
1
00
Number of items in range (N, BCD)
001 to 999 words or bytes
First byte (when bit 13 is ON)
1 (ON):
Rightmost
0 (OFF): Leftmost
Calculation units
1 (ON):
Bytes
0 (OFF): Words
will not be included if bit 12 is ON.
1
MSB LSB
R
1
2
1
R
+1
3
4
1
R
+2
5
6
1
R
+3
7
8
1
Section
Operand Data Areas
C: Control data
IR, SR, AR, DM, HR, LR, #
R
: First word in range
1
IR, SR, AR, DM, HR, TC, LR
D: First destination word
IR, SR, AR, DM, HR, LR
to R
+N–1 or the
1
1
7-28

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents