Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

www.mgeups.

com MGE UPS SYSTEMS

Comet™
5 - 30 kVA
J-BUS
Installation and user
XM1

XM2
manual

! !

fault

et
Com

D E R
V I
R O
P
R
E
W
O
P
E
L
B
I
T
P
U
R
R
T E
I N
U N
T H E
Dear User,

This manual has been designed to provide you with all the information you need
to install and use your J-BUS communications system.

Feel free to contact us for any further information you may require concerning
special applications beyond the scope of this manual.

MGE UPS SYSTEMS

0 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Contents

Delivery
Checks........................................................................................................... 1.1
Storage .......................................................................................................... 1.1
Safety recommendations............................................................................... 1.1

Description of the RS485 board


General overview........................................................................................... 2.1
Function.......................................................................................................... 2.1
Position of jumpers ........................................................................................ 2.1

Description of the RS232


board General overview........................................................................................... 3.1
Function.......................................................................................................... 3.1
Position of jumpers ........................................................................................ 3.1

Configuring the RS485 and RS232 boards


Configuring the transmission speed (jumpers D4 and D5)............................. 4.1
Configuring the transmission format (jumpers D6 and D7)............................ 4.1

Installation/removal
Important warning.......................................................................................... 5.1
Powering down Comet.................................................................................. 5.1
Installing the board ........................................................................................ 5.2
Powering up Comet....................................................................................... 5.5

RS485 interface diagram


....................................................................................................................... 6.1

Connection
Polarity........................................................................................................... 7.1
Termination.................................................................................................... 7.1
RS485 board interface .................................................................................. 7.1
RS232 board interface .................................................................................. 7.3

J-BUS protocol
Introduction.................................................................................................... 8.1
Principle......................................................................................................... 8.2
Synchronizing data exchanges...................................................................... 8.2
Description of request and response frames................................................. 8.3
Checking received messages on the slave side............................................ 8.4
Functions........................................................................................................ 8.5
CRC 16 algorithm .......................................................................................... 8.12

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 1
Contents (cont.)

Comet
Block diagram................................................................................................ 9.1
Measured quantities ...................................................................................... 9.1
Main status bits (UPS operating information) ................................................ 9.2
Operating modes............................................................................................ 9.2

System information
Message format............................................................................................. 10.1
Example of read data array commands sent by the terminal......................... 10.1
List of variable fields....................................................................................... 10.2
General definitions......................................................................................... 10.2
Tables of measured data................................................................................ 10.3
Tables of binary data...................................................................................... 10.5
Glossary of information descriptors................................................................ 10.6

All Comet products are protected by patents. They implement original MGE UPS
SYSTEMS technology not available to other manufacturers.

Due to evolving standards and technology, products may be modified without notice.
Indications concerning technical characteristics and dimensions are not binding unless
confirmed by MGE UPS SYSTEMS.

This document may be copied only with the prior written consent of MGE UPS SYSTEMS.
Authorized copies must be marked: "Comet J-BUS Installation and User Manual
n° 6761008XT".

2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Delivery

Checks
This optional system comprises the following elements:
◗ an installation and user manual for the J-BUS communications system;
◗ an RS485 n° 6761294 or RS232 n° 6761292 interface board.

Storage
If the option must be stored prior to installation, leave your RS485 or RS232
interface board in its original packaging in a dry location:
◗ storage temperature: -40 to +70°C.

Safety recommendations
If you encounter a problem while following the instructions in this manual, we
recommend that you contact our after-sales support service. On request, our
after-sales support personnel can carry out the complete installation of your
equipment.

It is imperative that the instructions in this manual be followed strictly. Not


adhering to these instructions may endanger personnel, result in damage to
the Comet and render the manufacturer’s warranty void.

All repair or maintanance operations must be carried out by our after-sales


support personnel.

For more information on the Comet UPS, please refer to its "Installation and user
manual".

The J-BUS option may be installed and operated by any person as long as the
indications presented in this manual are complied with.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 1.1
1.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Description of the RS485 board

General overview

XM1

XM2

Fig.1

Function
The RS485 communications board enables data concerning Comet’s operating
status to be sent to a computer.
The J-BUS hexadecimal communications protocol is used in slave mode.
The system provides a communications channel with an RS485 interface.

Position of jumpers
The D2 and D3 jumpers on the board Blow-up A of figure 1
must be positioned as in figure 2.

Note: the other customization


elements (J-BUS address) are set.
Refer to the after-sales support
OFF XM5
department for more information. XM3
ON XM4
D2
D3

Fig.2

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 2.1
2.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Description of the RS232 board

General overview
B

232C
XM1

XM2
RS
A

Fig.3

Function
The RS232 communications board enables data concerning the Comet’s
operating status to be sent to a computer.
The communications protocol used is hexadecimal J-BUS in slave mode.
The system provides a communications channel equipped with a V24 interface
(RS232).

Position of jumpers
Before to install the RS232 board, check that the position of jumpers D2, D3 (see
detailed view A of figure 3), and D1, D8 (see detailed view B of figure 3) on the
RS232 board conforms to figure 4 below:

detailed view A of figure 3 detailed view B of figure 3


XM7

XM6
OFF XM5
XM3
ON XM4
D2
D3
D4
D5
D6
D7

D8 D1
Fig.4

Note: the other customization elements (J-BUS address) are set. Refer to the
after-sales support department for more information.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 3.1
3.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Configuring the RS485 and RS232 boards

Configuring the transmission speed (jumpers D4 and D5)


Blow-up A of figures 1 or 3

OFF XM5 OFF XM5


XM3 XM3
ON XM4 ON XM4

D4
D5

D4
D5
1200 baud 2400 baud

OFF XM5 OFF XM5


XM3 XM3
ON XM4 ON XM4

D4
D5

D4
D5
4800 baud 9600 baud

Fig.5

Configuring the transmission format (jumpers D6 and D7)


Blow-up A of figures 1 or 3

OFF XM5 OFF XM5


XM3 XM3
ON XM4 ON XM4

D6
D7
D6
D7

8 bits, no parity and 1 stop bit 8 bits, even parity and 1 stop bit

Fig.6

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 4.1
4.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Installation/removal

Important warning
Board and/or communication cables installation/removal must be carried
out precisely as described below to ensure protection of life and property
and the continuous supply of power to the load connected to the Comet.
During the installation/removal, the load is supplied by the mains via the
static bypass and the inverter 7 is shut down (i.e. the load is not
protected).
Ensure that the communications cables are not installed near the power
cables.
Note: the point numbers refer to information contained in the Comet "Installation
and user manual".
Powering down Comet
Powering down is obligatory to avoid any danger during operations in the
boards and/or communication cables area (installation and configuration).

Inverter shutdown
◗ press the "inverter off" button 23 for
three seconds (see figure 7):
◗ the inverter 7 shuts down if the
transfer conditions are correct, ! ! +- I 0
◗ the "load protected" light 21 goes
off,
◗ the "load not protected" light 18 18 21 23
goes on,
◗ the load is supplied by the mains via Fig.7
the "static bypass" 3 .
Note: if the transfer conditions are not correct, it is nonetheless possible to force
inverter shutdown, however the supply of power to the load will be interrupted for
0.5 seconds. Consult the "Alarms" section in the Comet "Installation and user
manual".
Manual by-pass
◗ open the input power switch 1 ; Manual by-pass switch
◗ open the battery circuit breaker 4 :
◗ all indicating lights go off; BY-PASS
Caution: load circuits remain
live during the entire installation
procedure;
◗ turn the manual by-pass switch 8
NORMAL

TEST 1
as indicated in figure 8 from the
"NORMAL" position to the "BY-PASS"
position.
Note:
◗ the TEST 1 and TEST 2 positions
are reserved for the after-sales support
personnel; TEST 2
◗ leave the switch set to the
Fig.8
"BY-PASS" position during
installation/removal of the option.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 5.1
Installation/removal (cont.)

Installing the board


Before proceeding further, ensure that the recommendations in the
preceding sections have been followed (the Comet has been powered
down).
To locate the Comet’s communications ports 11 , for board installation, refer to
the table in figure 9, or consult the Comet Installation and user manual under the
section "Introduction to Comet".
The Comet can be equipped with up to three optional boards and it is immaterial
which slot is used by a board.

Comet Access to Installing


model the board the board

Series 11 insert
Comet rear panel horizontally
Series 31 into grooves
inserted vertically
Series 33 Comet front panel
into grooves
Fig.9

Note: the model and output level are marked on the Comet identification plate
and on the configuration sheet enclosed with the Comet Installation and user
manual.

Installing the board on the Comet series 11 and series 31 (see figure 10)
◗ remove the rear blanking cover 42 (communications ports 11 section) by
unscrewing the two screws;
◗ slide the board (affixed to the new cover) into the grooves;
◗ secure the new cover using the two screws;
◗ proceed with connections.

42

Fig.10

5.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Installing the board on the Comet series 33
Comet series 33 10/15 kVA (see figure 11)
◗ open the front door;
◗ remove lower panel 43 by unscrewing the six screws;
◗ remove screw 44 securing the communications board support plate;
◗ lift the communications board support plate to access the optional
communications port positions 11 ,
◗ remove cover 42 by unscrewing the two screws,
◗ slide the board RS232 or RS485 into the grooves,
◗ tighten the board in position using the two fixing screws,
◗ make connections;
◗ refit the communications board support plate and tighten screw 44 ;
◗ run the connection cables through the duct 45 ;
◗ put the lower panel 43 back in place and tighten the screws;
◗ close and lock the door.

43

42

44

11

45

Fig.11

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 5.3
Installation/removal (cont.)

Installing the board on the Comet series 33 (cont.)


Comet series 33 20/30 kVA (see figure 12)
◗ open the front door;
◗ remove lower panel 43 by unscrewing the five screws;
◗ remove screw 44 securing the communications board support plate;
◗ open the communications board support plate to the left to access the optional
communications port positions 11 ,
◗ remove cover 42 by unscrewing the two screws,
◗ slide the board J-BUS into the grooves,
◗ tighten the board in position using the two screws,
◗ make connections;
◗ reposition the communications board support plate and tighten screw 44 ;
◗ run the connection cables through the duct 48 ;
◗ put the lower panel 43 back in place and tighten the fixing screws;
◗ close and lock the door.

11

43

44

42

48

Fig.12

5.4 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Powering up Comet
The system must be powered up Manual by-pass switch
following installation and
connection of the option board and BY-PASS
prior to any tests:
◗ turn the manual by-pass switch 8
as indicated in figure 13 from the
"BY-PASS" position to the "NORMAL"

NORMAL

TEST 1
position;
Note: the TEST 1 and TEST 2
positions are reserved for after-sales
support personnel.

TEST 2

Fig.13

◗ close the input power switch 1 ;


◗ close the battery circuit breaker 4 ;
◗ after a few seconds, the green "load
! ! +- I 0
protected" light 21 goes on
(see figure 14), indicating that the
Comet system is operating normally.
Note: press the green "inverter on" 21 22
button 22 if the system is set to
"manual restart" mode. Fig.14

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 5.5
5.6 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
RS485 interface diagram
For proper operation, the polarity of EIA RS485 2-wire and 4-wire lines must be
set at only one point and the lines terminated at the end.
This principle is illustrated by figure 15 (2-wire topology) and by figure 16
(4-wire topology).
Diagram of a 2-wire inter-cubicle interface

5V 5V 5V

Rp Rp Rp

polarity 2 2
L- L- L- L-
connection
if end of 3 4 5 3 termi- 4 5
the line nation
Ra Ra Ra

connection 7 7 termi-
if end of nation
the line L+ L+ L+ L+

polarity 6 8 9 6 8 9

Rp Rp Rp

0V 0V 0V

transmit / receive transmit / receive transmit / receive


data data data
Master unit Board of an intermediate Board of an end-of-line
cubicle (see fig.18-D) cubicle (see fig.18-C)

Fig.15

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 6.1
RS485 interface diagram (cont.)
Diagram of a 4-wire inter-cubicle connection

5V master 5V slave 5V slave


transmitter receiver receiver
Rp Rp Rp

polarity 2 2
T- R- R- R-
termi-
3 4 3 nation 4

Ra Ra

7 7 termi-
nation

T+ R+ R+ R+
polarity
6 8 6 8

Rp Rp Rp

0V transmit data 0V receive data 0V receive data

5V

Rp master slave slave


receiver transmitter transmitter

R- T- T- T-
connection
if end of 5 5
the line
Ra
connection
if end of
the line
R+ T+ T+ T+
9 9

Rp

0V receive data transmit data transmit data

Master unit Board of an intermediate Board of an end-of-line


cubicle (see fig.19-D) cubicle (see fig.19-C)

Fig.16

6.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Connection

Polarity
Normally, the master of the network sets the polarity of the line (Rp resistors).

Termination
The two ends of the line must be terminated (Ra resistors). Allow for 1 or 2
terminators to avoid mismatching the line when any equipment at the end of the
line is disconnected.

RS485 board interface (figure 17)

0V 1
Rp 6
0V
Rp 2
5V
Ra 7
3
Female 9 pin SUB-D connector
RD = (A') 8
RD = (B') 4
TD = (A) 9
TD = (B) 5

RS485 board

Fig.17

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 7.1
Connection (cont.)
The polarity and / or termination must be handled via jumpers in the connection
cable’s male connector (see figures 18 and 19 for examples).

◗ 2-wire RS485 interface:


◗ figure 18A: interface with polarity and with termination,
◗ figure 18B: interface with polarity and without termination,
◗ figure 18C: interface without polarity and with termination,
◗ figure 18D: interface without polarity and without termination.

1 1 1 1
6 6 6 6
2 2 2 2
7 7 7 7
3 3 3 3
8 8 8 8
4 4 4 4
9 L+ 9 L+ 9 L+ 9 L+
5 L- 5 L- 5 L- 5 L-

-A- -B- -C- -D-

Fig.18

◗ 4-wire RS485 interface:


◗ figure 19A: interface with polarity and with termination,
◗ figure 19B: interface with polarity and without termination,
◗ figure 19C: interface without polarity and with termination,
◗ figure 19D: interface without polarity and without termination.

1 1 1 1
6 6 6 6
2 2 2 2
7 7 7 7
3 3 3 3
8 R+ 8 R+ 8 R+ 8 R+
4 R- 4 R- 4 R- 4 R-
9 T+ 9 T+ 9 T+ 9 T+
5 T- 5 T- 5 T- 5 T-

-A- -B- -C- -D-

Fig.19

7.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
RS232 board interface (figure 20)

1
6
2 RXD receive data
7
3 TXD transmit data
8
4
9
5 SG signal ground
RS232 board
Female 9 pin SUB-D
connector

Fig.20

Shielded, twisted cable is recommended.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 7.3
7.4 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
J-BUS protocol

Introduction The J-BUS protocol can be used to read or write one or more bits or words.

In the interest of simplicity, this document describes only the procedures


necessary for operation and monitoring of the Comet UPS.

Communications are initiated by the master and include a request from the
master and a response from the slave.

Master
request

response

Slave Slave Slave

Master requests must be addressed to one specific slave (identified by its number
in the first byte of the request frame) as is shown in the diagram below:

Response analysis
and preparation
of next exchange
Wait Wait
MASTER
request request

to slave 1 to slave N

SLAVE 1
response

request processing

SLAVE N
response

PHYSICAL
MEDIA

Exchange i Exchange i+1

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.1
J-BUS protocol (cont.)

Principle A full understanding of the protocol is only required if the master is a computer
that must be programmed.

All communications include 2 messages: a request from the master and a


response from the slave.

Each message or frame contains 4 types of information:

◗ slave address (1 byte).


The slave address specifies the destination station. If zero, the request addresses
all slaves and there is no response message (in which case it is a broadcast
message, a function not used in this application).
The slave number following the number assigned to the Comet is reserved for
maintenance purposes. For example, if the Comet has been designated slave
"1", then the number "2" cannot be used ;
◗ function code (1 byte).
Selects a command (e.g. read or write a bit or a word) and checks that the
response is correct. The J-BUS protocol comprisses 10 functions of which 3 may
be used in this application: function 3 (read n output or internal words), or function
4 (read n input words), or function 16 (write n words);
◗ information field (n bytes).
The information field contains the parameters related to the functions: bit
addresses, word address, bit value, word value, number of bits, number of
words;
◗ check word (2 bytes).
A word used to detect transmission errors.

Synchronizing data exchanges


Any character received after 3 or more character lengths of silence is interpreted
as the start of a frame. Therefore, a minimum silence of 3 character lengths
between frames must be respected.

8.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Description of request and response frames
request
information requested: bit/word address,
bit/word value, bit/word number.
1 byte 1 byte 2 bytes

slave adress function information check word


(1 à FF) code

N bytes
This function code selects one of When the message is
10 possible commands: received, the slave reads
- Function 1 : read n output or internal bits the check word and accepts
- Function 2 : read n input bits or refuses the message
- Function 3 : read n output or internal words
- Function 4 : read n input words
- Function 5 : write one bit
- Function 6 : write one word
- Function 8 : data exchange diagnostics
- Function 11 : read event counter
- Function 15 : write n bits
- Function 16 : write n words

values of bits or words read


values of bits or words written
number of bits or words
response

slave adress function data CRC


(1 à FF) code check word

1 byte 1 byte n bytes 2 bytes

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.3
J-BUS protocol (cont.)

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.

slave

master slave address


CRC 16
function computation
data

CRC 16

CRC 16 comparison

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:
Error codes:
response 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
address 1 CRC 16
(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

8.4 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Functions
Functions 1 and 2: read n bits
◗ function 1: read output or internal bits;
◗ function 2: read input bits.
The number of bits must be less than or equal to the bit field size (see memory
board).

request

address of number of bits


slave address 1 or 2 first bit CRC 16
to read
MSB LSB

1 byte 1 byte 2 bytes 2 bytes 2 bytes

response

number of first last


slave address 1 or 2 bytes byte byte CRC 16
read read read

1 byte 1 byte 1 byte N bytes 2 bytes

byte detail:

last bit transmitted first bit transmitted

Unused bits are set to zero

example
Reading bits at location 410 to 417 of slave at address 20H
(charger signals)

request:
20 01 0410 08 E9 FC

response:
20 01 01 10101001 9B CA

417 410 (binary values)

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.5
J-BUS protocol (cont.)

Functions 3 and 4: read n words


The number of words must be less than or equal to the word field size
(see memory board).
◗ function 3: read output or internal words;
◗ function 4: read input words.

request

adress of number of
slave address 3 or 4 first bit words CRC 16
MSB LSB MSB LSB

1 byte 1 byte 2 bytes 2 bytes 2 bytes

response

number of first word last word


slave address 3 or 4 bytes read CRC 16
PF pf PF pf

1 byte 1 byte 1 byte 2 bytes 2 bytes 2 bytes

example
Reading words at location 90 to 99 of slave at address 28H
(voltage fields)

request:
28 03 0090 000A A8 45

response:
28 03 14 XXXX YYYY CRC 16

word 0090 word 009A

8.6 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Function 5: writing a bit
request

slave address 5 bit address bit value 0 CRC 16

1 byte 1 byte 2 bytes 1 byte 1 byte 2 bytes

bit set to 0 write 0


bit set to 1 write FF
response

slave address 5 bit address bit value 0 CRC 16

In function 5 the response and request frames are identical.

Function 6: writing a word

request

slave address 6 word address word CRC 16

1 byte 1 byte 2 bytes 2 bytes 2 bytes

response

slave address 6 word address word CRC 16

The response is echoed acknowledging that the word sent has been received.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.7
J-BUS protocol (cont.)

Function 8: reading error diagnosis counters


Each slave manages a set of nine 16 bit counters for error diagnosis:

- request / response:

sub-function data CRC 16


slave address 8 code

1 byte 1 byte 2 bytes 2 bytes 2 bytes

- the slave must echo 00 XYZT X, Y, Z, T are user


the request defined (transmission
parameters)
- reset error 0A 0000
diagnosis counter

- read the total number of:

received frames with CRC error (CNT 1) 0B XXXX


received frames with CRC error (CNT 2) 0C XXXX

number of exception responses (CNT 3) 0D XXXX requests:


XXXX equals 0000
frames addressed to the station (CNT 4) 0E XXXX response:
(not including broadcast) XXXX is the counter
broadcast requests received (CNT 5) 0F XXXX value
number of NACK responses (CNT 6) 10 XXXX
unit not ready responses (CNT 7) 11 XXXX

illegal characters (CNT 8) 12 XXXX

8.8 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Function 11: reading event counters
The master and each slave have one event counter.
This counter is incremented each time a frame is received and interpreted
correctly by the slave (except for function 11 itself).
A correctly transmitted message increments the counter. If the slave sends an
exception response, the counter is not incremented.
The master can read the counter to determine whether or not the slave correctly
interpreted the command (incremented the counter or not).

These functions can be used to diagnose the data exchange taking place
between master and slaves.

If the master counter equals the slave counter, the slave executed the command
sent by the master.
If the master counter is one higher than the slave counter, the slave did not
execute the command sent by the master.

request

slave address 0B CRC 16

response

slave
slave address 0B 0 counter word CRC 16

1 byte 1 byte 2 bytes 2 bytes 2 bytes

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.9
J-BUS protocol (cont.)

Function 15: writing n consecutive bits


request

address of number number bit data CRC 16


slave adress 0F the first bit of bits of bytes

1 byte 1 byte 2 bytes 2 bytes 1 byte N bytes 2 bytes

réponse 2 ≤ X ≤ 1968

1 ≤ N ≤ 246

last bit of first bit of last bit of first bit of


first byte first byte byte N byte N

first byte N bytes

response

slave address 0F address of number of bits CRC 16


the first bit

1 byte 1 byte 2 bytes 2 bytes 2 bytes


1 ≤ X ≤ 1968

Note: if the slave address is 0, all units execute the write command without sending a
response.

8.10 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Function 16: writing n consecutive words
request

slave address 10 address of number number data bytes CRC 16


(*) first word of words of bytes N

1 byte 1 byte 2 bytes 2 bytes 1 byte N bytes 2 bytes

2 ≤ X ≤ 123

4 ≤ N ≤ 246

MSB LSB MSB LSB MSB MSB LSB

first word last word

response

slave address 10 address of number of


(*) CRC 16
first word words written

1 byte 1 byte 2 bytes 2 bytes 2 bytes

Note: if the slave address is 0, all units execute the write command without sending a
response

example

Writing words 00 and 01 of slave at address 20 (synchronization counter)


(00) = 0000
(01) = 0000

request
10
20 (*) 0000 0002 04 0000 0000 0000 0000 5C 93

response
10
20 (*) 0000 0002 47 79

(*) 10 H = 16 D

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.11
J-BUS protocol (cont.)

CRC 16 algorithm

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

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

8.12 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Example of a 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


Shift 2 0110 1111 1111 1111 1
Set flag to 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 1100 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

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.13
J-BUS protocol (cont.)

Example of CRC 16 computation in "C" using table lookup


#define CPH 0 /* most significant bytes */
#define CPL 1 /* least significant bytes */

/* TABLE OF MOST SIGNIFICANT BYTES FOR CRC 16 COMPUTATION */

char tbcrch [ ] =
{
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
1,192,128,65,0,193,129,64,0,193,129,64,1,192,128,65,
0,193,129,64,1,192,128,65,1,192,128,65,0,193,129,64,
};

/* TABLE OF LEAST SIGNIFICANT BYTES FOR CRC 16 COMPUTATION */

char tbcrcl [ ] =
{
0,192,193,1,195,3,2,194,198,6,7,199,5,197,196,4,
204,12,13,205,15,207,206,14,10,202,203,11,201,9,8,200,
216,24,25,217,27,219,218,26,30,222,223,31,221,29,28,220,
20,212,213,21,215,23,22,214,210,18,19,211,17,209,208,16,
240,48,49,241,51,243,242,50,54,246,247,55,245,53,52,244,
60,252,253,61,255,63,62,254,250,58,59,251,57,249,248,56,
40,232,233,41,235,43,42,234,238,46,47,239,45,237,236,44,
228,36,37,229,39,231,230,38,34,226,227,35,225,33,32,224,
160,96,97,161,99,163,162,98,102,166,167,103,165,101,100,164,
108,172,173,109,175,111,110,174,170,106,107,171,105,169,168,104,
120,184,185,121,187,123,122,186,190,126,127,191,125,189,188,124,
180,116,117,181,119,183,182,118,114,178,179,115,177,113,112,176,
80,144,145,81,147,83,82,146,150,86,87,151,85,149,148,84,
156,92,93,157,95,159,158,94,90,154,155,91,153,89,88,152,
136,72,73,137,75,139,138,74,78,142,143,79,141,77,76,140,
68,132,133,69,135,71,70,134,130,66,67,131,65,129,128,64,
};

8.14 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
/**************************************************************************************************/
/* FUNCTION CALL: crc = crc16 (message, length); */
/* with char *message; message = address of message */
/* */
/* int length; length of received message (including CRC) */
/* expressed in number of bytes */
/* int crc ; = CRC16 calculated from the "address", "code" and */
/* "information" fields. */
/* */
/* RETURN VALUE: calculated crc 16 (int crc) */
/**************************************************************************************************/

int crc16 (message, length)


unsigned char message [ ]; /* buffer containing message */
/* for which the crc16 is to be calculated */
int length; /* length of message to be checked */
/* (including crc16) */
{ /* beginning of the function */
int i ; /* loop variable */
int j ; /* calculation and displacement variable */
union { /* calculated crc16: */
int ival ; /* - whole */
unsigned char cval [ 2 ]; /* - table of 2 characters */
/* unsigned is important since otherwise the sign */
/* extension causes negative displacements with */
/* respect to the beginning of the table */
} crcal
/*$ initialization of calculated crc */
crcal.ival = 0XFFFF;
i = 0;
/*$ correction of the length to be checked : remove the */
/*$ received crc16 from the length to be checked */
length = length - 2;
/*$ WHILE there are bytes to be checked DO */
while ( i < length )
{
/*$ calculate the table index */
j = (int) ( message [ i ] ^ crcal.cval [ CPH ] );
/*$ most significant byte */
crcal.cval [ CPH ] = tbcrch [ j ] ^ crcal.cval [ CPL ];
/*$ least significant byte */
crcal.cval [ CPL ] = tbcrcl [ j ];
/*$ next byte */
i++;
}; /*$ END WHILE there are bytes to be checked */
/*$ return the calculated crc */
return ( crcal.ival );
} /* end of function */

Note: if the CRC is computed using table lookup, the most significant byte is
transmitted first.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 8.15
8.16 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Comet
This chapter presents the specific operating aspects and system data provided by
the communications board.
For more detailed information, please refer to the "System information" section.
The J-BUS hexadecimal communications protocol is used in slave mode.

Block diagram
manual by-pass

static bypass
mains 2

a
rectifier inverter
mains 1
mains
power supply b c load
d

charger
battery

Measured quantities

a F mains 2 <C2> U mains 2 <96>


I mains 2 <85 to 87>

b F mains 1 <C0> U mains 1 <90>

c F inverter <C1> U inverter <93 to 95>


I inverter <82 to 84>

d F load <C3> U load <97 to 99>


I load <88 to 8A>

e Apparent
power <B0>

I battery or I dc <D1> U battery or U dc <D0>


battery backup time <D2>
The numbers enclosed by <> (example <85 to 87>) are the addresses in the data array.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 9.1
Comet (cont.)

Main status bits (UPS operating information)


Normal : inverter powers load and bit 460 = 1
full backup time available

Danger : inverter does not power load bit 461 = 1

Downgraded : malfunction or bit 462 = 1


auxiliary fault

Load on battery : load on battery power bit 468 = 1

Operating modes
The following section describes the different states of a Comet UPS and the
addresses of the bits in the system data array.

Normal operation

Normal: bit 460 = 1


Danger: bit 461 = 0
Downgraded: bit 462 = malfunction dependent
Load on battery: bit 468 = 0
Static bypass module: bit 442 = 0
Rectifier module: bit 426 = 1
Inverter module: bit 435 = 1
Battery circuit breaker: bit 420 = 0

Load on battery

Normal: bit 460 = 1


Danger: bit 461 = 0
Downgraded: bit 462 = malfunction dependent
Load on battery: bit 468 = 1
Static bypass module: bit 442 = 0
Rectifier module: bit 426 = 0
Inverter module: bit 435 = 1
Battery circuit breaker: bit 420 = 0

9.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Load on Mains 2

Normal: bit 460 = 0


Danger: bit 461 = 1
Downgraded: bit 462 = malfunction dependent
Load on battery: bit 468 = malfunction dependent
Static bypass module: bit 442 = 1
Rectifier module: bit 426 = malfunction dependent
Inverter module: bit 435 = 0
Battery circuit breaker: bit 420 = malfunction dependent

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 9.3
9.4 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
System information

Message formats This section describes the messages exchanged between the communications
interface and the external computer based on the J-BUS protocol.

The length of time after which a message must be interpreted as


"not understood" depends on the type of command sent.
The table below lists maximum response times:

Data rate 1200 Baud 2400 Baud 4800 Baud 9600 Baud
Status information only 0.5 s 0.25 s 0.12 s 0.06 s
All measurements 2s 1s 0.5 s 0.25 s
Response time of event (independent of data rate)
- Inverter start-up and connect : 30 s
- Rectifier-charger startup : 30 s
- Rectifier-charger or inverter stop : 30 s

Example of read data array commands sent by the terminal


(address: 20H)
Request Station Function Data Length CRC 16
code address
Read voltage 20 03 90 000A C3 52
array
(10 values)
Read current 20 03 80 000B 35 04
array
(11 values)
Read global 20 01 460 0007 7A 57
state bits
(7 bits)
For the "responses", refer to the "JBUS protocol" section functions 1 and 3.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 10.1
System information (cont.)

List of variable fields


J-BUS fields Address in hex Access
start end
Binary data 40 4F read
Counters 60 62 read
Currents 80 8B read
Voltages 90 99 read
Powers B0 B2 read
Frequencies C0 C3 read
Battery D0 D3 read

The binary data and binary commands can be accessed bit or word-wise.
The word address and position of the bit in the word can be determined from the
bit address:
◗ hundreds and tens digit of bit address = word address;
◗ least significant digit of bit address = bit position.

General definitions
Object 0 1
Switch open closed
Unit off on
Fault no fault fault
Control device not activated activated

10.2 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Tables of measured data
Current fields
Measured current Units J-BUS address Type
hex word S11 S31 S33
I1 (I phase 1) Inverter A 82 yes yes yes
I2 (I phase 2) Inverter A 83 yes
I3 (I phase 3) Inverter A 84 yes
I1 (I phase 1) Mains 2 A 85 yes yes yes
I2 (I phase 2) Mains 2 A 86 yes
I3 (I phase 3) Mains 2 A 87 yes
I1 (I phase 1) Load A 88 yes (*) yes (*) yes
I2 (I phase 2) Load A 89 yes
I3 (I phase 3) Load A 8A yes

Voltage fields
Measured voltage Units J-BUS address Type
hex word S11 S31 S33
U Mains 1 V 90 yes yes yes
V1 Inverter V 93 yes yes yes
V2 Inverter V 94 yes
V3 Inverter V 95 yes
U Mains 2 V 96 yes yes yes
V1 Load V 97 yes yes yes
V2 Load V 98 yes
V3 Load V 99 yes

(*) : for Comet S11 or S31 5kVA models, this value is forced to zero when the load is
powered by the emergency Mains.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 10.3
System information (cont.)

Power fields
Power measurements Units J-BUS address Type
hex word S11 S31 S33
S Apparent Power kVA B0 yes (*) yes (*) yes
% load - B1 yes (*) yes (*) yes
% rated load - B2 yes (*) yes (*) yes

Frequency and counter fields


Measured quantity Units J-BUS address Type
hex word S11 S31 S33
Frequencies
F Inverter Hz C1 yes yes yes
F Mains 2 Hz C2 yes yes yes
F Load Hz C3 yes yes yes
Counters
Measurement counter 60 yes yes yes
Status counter 61 yes yes yes
Number of times 62 yes yes yes
On battery power

Battery fields
Measured quantity Units J-BUS address Type
hex word S11 S31 S33
U battery V D0 yes yes yes
Battery backup time mn D2 yes (1) yes (1) yes (1)
Battery power operation D4 yes (1) yes (1) yes (1)
Valid indicator
(1)
: UPSs equipped with standard batteries.

(*) : for Comet S11 or S31 5kVA models, this value is forced to zero when the load is
powered by the emergency Mains.

10.4 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Tables of binary data
Bit meaning Meaning hex word JBUS address
bit = 0 bit = 1 bit word
◗ Mains 1 voltage normal outside 400 40
tolerances
◗ Chopper operation off on 412 41
◗ Battery circuit ok fault 420 42
◗ End of battery no yes 421
backup time
◗ Charger status ok fault 422
◗ Check battery no yes 424
◗ Low battery no yes 425
shutdown warning
◗ Charger off on 426
operating status
◗ Peak overload no yes 433 43
◗ Inverter overload no yes 434
◗ Inverter operating status off on 435
◗ Inverter thermal no yes 437
overload
◗ K3N contactor status open closed 441 44
◗ Inverter connection not connected 443
status connected
◗ Mains 2 voltage normal outside 450 45
tolerances
◗ Mains 2 frequency normal outside 451
tolerances
◗ Mains 2 / inverter normal outside 452
phase shift tolerances
◗ Phase rotation ok fault 453
◗ Mains 2 overload no yes 454
◗ Mains 2 no yes 455
thermal overload
◗ Normal no yes 460 46
◗ Danger no yes 461
◗ Downgraded no yes 462
◗ Low battery no yes 463
shutdown warning
◗ End of backup time no yes 464
◗ Operating on no yes 468
battery power

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 10.5
System information (cont.)

Glossary of information descriptors (data words at address 40 to 46)


Every bit is listed according to the following format:
bit address: description,
followed by explanations corresponding to bit = 1.

Word address: 40
◗ 400: Mains 1 voltage outside of tolerances.
The rectifier stops operating when Mains 1 phase-to-phase voltage is outside of
tolerances.

Word address: 41
◗ 412: chopper operating status.
Indicates the operating status of the chopper.

Word address: 42
◗ 420: battery circuit status.
Indicates that the battery circuit is off either due to the circuit breaker being open
or for other reasons;
◗ 421: end of battery backup time.
Indicates that the minimum battery voltage threshold has been reached during
operation on battery power and results in the UPS being shutdown;
◗ 422: charger status.
Indicates that the minimum or maximum battery voltage has been reached
following a charger fault or incorrect parameter parameter setting;
◗ 424: check battery.
Indicates that the battery is to be checked;
◗ 425: low battery shutdown warning.
The warning indicates that the end of backup time is imminent. It is only
applicable when the inverters operate on battery power and may be
parameterized;
◗ 426: charger operating status.
Indicates whether the charger is on or off.

Word address: 43
◗ 433: peak overload.
Indicates operation on an overload with an excessively high peak current;
◗ 434: inverter overload.
Informs the user that the load is drawing more than the rated UPS output;
◗ 435: inverter operating status.
Indicates whether the inverter is on or off;
◗ 437: inverter thermal overload.
Informs the user that a current overload has occurred on the inverter. The inverter
shuts down after the time given by the overload curves.

10.6 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS
Word address: 44
◗ 441: K3N contactor status.
Indicates the position of the inverter output contactor;
◗ 443: Inverter connection status.
Indicates that the load is powered by the inverter (connected) or by Mains 2
(not connected).

Word address: 45
◗ 450: Mains 2 voltage outside of tolerances.
Indicates that the amplitude of Mains 2 voltage is outside of tolerances;
◗ 451: Mains 2 frequency outside of tolerances.
Informs the user that Mains 2 frequency is outside of tolerances;
◗ 452: inverter / Mains 2 phase shift outside of tolerances.
Indicates that the phase shift between the inverter and Mains 2 is outside of
tolerances;
◗ 453: Phase rotation.
Indicates that the phase rotation for three-phase mains power supplies is not
correct;
◗ 454: Mains 2 overload.
During an overload the load is supplied by Mains 2 via the "static bypass";
◗ 455: Mains 2 thermal overload.
Informs the user that a current overload has occurred on "static bypass";
The static bypass will open after the period given in the overload curves.

Word address: 46
◗ 460: system normal, load protected.
This status indicates that the unit is operating normally. The load is powered by
the inverter and the full battery backup time is available if mains power fails;
◗ 461: system danger.
Informs the user that a fault has occurred on the unit. The load is supplied by
Mains 2;
◗ 462: system downgraded.
Indicates a malfunction or environment fault has occurred. Nevertheless, the
inverter can still supply the load;
◗ 463: low battery shutdown warning.
The warning indicates that the end of battery backup time is imminent;
◗ 464: end of battery backup time.
Indicates that the end of battery backup time has been reached and that the UPS
is shutdown. The load is no longer supplied;
◗ 468: operating on battery power.
Indicates that mains power is faulty and that the inverter is operating on battery
power. The load is supplied by the inverter for the length of the battery backup
time.

MGE UPS SYSTEMS Installing and using the Comet J-BUS option: E-6761008XT/EC 10.7
10.8 Installing and using the Comet J-BUS option: E-6761008XT/EC MGE UPS SYSTEMS

You might also like