This manual must only be used by
a qualifi ed heating installer / service
technician. Read all instructions,
including this manual, the Installation
and Operation Manual, and the Service
Manual, before installing. Perform
steps in the order given. Failure to
comply could result in severe personal
injury, death, or substantial property
damage.
Revision Notes ................................................... Back Cover
1 Introduction
The information contained in this manual provides general guidelines for the implementation of ModBus communication with
the Lochinvar Armor water heaters (151 - 801), Knight (81-286), Knight XL (400 - 801), Wall Mount (51 - 211), and Wall Hung
(55 - 399) boilers.
All ModBus networks are implemented utilizing a master-slave arrangement where all boilers/water heaters are slaves and the
master is a building automation system capable of communicating over a RS-485 half duplex serial connection.
Defi nitions
Abbreviation or AcronymMeaning
ASCIIAmerican Standard Code for Information Interchange
BASBuilding Automation System
Baud (Baud Rate)Number of data bits transmitted per second (bps)
EMSEnergy Management System
FDXFull-Duplex
HDXHalf-Duplex
HexHexadecimal Number (0 - 9, A - F)
I/O BoxInput/Output (I/O)
LSBLeast Signifi cant Byte
ModBusA serial, half-duplex data transmission protocol developed by AEG Modicon
MSBMost Signifi cant Byte
RS232
RS485A standard for serial transmission of data based on the RS-485 Standard
A standard for serial, full-duplex (FDX) transmission of data based on the
RS232 Standard
RTURemote Terminal Unit
Minimum System Requirements
• BAS system or computer with a serial or USB port with a converter to RS-485 half duplex.
• Unit equipped with ModBus communication board.
• Shielded twisted pair communication cable.
2
2 Installation
A
ModBus Communication Instructions
ModBus installation procedure - for
Models WB, AW, KB and KBX
1. Turn OFF the main electrical power to the appliance.
2. Turn OFF the main manual gas shutoff to the appliance.
3. Assemble the ModBus control board to the sheet metal
base as shown in FIG. 2-1.
4. Connect the power harness from the appliance to the
ModBus through the sheet metal cover hole (see
FIG. 2-2).
5. Using the two (2) sheet metal screws provided in the kit,
attach the pre-painted sheet metal cover over the
ModBus assembly for protection from line voltage
(FIG. 2-2).
6. Locate the pilot holes on the side of the jacket (left side if
AW/KB/KXL or right side if WB), using the sheet metal
screws provided in the kit, mount the ModBus assembly
to the appliance (FIG. 2-3).
Wiring
7. Disconnect power to the transformer by removing
connection “B”, see FIG. 2-4, page 4.
8. Connect A, C, D, and B (FIG. 2-4).
9. Connect the ModBus to the control board of the appliance
(see FIG. 2-5 on page 4).
10. Turn on the main electrical power and the main manual
gas shutoff to the appliance.
11. Confi gure the control board and unit controls per this
manual and resume operation.
Figure 2-2_Attach Cover to ModBus Assembly
MODBUS ASSEMBLY
MOUNT PRE-PAINTED SHEET METAL
COVER OVER THE MODBUS ASSEMBLY
FOR PROTECTION FROM LINE VOLTAGE
TTACH POWER HARNESS
TO MODBUS THROUGH
SHEET METAL COVER HOLE
Figure 2-3_Mount ModBus Assembly to Unit
- LOCATE THE PILOT HOLES
- USING THE 4 SHEET METAL
SCREWS PROVIDED IN THE KIT
MOUNT THE MODBUS ASSEMBLY
TO THE UNIT (SIDE DEPENDENT
ON MODEL)
Figure 2-1_Assemble ModBus Control Board
SHEET METAL BASE
BLT2007 [X4]
JKB40095
BLT7068 [X4]
NOTE: KB/KXL/AW - MOUNT MODBUS ASSEMBLY TO THE LEFT SIDE OF THE JACKET
WB - MOUNT MODBUS ASSEMBLY TO THE RIGHT SIDE OF THE JACKET
3
2 Installation
Figure 2-4_Harness Connections_KB, KBX, WB, and AW
ModBus Communication Instructions
FROM POWER
HARNESS
A
B
G
W
ROUTE THROUGH
JACKET HARNESS
CLIPS
USE SUPPLIED CABLE TIE
TO CONNECT MODBUS POWER
HARNESS TO BLOWER POWER
WIRES (RED, WHITE, GREEN)
TO TRANSFORMER
D
C
B
W
WGB
B
B
W
GY
G
R
BL
G
Figure 2-5_Connect ModBus to Control Board
CONNECT TO
CONTROL BOARD
FROM MODBUS*
*HARNESSES CAN ONLY BE CONNECTED ONE WAY.
4
LOW VOLTAGE
CONNECTION BOARD
CONNECT TO
CONNECTION BOARD
FROM MODBUS*
2 Installation (continued)
ModBus Communication Instructions
Installation Procedure - for WH Models
1. Turn OFF the main electrical power to the appliance.
2. Turn OFF the main manual gas shutoff to the appliance.
3. To assemble the ModBus control board to the sheet metal,
insert four (4) standoffs into the front access panel
(FIG. 2-6).
4. Place the control board onto the standoffs installed in
Step 3. Use the screw (provided in kit) to secure the
control panel cover (FIG. 2-6).
5. Connect the wire harnesses (WRE20073, WRE20075 and
WRE20077) from the appliance to the ModBus following
the diagram shown in FIG. 2-7.
6. Turn on the main electrical power and the main manual
gas shutoff to the appliance.
7. Confi gure the control board and unit controls per this
manual and resume operation.
Figure 2-7_Harness Connections_WH
Figure 2-6_Assemble ModBus Control Board_WH
INSERT
STANDOFFS
USE SCREW TO
SECURE COVER
TO FRONT PANEL
(WRE20075)
(WRE20073)
G
R
B
L
(WRE20077)
G
Y
G
W
B
W
W
G
B
B
5
ModBus Communication Instructions
3 Confi guration
The ModBus communication board is equipped with a set of ten dip switches that are used to set the board confi guration
(address, baud rate, and parity settings). The fi rst eight are used to set the address of each board. The ninth baud rate. The
tenth is parity.
Figure 3-1_ModBus Communication Board
DIP SWITCHES
LED’S
Addressing
The ModBus addressing space is comprised of 256 different
address.
• 0 is reserved for broadcast messages from the master
device
• 1 - 247 are free to use for each unique device
• 248 - 255 are reserved
To set the ModBus address the dip switches can be set in
either the 0 position or the 1 position. For switches set to
the 1 position their value will be added together to determine
the address.
For each switch set to the 1 position it has the following value:
To set the address of the ModBus board to 50, dip switches
2, 5, and 6 have to be set to the 1 position. The address is
determined by adding the values of all the dip switches together.
Address = Value of Dip switch 1 + Value of Dip switch 2 +
Value of Dip switch 3 + Value of Dip switch 4 + Value of Dip
switch 5 + Value of Dip switch 6 + Value of Dip switch 7 +
Value of Dip switch 8
In this example:
Address = 0 + 2 + 0 + 0 + 16 + 32 + 0 + 0 = 50
6
3 Confi guration (continued)
ModBus Communication Instructions
Timing Specifi cations
The baud rate for the ModBus board is selectable with Dip
switch #9.
1 = 19200 bps
0 = 9600 bps
Each message is started by at least 3.5 character times of
silence. The maximum delay between frames is 1.5 character
times.
When the system temperature and/or tank temperature
is provided by the BAS to the boiler, it is critical that the
temperature be updated every few seconds. If the boiler does
not receive updated temperatures within a timeout period
(installer adjustable), the control will revert to using its own
sensor inputs (if sensors are connected). The timeout is
programmable as follows:
NOTICE
1. Press and hold the LEFT SELECT [MENU] key for 5
seconds.
2. Enter installer code - 5309.
3. Scroll down and select [CONTROL MODES].
4. Scroll down and select [MODBUS T/O].
5. Scroll to desired time. Press the RIGHT SELECT [SAVE]
key.
Please note that the brackets ([]) denote
screen status.
Data Transmission Mode
Many ModBus bus master devices can be confi gured to
transmit data in either ModBus RTU or ModBus ASCII modes.
Since RTU messages can be formatted to use fewer data bits and
are therefore more effi cient, RTU has been chosen to be used
with all Lochinvar ModBus communication. Please ensure that
the master device is transmitting ModBus RTU.
ModBus Board Diagnostics
The ModBus board is equipped with three LED’s for visual
diagnostics: Two yellow LED’s and one green. One yellow LED
(D5) is used to indicate reception of data. The other yellow
LED (D6) is used to indicate transmission of data. The green
LED (D7) is used to show internal faults.
Internal Faults:
Normal Operation = 1 second on, 1 second off
Controller Fault = Continuously on
No Burner Control Communication = 0.5 seconds on, 1.5
seconds off
No ModBus Communication = 1.5 seconds on, 0.5 seconds
off
ModBus Communication
The ModBus communication commands and exception codes
that are supported by the ModBus communication board can
be found on pages 8 and 9 of this manual.
The timeout is adjustable between 5 and 120 seconds. The
default timeout is 10 seconds.
When the BAS is not providing either of these temperatures,
but is still controlling the boiler (such as providing a
modulation command), the BAS must refresh these
commands at least every 4 minutes. If the commands are
not refreshed, the boiler will revert to operating based on its
own inputs.
Parity
Parity is set by the position of Dip switch #10.
0 = No Parity
1 = Even Parity
If No Parity is selected there will be two stop bits, otherwise
there will be one.
7
3 Confi guration
ModBus Function Set
ModBus Communication Instructions
FunctionSub Function
HEXDescription
DecHEXDec
101Read Coil Status
202Read Input Status
303Read Holding Registers
404Read Input Registers
505Force Single Coil
606Preset Single Register
707Read Exception Status
808000Diagnostic - Return Query Data
101Diagnostic - Restart Communication
202Diagnostic - Return Diagnostic Register
404Diagnostic - Force Listen Mode
100A
110BDiagnostic - Return Bus Message Count
Diagnostic - Clear Counters and Diagnostic
Registers
120CDiagnostic - Bus Communication Error Count
130DDiagnostic - Bus Exception Error Count
140EDiagnostic - Return Slave Message Count
150FDiagnostic - Return Communication Error Count
1610Diagnostic - Return Slave NAK Count
1711Diagnostic - Return Slave Busy Count
1812Diagnostic - Return Bus Character Overrun Count
2014Diagnostic - Clear Overrun Counter and Flag
110BGet Communication Event Counter
120CGet Communication Event Log
150FWrite Multiple Coils
1610Write Multiple Registers
1711Report Slave ID
2317Read / Write Multiple Registers
8
ModBus Communication Instructions
3 Confi guration (continued)
ModBus Exception Codes
MODBUS Exception Codes
CodeNameMeaning
The function code received in the query is not an allowable action for the server
(or slave). This may be because the function code is only applicable to newer
01ILLEGAL FUNCTION
02ILLEGAL DATA ADDRESS
devices, and was not implemented in the unit selected. It could also indicate that
the server (or slave) is in the wrong state to process a request of this type, for
example because it is unconfi gured and is being asked to return register values.
The data address received in the query is not an allowable address for the
server (or slave). More specifi cally, the combination of reference number and
transfer length is invalid. For a controller with 100 registers, the PDU addresses
the fi rst register as 0, and the last one as 99. If a request is submitted with a
starting register address of 96 and a quantity of registers of 4, then this request
will successfully operate (address-wise at least) on registers 96, 97, 98, 99. If
a request is submitted with a starting register address of 96 and a quantity of
registers of 5, then this request will fail with Exception Code 0x02 “Illegal Data
Address” since it attempts to operate on registers 96, 97, 98, 99 and 100, and
there is no register with address 100.
03ILLEGAL DATA VALUE
04SLAVE DEVICE FAILURE
05ACKNOWLEDGE
06SLAVE DEVICE BUSY
08MEMORY PARITY ERROR
A value contained in the query data fi eld is not an allowable value for server
(or slave). This indicates a fault in the structure of the remainder of a complex
request, such as that the implied length is incorrect. It specifi cally does NOT
mean that a data item submitted for storage in a register has a value outside the
expectation of the application program, since the MODBUS protocol is unaware of
the signifi cance of any particular value of any particular register.
An unrecoverable error occurred while the server (or slave) was attempting to
perform the requested action.
Specialized use in conjunction with programming commands. The server
(or slave) has accepted the request and is processing it, but a long duration of
time will be required to do so. This response is returned to prevent a timeout error
from occurring in the client (or master). The client (or master) can next issue a Poll
Program Complete message to determine if processing is completed.
Specialized use in conjunction with programming commands. The server
(or slave) is engaged in processing a long -- duration program command. The
client (or master) should re-transmit the message later when the server (or slave)
is free.
Specialized use in conjuction with function codes 20 and 21 and reference type
6, to indicate that the extended fi le area failed to pass a consistency check. The
server (or slave) attempted to read record fi le, but detected a parity error in the
memory. The client (or master) can retry the request, but service may be required
on the server (or slave) device.
0AGATEWAY PATH UNAVAILABLE
0B
GATEWAY TARGET DEVICE
FAILED TO RESPOND
Specialized use in conjunction with gateways, indicates that the gateway was
unable to allocate an internal communication path from the input port to the
output port for processing as the request. Usually means that the gateway is
misconfi gured or overloaded.
Specialized use in conjunction with gateways, indicates that no response was
obtained from the target device. Usually means that the device is not present on
the network.
9
ModBus Communication Instructions
4 Memory Map
Primary Data Tables
TableData TypeRead / Write
Discrete InputsSingle BitRead Only
CoilsSingle BitRead / Write
Input Registers16-Bit WordRead Only
Holding Registers16 Bit WordRead / Write