2-255
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Table Data Processing
Instructions
2
FCS
FCS
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
FRAME CHECKSUM FCS @FCS 180
Calculates the FCS value for the specified range
and outputs the result in ASCII.
Symbol
FCS
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
C First control word UDINT 2
R1 First word in range UINT Variable
D First destination word UINT Variable
C: First control word R1: First word in range
D: First destination word
Note C and C+1, all of the words in the calculation range
must be in the same data area.
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
C
OK OK OK OK OK OK OK OK OK
OK
--- --- ---
R1, D ---
Name Label Operation
Error Flag P_ER • ON if the content of C is not within the specified range of 0001 through FFFF.
• OFF in all other cases.
C: First control word
R1: First word in range
D: First destination word
FCS(180)
C
R1
D
15 0
C
15 0
14
0
C+1
13 12 11
0000 0000 0000
00
0
Calculation units
W:
Number of words/bytes in range
&1 to &65535 (decimal) or
#0001 to #FFFF (hex)
Starting byte (Valid only when bit 13 is 1.)
0: Leftmost byte
1: Rightmost byte
0: Words
1: Bytes
R1
15
0
R1+(W–1)
to
to
Calculation r
ange
D
015
When bytes are specified as the operation units:
When words are specified as the operation units:
D+1
015
D
015
The leftmost four digits are stored in D+1 and the rightmost
four digits are stored in D.