3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-249
API Mnemonic
Operands
Function
84
CCD P
S, D, n
Check Code
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
D
*
*
*
*
*
n
*
*
*
CCD, CCDP: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: source address
D
: Destination for storing the check sum
n
: Number of values to use in the
instruction (
n
=1~256)
Description:
1.
This instruction is used to create the check sum for data packets to ensure data integrity.
2.
16-bit conversion mode: When M1161=OFF, the conversion mode is 16-bit. Create a check
sum of
n
words from the register specified by
S
and store the check sum in the register
specified by
D
. The parity bits are in
D
+1.
3.
8-bit conversion mode: When M1161=ON, conversion mode is 8-bit. Create a checksum of
n
words (8-bits per byte, only low bytes are available) from the register specified by
S
and store
the check sum in the register specified
D
. The parity bits are in
D
+1
Program Example 1:
1.
When M1161=OFF, the conversion mode is 16-bit.
2.
When X0=ON, the checksum for the 6 words from registers D0-D5 is calculated and stored in
D100. The parity bits are stored in D101.
X0
CCD
D0
D100
K6
M1000
M1161
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...