APC 6000 user manual CRC 16 algorithm

Page 14

JBUS protocol (continued)

CRC 16 algorithm

If the CRC 16 is calculated using the above algorithm, the least significant byte is transmitted first.

 

 

 

Hex FFFF --> CRC 16

 

 

 

 

 

CRC 16 BYTE --> CRC 16

 

 

 

 

 

n = 0

 

 

 

 

 

CRC 16 shift to the right

 

 

 

 

no

remainder

yes

 

 

 

 

 

CRC 16 poly --> CRC 16

 

 

 

 

n = n+1

 

 

 

 

no

n > 7

yes

 

 

 

 

no

end of message

yes

 

 

 

following byte

 

 

 

 

 

 

 

END

 

=

exclusive or

 

 

n

=

number of data bits

 

 

poly

=

CRC 16 polynomial = 215 + 213 + 20 = $ A001

 

Page 14 - 6739389EN/FB

Image 14
Contents Mgetm GalaxyTM GTC link communication interface2 6739389EN/FB Contents ACQ module PresentationIntroduction COM moduleCommunication settings InterfaceJbus protocol Description of request and response frames PrincipleSynchronizing data exchanges Checking received messages on the slave side Functions Function 1 and 2 read N bitsFunction 3 and 4 read N words Function 5 writing a bitFunction 8 reading error diagnosis counters Function 6 writing a wordFunction 11 reading event counters Function 15 writing n consecutive bitsFunction 16 writing n consecutive words MSB LSB MSB LSB MSBCRC 16 algorithm Example of CRC computation Example of CRC 16 computation in C using table lookup Table of Most Significant Bytes for CRC16 ComputationJbus protocol UPS theory of operation Unitary UPSUPS without Mains Parallel connected UPS with Static Switch cubicleOperation without battery Operation with battery Measured quantities Block diagramUnitary UPS Operating modes Normal operation Load on batteryMain status bits UPS operating information Load on Mains Load on bypass Parallel connected UPS Normal operation Load on battery Disconnected Main status bits of system operationsStatic Switch cubicle Normal operation Load on Mains Load on bypass Static SwitchMain indicators of system operations System information Example of read data array commands sent by the terminalSample commands List of variable fields Message formatCurrent fields General definitions Signaling fieldTables of measured data Power fields Frequency fields Voltage fieldsRectifier-charger Battery and adjustments fieldsTables of binary data Inverter ConnectivityTable of control devices Global informationGlossary of information descriptors Word addressInverter stack overload 0=no/1=overload Word address 4A Word address 4CWord address 4D Word address 4E summaryC10 call reset 0= not activated / 1=activated Word address C1
Related manuals
Manual 46 pages 29.39 Kb