Professional Documents
Culture Documents
FLG-MODBUS
Contents
About this guide 5
Other resources 5
Key illustrations 6
Quick start setup 9
Operational overview 10
Data storage and backup 10
Sequence of operations 10
System design and application 11
Hardware installation and setup 12
Power supply 12
Connecting to the BACnet network 12
Setting the MS/TP MAC address with Switch 2 13
Terminating MS/TP cabling 13
Connecting to a Modbus network 14
Setting Modbus protocol options 14
Mapping Modbus data to AVs and BVs 17
Assigning Modbus addresses 17
Setting up data mappings 17
Checking Modbus communications 19
Clearing Modbus object data 20
Downloading a ROC file 20
Appendix A: Syntax for description string 21
Scaling point data 24
Examples 24
Appendix B: Modbus function codes 25
Appendix C: Error indicators 26
BACnet error indications 26
Operator workstation error indications 26
Using the aler-diagnostics property 27
!
while standing in water.
Wiring and equipment separations
All wiring and controllers must be installed to minimize the possibility of accidental contact with other, potentially
hazardous and disruptive power and lighting wiring. Never place 24VAC or communications wiring near other
bare power wires, lightning rods, antennas, transformers, or steam or hot water pipes. Never place wire in any
conduit, box, channel, duct or other enclosure containing power or lighting circuits of any type. Always provide
adequate separation of communications wiring and other electrical wiring according to code. Keep wiring and
controllers at least six feet from large inductive loads (power distribution panels, lighting ballasts, motors, etc.).
Failure to follow these guidelines can introduce electrical interference and cause the system to operate
erratically.
Warning
This equipment has been tested and found to comply with the limits for a class A digital device, pursuant to part
15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference
when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate
radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause
harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause
harmful interference, in which case the user will be required to correct the interference at his own expense.
Other resources
Table 1 Sources for more information
Document ID Contains
Product Data Sheets A summary of applications, capabilities, and
technical data.
Envision for BACtalk Installation Information needed to use Device Manager to view
and Startup Guide device information about the FLG-MODBUS or to
(LTBT-TM-ADMIN) download a ROC file. Also use to set up automated
control features for your BACtalk system.
BACtalk System Design Guide Use to design a BACnet internetwork or for specific
(LTBT-TM-SYSDSGN) integration tips for your application.
Key illustrations
24 VAC
terminal block
(See page 12)
Status LED
(See page 19)
MS/TP MAC
addressSwitch 2
(See page 13) JP3
(See page 14)
MS/TP LED
(See page 19)
Modbus
OptionsSwitch 3
terminal block
(See page 14)
(See page 14)
MS/TP
MS/TP header for terminal block
(See page 13)
FST-100
connection
Figure 1 FLG-MODBUS
1 7/16" (37mm)
3/16" (5mm)
24VAC
GND
FLG-MODBUS
ASSEMBLED IN USA
POWER STATUS
POWER: 24 VAC @ 24VAC - 1
0.5A MAX GND - 2
CLASS 2 CIRCUITS
ONLY
USE COPPER
EIA-232 / 485
CONDUCTORS ONLY STATUS (DB-9)
FOR INDOOR USE ONLY
LBL-FLG-MB-A
SUITABLE FOR PLENUM MOUNTING
MODBUS STATUS
TUX/MODBUS
STATUS SW2 = MS/TP MAC ADDR JP3
VALUE EIA-232
SW2 MODBUS
ON CONFIG.
1 1
2 2 JUMPER
3 4 1 2 3
4 8
4 3/4" (120mm) 5
6
16
32
7 64 EIA-232
EIA-485
MS/TP STATUS 4 5/16" (109mm)
SW3 MODBUS SETTINGS
SWITCH NUMBER
MS/TP OFF ON
STATUS 1 RTU ASCII
2 NO PARITY PARITY
SW3 3 ODD PARITY EVEN PARITY
4 9600 BAUD 4800 BAUD
5 STANDARD 1 STOP BIT
6 (NOT USED)
+
7 (NOT USED) MODBUS
-
(B) + - 3
EIA-485
(W) - - 4
OPEN ENERGY
MANAGEMENT
EQUIPMENT 5K05 +
(B) + - 5 MS/TP
OPTION MS/TP
(W) - - 6
+ -
MS/TP
-
1/2" (12mm)
Figure 3 Typical Modbus EIA-232 and EIA-485 architectures with the FLG-MODBUS and
BACnet networks.
Task See
1 Connect 24 VAC power to the FLG-MODBUS page 12
Operational overview
The FLG-MODBUS is a BACnet-compliant device that installs between a
BACnet MS/TP network and a Modbus EIA-232 or EIA-485 network. The FLG-
MODBUS connects Modbus devicessuch as variable speed drivesto a
BACnet system, converting data from connected Modbus devices to BACnet AV
and BV objects.
You can clear all mappings and data from the FLG-MODBUS. See Clearing
Modbus object data on page 20 for more information.
Sequence of operations
When the FLG-MODBUS powers up, it checks to see if the real-time operating
code (ROC) file is valid. If the ROC file is not valid, the FLG-MODBUS waits
for a valid ROC file. If the ROC file is valid, the FLG-MODBUS runs the file.
After a valid ROC file is found, the FLG-MODBUS joins the MS/TP network
and begins scanning AV and BV description properties for Modbus mappings.
See Mapping Modbus data to AVs and BVs on page 17 for more information.
Keep in mind that Modbus networks typically run at 9600 baud in message
transmission mode. At this baud rate, theoretical bandwidth is about 39 updates
per second for RTU mode and 17 updates per second for ASCII mode.
The presence of several Modbus slaves rather than a single slave has no effect on
performance.
Power supply
The FLG-MODBUS requires 24VAC power @ 5VA and is a half-wave device.
Terminals for connecting power are on the right side of the unit.
24VAC
FLG-MODBUS STATUS
LED
Ground
transformer
Switch Value
1 1
2 2
3 4
4 8
5 16
6 32
7 64
FLG-MODBUS
MS/TP
LED
+ MS/TP
-
MS/TP
Select the network type using jumper JP3 on the FLG-MODBUS circuit board.
Set jumper pins 1 and 2 to select EIA-485 and jumper pins 2 and 3 to select EIA-
232. See Figure 6 on page 14.
FLG-MODBUS Cable
1 1
RX RX
6 6
2 2
TX TX
7 7
3 3
8 8
4 4
GND GND
9 9
5 5
EIA-232 enlarged
EIA-232
MODBUS
LED
EIA-485
EIA-485 EIA-232
Use the following table to set the Modbus protocol options using the DIP switch
bank labeled SW3.
Switch ON OFF
1 ASCII mode RTU mode
No te Only one set of protocol options can be used on the Modbus network. All
Modbus devices must have the same settings. Additionally, the Modbus standard
requires one stop bit if parity is used and two stop bits if not. However, some
devices do not follow this standard, requiring one stop bit even if parity is not
used. Therefore, the Stop option forces one stop bit even if parity is not used.
The string is saved to flash memory so the device will operate according to the
string even after power is cycled to the FLG-MODBUS. The displayed string
always shows the actual options in use, whether set from the DIP switches or
from the string, so there is no way to tell what the string is that is stored in flash.
If in doubt about the last string sent, resend the desired string to the FLG-
MODBUS.
To return control to the DIP switches after using the setup property, send a blank
string to the aler-gateway-setup property. To return the FLG-MODBUS to the
clean state it was in when it was shipped from Alerton, see Clearing Modbus
object data on page 20 for more information.
2. From the Place Item menu, choose Prompted Property, and then click
the display where you want to place the item.
3. Double-click the item to view the Prompted Property Setup dialog box.
4. Click the command button beside the Property box to open the Object
Specification dialog box.
5. In the Device Instance field, type the device instance of the FLG-
MODBUS.
6. Specify the Object type as either AV or BV.
N ote You can currently only select the aler-gateway-setup property
for AV and BV type objects. (You will change this object type in step 9
below.)
10. Click OK, and then click Close in the Prompted Property dialog box.
11. Resize the prompted item to the size you want, save the display, and
close the Display Editor.
13. Click the command button for the prompted property you created.
14. In the Edit Property dialog box, under Value, type the string to send to
the device and overwrite the DIP switch protocol option settings.
N ote Overrides are maintained in flash memory. Overrides are deleted
with the mapping assignments if you power up with all DIP switches set
to ON.
No te Some manufacturers bias the Modbus addresses by 1. That is, their point
addresses range 0-9999 instead of 1-9999. In these cases you need to assign their
register address +1. For example, to read their register 45, you would assign
register 44.
When you set up a data mapping, you specify the type of object in the BACtalk
system to use to map data. You also specify whether the item is intended for a
read-only input or whether it should be commanded from the BACnet system.
The reference type of the Modbus data determines how you need to map it (see
the table below). See Appendix A: Syntax for description string on page 21 for
more information.
2. From the Place Item menu, choose Prompted Property, and then click
the display where you want to place the item.
3. Double-click the item to view the Prompted Property Setup dialog box.
4. Click the command button beside the Property box to open the Object
Specification dialog box.
5. In the Device Instance field, type the device instance of the FLG-
MODBUS and select the object type (AV or BV) and instance of the AV
or BV you want to use to map Modbus data.
7. Click OK in the Object Specification dialog box, and then click Close in
the Prompted Property dialog box.
8. Repeat steps 2 through 7 for all data points you want to map.
9. Resize the prompted item to the size you want, save the display, and
close the Display Editor.
11. Click the command button for the prompted property you created.
12. In the Edit Property dialog box, under Value, type a mapping value for
the description property according to the guidelines in Appendix A:
Syntax for description string on page 21.
4. In the Save Data from Device to Disk dialog box, select Point Data, and
then click Save.
The mapped point data in the FLG-MODBUS is saved to the BACtalk
server.
4. In the Send Data from Disk to Device dialog box, select Point Data, and
then click Send.
The mapped point data previously saved on the BACtalk server is sent
to the FLG-MODBUS.
LED Description
Status Indicates that the unit has power and is running a valid ROC file. Follows
the 2.5 second flash pattern.
Modbus Flashes once every 2.5 seconds when a Modbus message has been sent
but no reply received.
Flashes twice every 2.5 seconds when a Modbus message has been sent
and a valid reply has been received.
4. In the Send Data from Disk to Device dialog box, select ROC (OMF/
BIN), and then click Send.
N ote You do not need placeholder commas for undesired options; list
only the options you want.
In most cases, this information is provided by the Modbus device manufacturer
as part of the data point assignment.
Argument Explanation
I|O|A|W|T Message type. Determines if the value will be an input (read-only) or
output (writable). The Modbus reference type determines acceptable
entries.
I Read-only input from Modbus to BACtalk. The Modbus value is read
into BACtalk and cannot be commanded through the AV or BV present-
value property. The FLG-MODBUS performs a round-robin poll of all
input points to request values from the Modbus equipment.
O Verified output from BACtalk to Modbus using message code 6
(Preset Single Register). The Modbus value is writable through the AV or
BV present-value property. On change-of-state and during round-robin
poll, the Modbus data is read and compared against BACtalk data. A
write occurs to the Modbus point only if the compared values are
different.
Type O should be used for output points unless problems are
encountered and especially if the Modbus device stores its data in
EEPROM. This will eliminate unnecessary writes to EEPROM.
Note Use types A, T, and W when the Modbus device has problems with
type O operation.
A Verified multiple register output from BACtalk to Modbus. The Modbus
value is writable through the AV or BV present_value property. Behaves
precisely like the O point, but A values are written on the Modbus side
using the "Preset Multiple Registers" message (Modbus message code
16).
W Unverified output from BACtalk to Modbus using message code 6
(Preset Single Register). The Modbus value is writable through the AV or
BV present-value property. The value is not read from the Modbus side or
compared to the BACtalk value. A write occurs on BACtalk change-of-
state and during round-robin poll of Modbus values. Note: The W option
was added primarily for compatibility with Liebert Modbus systems, which
may flag points internally as NULL on reset. This caused an error
message to occur when the FLG-MODBUS attempted to read them for
comparison using the O point.
T Unverified multiple register output from BACtalk to Modbus. The
Modbus value is writable through the AV or BV present-value property.
Behaves precisely like the W point, but T values are written on the
Modbus side using the "Preset Multiple Registers" message (Modbus
message code 16). Developed primarily for Triatek applications.
<Slave Specifies the Modbus slave number where the data originates. Range is
Address> 1247.
<Reference> Specifies the Modbus reference type. One digit. Acceptable values are 0,
1, 3, 4, or 6.
NOTE: The number in parenthesis below is the Modbus function code.
See Appendix B: Modbus function codes on page 25 for more
information.
For operation I: 0=read coil status (binary) (1), 1=read input status
(binary) (2), 3=read input register (analog) (4), 4=read holding register
(analog) (3), 6=read general reference (analog) (20).
For operation O: 0=read coil status (1) then write (5), 4=read holding
register (3) then write (6), 6=read general reference (20) then write (21).
For operation A: 0=read coil status (1) then write (15), 4=read holding
register (3) then write (16), 6=read general reference (20) then write (21).
For operation W: 0=write coil status (5), 4=write holding register (6)
For operation T: 0=write coil status (15), 4=write holding register (16)
Register or Coil Specifies the Modbus register or coil address. Range is 19999.
Argument Explanation
<Extended Omit unless Reference is set to 6. When the reference type is set to 6,
Memory File File Number must specify a file or group number in the range 09999.
Number>
(optional)
BU Bit Unpack. Some Modbus devices send bit-packed data. If the BU field
is present, the bit number specified in nn (0-15) is extracted and used as
(optional)
the present-value of the BACnet object. Use only for message type I
(read-only).
<Real Number Any real number, which will be used to scale Modbus data. See Scaling
1> point data later in this section.
(optional)
<Real Number Any real number, which will be used to scale Modbus data. See Scaling
2> point data later in this section.
(optional)
Symbol Meaning
* Means multiply by a positive number
*+ Means multiply by a positive number
*- Means multiply by a negative number
+ Means add a positive number
- Means subtract
Examples
The following syntax examples show how scaling works for different situations.
Example 1) Modbus register 4 0032 reports sensed pressure 0-4095. You want
AV 15 to read as 0-300 psi. The Modbus slave address is 44.
AV 15 = ModbusValue * 300/4095
300/4095 = 0.07326.
05 Force Single Coil. Writes to a single coil (binary output). The data is
either ON or OFF.
No te See page 22 for more explanation about the Modbus Reference type (0, 1,
3, 4, or 6).
Error 6, Floating not Indicates the floating point option is not allowed. The floating
Allowed point option is only allowed with reference types 3 or 4.
Error 7, RN1 Indicates the first optional real number does not contain a
recognizable real number.
Error 8, RN2 Indicates the second optional real number does not contain a
recognizable real number.
Error 9, Bit Unpack Indicates the bit unpack field contains an invalid bit mask.
Error 10, Long Integer Indicates the long integer option is not allowed.
not Allowed
Sent: nnnnn
Rcvd: nnnnn
Mapped: nnn
The Sent and Rcvd fields show a rolling count of Modbus messages that were
sent and received. This is useful to determine whether the FLG-MODBUS is
sending messages and whether the Modbus slave is responding.
The Mapped field is a number between 0 and 200 showing the number of valid
point mappings in the FLG-MODBUS.