02.02.2018 Views

Practical_modern_SCADA_protocols_-_dnp3,_60870-5_and_Related_Systems

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fundamentals of distributed network protocol 97<br />

GENERATION<br />

RECEIPT<br />

x2 16<br />

K<br />

K<br />

M<br />

M<br />

P<br />

000..00<br />

16<br />

T<br />

K<br />

K<br />

M<br />

M<br />

R<br />

16<br />

Invert<br />

R<br />

Q<br />

16<br />

R<br />

16<br />

Invert<br />

(Discard)<br />

Quotient<br />

Remainder<br />

P<br />

QC<br />

RC<br />

(Discard)<br />

Quotient<br />

Remainder<br />

16<br />

R<br />

If RC = 0 M is GOOD<br />

If RC = 0 M is BAD<br />

T<br />

K<br />

M<br />

16<br />

R<br />

K<br />

M<br />

Transmit<br />

Notes: P = 1 0011 1101 0110 0101 = 13D65 (hex)<br />

Transmission Order of CRC<br />

Data<br />

(M)<br />

LSB MSB<br />

CRC<br />

Figure 5.18<br />

CRC code processing<br />

Generation of message:<br />

• Start with user data block M of k bits (k = 64 for header, 8–128 for blocks<br />

in body)<br />

• Multiply by 2 16 (ie append 16 zeros to end to form k + 16-bit number)<br />

• Divide by generator polynomial P to obtain quotient Q <strong>and</strong> remainder R<br />

modulo-2 division is used)<br />

• Discard Q, keep R<br />

• Invert R to obtain R′<br />

• Append R′ to M forming message T′ to be transmitted<br />

Where generator polynomial:<br />

P = x 16 + x 13 + x 12 + x 10 + x 8 + x 5 + x 2 + 1<br />

This forms a 17-bit number which is 13D65 (in hex)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!