APC 6000 user manual Example of CRC computation

Page 15

JBUS protocol (continued)

Example of CRC computation

CRC register initialization

Shift 1

1111

1111

1111

1111

 

 

 

 

 

of 1st character

 

 

 

0000

0010

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1111

1111

1111

1101

 

 

 

 

 

 

 

 

 

 

Shift 1

0111

1111

1111

1110

1

Set flag to 1,

 

 

 

polynomial

 

1010

0000

0000

0001

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1101

1111

1111

1111

 

Set flag to 1,

 

 

 

 

Shift 2

0110

1111

1111

1111

1

 

 

 

polynomial

 

1010

 

 

0001

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1100

1111

1111

1110

 

 

 

 

 

 

 

 

 

 

Shift 3

0110

0111

1111

1111

0

Set flag to 0

 

 

 

 

Shift 4

0011

0011

1111

1111

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

0011

1111

1110

 

 

 

 

 

 

 

 

 

 

Shift 5

0100

1001

1111

1111

0

 

 

 

 

 

 

 

 

 

Shift 6

0010

0100

1111

1111

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1000

0100

1111

1110

 

 

 

 

 

 

 

 

 

 

Shift 7

0100

0010

0111

1111

0

 

 

 

 

 

 

 

 

 

Shift 8

0010

0001

0011

1111

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1000

0001

0011

1110

 

 

 

 

 

2nd character

 

 

 

0000

0111

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1000

0001

0011

1001

 

 

 

 

 

 

 

 

 

 

Shift 1

0100

0000

1001

1101

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1110

0000

1001

1101

 

 

 

 

 

 

 

 

 

 

Shift 2

0111

0000

0100

1110

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1101

0000

0100

1111

 

 

 

 

 

 

 

 

 

 

Shift 3

0110

1000

0010

0111

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1100

1000

0010

0110

 

 

 

 

 

 

 

 

 

 

Shift 4

0110

0100

0001

0011

0

 

 

 

 

 

 

 

 

 

Shift 5

0011

0010

0000

1001

1

 

 

 

 

 

 

 

 

 

 

101

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

0010

0000

1000

 

 

 

 

 

 

 

 

 

 

Shift 6

0100

1001

0000

0100

0

 

 

 

 

 

 

 

 

 

Shift 7

0010

0100

1000

0010

0

 

 

 

 

 

 

 

 

 

Shift 8

0001

0010

0100

0001

0

 

 

 

 

 

 

 

 

 

 

byte

byte

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6739389EN/FB - Page 15

Image 15
Contents GTC link communication interface Mgetm GalaxyTM2 6739389EN/FB Contents COM module PresentationIntroduction ACQ moduleInterface Communication settingsJbus protocol Principle Synchronizing data exchangesDescription of request and response frames Checking received messages on the slave side Function 1 and 2 read N bits FunctionsFunction 5 writing a bit Function 3 and 4 read N wordsFunction 6 writing a word Function 8 reading error diagnosis countersFunction 15 writing n consecutive bits Function 11 reading event countersMSB LSB MSB LSB MSB Function 16 writing n consecutive wordsCRC 16 algorithm Example of CRC computation Table of Most Significant Bytes for CRC16 Computation Example of CRC 16 computation in C using table lookupJbus protocol Unitary UPS UPS theory of operationParallel connected UPS with Static Switch cubicle Operation without batteryUPS without Mains Operation with battery Block diagram Unitary UPSMeasured quantities Normal operation Load on battery Main status bits UPS operating informationOperating modes Load on Mains Load on bypass Parallel connected UPS Main status bits of system operations Normal operation Load on battery DisconnectedStatic Switch cubicle Static Switch Main indicators of system operationsNormal operation Load on Mains Load on bypass Message format Example of read data array commands sent by the terminalSample commands List of variable fields System informationGeneral definitions Signaling field Tables of measured dataCurrent fields Voltage fields Power fields Frequency fieldsBattery and adjustments fields Tables of binary dataRectifier-charger Connectivity InverterGlobal information Table of control devicesWord address Glossary of information descriptorsInverter stack overload 0=no/1=overload Word address 4C Word address 4AWord address 4E summary Word address 4DWord address C1 C10 call reset 0= not activated / 1=activated
Related manuals
Manual 46 pages 29.39 Kb