APC 6000 user manual Checking received messages on the slave side

Page 8

JBUS protocol (continued)

Checking received messages on the slave side

After the master sends a request containing the slave address, the function code and data, it computes the CRC and sends it as the check word (CRC 16).

When the slave receives the request, it stores the message in memory and calculates the CRC 16 to compare it to the received CRC 16.

If the message is incorrect (unequal CRC 16 values), the slave does not respond.

If the message received is correct but the slave is unable to process it (incorrect address, incorrect data, etc.), the slave returns an error message with the following contents (see opposite):

 

slave

 

master

slave address

 

 

function

CRC 16

 

computation

 

 

 

data

 

 

CRC 16

 

 

CRC 16 comparison

 

response

 

 

 

Error codes:

 

 

 

 

 

1.

Unknown function code

 

 

 

 

 

 

2.

Incorrect address

 

 

 

 

 

 

3.

Incorrect data

errors handled

 

 

 

 

 

4.

Station not ready

 

 

 

 

 

by the

 

 

 

 

 

8.

Write error

 

 

 

 

 

 

 

communication

 

 

 

 

 

9.

Field overlap

 

 

 

 

 

port

 

 

function code

 

 

 

 

 

 

 

 

 

 

 

received and

 

 

 

 

 

 

MS bit = 1

 

 

 

 

 

slave

 

1

 

 

 

 

 

CRC 16

address

 

 

 

 

 

 

(1 à FF)

 

 

 

 

 

 

 

 

1 byte

 

 

1 byte

 

 

1 byte

2 bytes

example

 

 

 

 

 

 

 

01

09 H

00

00

00

00

DD CB

request

 

01

89 H

01

86 50

 

 

response

 

Page 8 - 6739389EN/FB

Image 8
Contents Mgetm GalaxyTM GTC link communication interface2 6739389EN/FB Contents Presentation IntroductionACQ module 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 Example of read data array commands sent by the terminal Sample commands List of variable fieldsSystem information 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