Panasonic FP7 Series Command Reference Manual page 657

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

● The block check code (BCC) for the targeted data, which is the number of bytes specified by
[S3] starting from the calculation start position specified by [S2], is calculated with the CRC
calculation method which is specified by [S1].
● The calculation result is stored according to the conversion method specified by [S1], starting
from the storage position specified by [D] and [S1].
CRC calculation
● Apply a specified calculation method to every 16 bits as follows.
● The calculation should be carried out using the following generating polynomial. (This is the
same calculation method as MODBUS-RTU.)
・Generating polynomial: (CRC-16) X
・Generating polynomial: (CRCITT) X
%0
1#
RC
(a)
(b)
(c)
Specification of control data [S1]
0:固定
格納開始位置
([D]からのバイト数)
0~F
計算開始位置
([S2]からのバイト数)
0~F
Conversion example
Calculate the block check code for a message to be sent "%01#RCSX0000", and append the
result to the message.
WUME-FP7CPUPGR-12
H 2530
0010 0101 0011 0000
H 3123
0011 0001 0010 0011
H 5243
0101 0010 0100 0011
Specified calculation
[S1]= K0 : CRC-16
[S1]= K1 : CCITT
H
14.2 CRC (CRC Code Calculation)
16
+ X
15
+ X
2
+ 1
16
+ X
12
+ X
5
+ 1
(a)
(b)
(c)
計算方法の指定
設定値 CRCタイプ 初期値
0
CRC-16
FFFFH
1
CCITT
2
CRC-16
0000H
3
CCITT
4
CRC-16
FFFFH
5
CCITT
6
CRC-16
0000H
7
CCITT
8
CRC-16
FFFFH
9
CCITT
A
CRC-16
0000H
B
CCITT
C
CRC-16
FFFFH
D
CCITT
E
CRC-16
0000H
F
CCITT
(注):CPUユニットCPS4R*、CPS2R*で使用することができます
送り方法
演算結果のXOR
右送り
0000H
左送り
右送り
FFFFH
左送り
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
(注)
14-7

Advertisement

Table of Contents
loading

Table of Contents