ProLinx Gateway
Modbus Master/Slave
10/16/2009
DRIVER MANUAL
Markings
UL/cUL
cUL
243333
183151
CL I Div 2 GPs A, B, C, D
Temp Code T5
II 3 G
Ex nA nL IIC T5 X
0 C <= Ta <= 60 C
II Equipment intended for above ground use (not for use in mines).
3 Category 3 equipment, investigated for normal operation only.
G Equipment protected against explosive gasses.
8 MB file storage for HTML files and associated graphics files (previously limited to 384K)
32K maximum HTML page size (previously limited to 16K)
ProSoft Technology , ProLinx , inRAx , ProTalk , and RadioLinx are Registered Trademarks of ProSoft
Technology, Inc. All other brand or product names are or may be trademarks of, and are used to identify
products and services of, their respective owners.
Contents
Important Installation Instructions................................................................................................... 2
Your Feedback Please................................................................................................................... 3
ProSoft Technology Product Documentation ................................................................................ 3
Start Here
1.1
1.2
1.3
1.4
1.5
1.6
7
System Requirements........................................................................................... 7
Package Contents................................................................................................. 8
Mounting the gateway on the DIN-rail.................................................................... 9
Connecting Power to the Unit................................................................................ 9
Install ProSoft Configuration Builder Software ..................................................... 10
Using PCB Help.................................................................................................. 10
Functional Overview
2.1
2.2
2.3
2.4
45
41
LED Indicators
6.1
6.2
33
17
11
47
Reference
8.1
8.2
57
Modbus Protocol Specification ............................................................................ 57
Moving Data using the Data Map ........................................................................ 70
71
9.1
9.2
9.3
Index
79
Start Here
Driver Manual
Start Here
In This Chapter
1.1
System Requirements.......................................................................... 7
System Requirements
The configuration software for the MCM gateway requires the following minimum
hardware and software components:
Pentium II 450 MHz minimum. Pentium III 733 MHz (or better)
recommended
Supported operating systems:
o Microsoft Windows Vista
o Microsoft Windows XP Professional with Service Pack 1 or 2
o Microsoft Windows 2000 Professional with Service Pack 1, 2, or 3
o Microsoft Windows Server 2003
128 Mbytes of RAM minimum, 256 Mbytes of RAM recommended
100 Mbytes of free hard disk space (or more based on application
requirements)
256-color VGA graphics adapter, 800 x 600 minimum resolution (True Color
1024 768 recommended)
CD-ROM drive
Page 7 of 80
1.2
Start Here
Driver Manual
Package Contents
The following components are included with your MCM gateway, and are all
required for installation and configuration.
Important: Before beginning the installation, please verify that all of the following items are
present.
Qty.
Part Name
Part Number
Part Description
MCM
gateway
PLX-####
Cable
Varies
Cable
Cable #9, Mini-DIN8 For DB9 Connection to gateways Port. One DIN to
to DB9 Male
DB-9M cable included per configurable serial port,
Adapter
plus one for gateway configuration
Varies
Adapter
1454-9F
ProSoft
Solutions CD
Page 8 of 80
Start Here
Driver Manual
1.3
1.4
WARNING: Ensure that you do not reverse polarity when applying power to the gateway. This will
cause damage to the gateways power supply.
Page 9 of 80
1.5
Start Here
Driver Manual
If you do not have access to the Internet, you can install ProSoft Configuration
Builder from the ProSoft Solutions CD-ROM, included in the package with your
gateway.
To install ProSoft Configuration Builder from the Product CD-ROM
1
2
3
4
Insert the ProSoft Solutions Product CD-ROM into the CD-ROM drive of your
PC. Wait for the startup screen to appear.
On the startup screen, click PRODUCT DOCUMENTATION. This action opens a
Windows Explorer file tree window.
Click to open the UTILITIES folder. This folder contains all of the applications
and files you will need to set up and configure your gateway.
Double-click the SETUPCONFIGURATIONTOOL folder, double-click the
"PCB_*.EXE" file and follow the instructions on your screen to install the
software on your PC. The information represented by the "*" character in the
file name is the PCB version number and, therefore, subject to change as
new versions of PCB are released.
Note: Many of the configuration and maintenance procedures use files and other utilities on the
CD-ROM. You may wish to copy the files from the Utilities folder on the CD-ROM to a convenient
location on your hard drive.
1.6
Page 10 of 80
Functional Overview
Driver Manual
Functional Overview
In This Chapter
The Modbus Master/Slave protocol driver may exist in a single port (MCM) or a
multiple port (MCM4) implementation. In either case, each port can be
independently configured as a Master or Slave port to interface, as required, with
other Modbus devices.
2.1
Page 11 of 80
2.2
Functional Overview
Driver Manual
Type
Specifications
Serial Ports
Serial Port Adapter Cables
Note: On all ProLinx gateways, data from the application port on the main board, serial Port 0, is
not buffered. Packets go directly to and from the serial chipset to the processor. This has the
potential to cause the serial communications to become erratic at baud rates above 38,400 baud.
ProLinx gateways with 4 serial ports have a separate serial interface board for serial Ports 1, 2,
and 3. These serial ports are buffered and can handle communications up to 115,200 baud.
Page 12 of 80
Functional Overview
Driver Manual
2.3
Specifications
General Parameters
Internal Database
Communication parameters
Modbus Modes
Modbus Master
Command List
Status Data
Modbus Slave
Node address
Status Data
Page 13 of 80
2.4
Functional Overview
Driver Manual
Other ProLinx
Protocol
Driver
ProLinx
Communication
Gateways
Modbus
Slave
Driver
Internal
Database
(Up to 4000 regs)
Modbus
Master
Driver
A read command issued to a slave device by the Master driver will return the
slave data into the internal database.
A write command issued to a slave device by the Master driver uses the data
in the internal database as the source data to send to the slave.
The slave driver allows external Master devices to access the database, reading
data from the database or writing data to the database. External Modbus Master
devices can monitor and control data in this database through any port
configured as a slave.
Status and error data from the slave and Master ports generated by the gateway
can be mapped into the internal database, where it can be retrieved by either
protocol driver.
Page 14 of 80
Functional Overview
Driver Manual
Modbus Address
40001 (five-digit addressing) or 400001 (six-digit addressing)
1000
41001 or 410001
2000
42001 or 420001
3000
43001 or 430001
3999
44000 or 440000
The following virtual addresses are not part of the normal gateway user database
and are not valid addresses for standard data. However, these addresses may
be used for incoming commands that are requesting 32-bit floating-point data. To
use addresses in this upper range requires you to:
1
2
3
Remember that, once you do this, all data in addresses above the Float Offset
address will be treated as 32-bit floating-point data and require two gateway
memory registers per Modbus address.
Database Address
Modbus Address
4000
5000
45001 or 450001
6000
46001or 460001
7000
47001 or 470001
8000
48001 or 480001
9000
49001or 490001
9999
50000 or 500000
Page 15 of 80
Page 16 of 80
Functional Overview
Driver Manual
Slave Driver
:
1 #Modbus Node address for this port on network
:
0 #Internal DB offset to bit input data
:
0 #Internal DB offset to word input data
:
0 #Internal DB offset to bit output data
:
0 #Internal DB offset to holding reg data
:
N #Use packet gap timeout for messages
:
0 #0=Use default for baudrate, or set timeout
Master Driver
:
0 #mSec delay between commands
:
100 #0-65535 Command cycle count if error
:
-1 #DB start reg for Cmd Control (-1=disable)
Reg
Count
Swap
Code
Node
Address
Modbus
Func
MB Address
in Device
10
10
0
0
1
1
3
4
0
10
Page 17 of 80
3.1
[Modbus Port x]
The [Modbus Port x] sections of the CFG file, where x stands for 0, 1, 2, or 3, set
the Modbus Master and slave port communication parameters and define the
protocol-specific settings.
3.1.1 Enabled
YES or NO
This flag specifies if the port on the gateway will be utilized. If the parameter is
set to NO, the port will not be used. If the parameter is set to YES, the port will be
used.
3.1.2 RS Interface
0 = RS-232
1 = RS-485
2 = RS-422
This parameter is used when Ports 1, 2, and 3 are present to configure the
electrical interface for these ports.
RS Interface selections for Port 0 are done with a jumper (electrical shunt) on the
back of the gateway.
3.1.3 Type
MASTER or SLAVE
This parameter defines if the port will emulate a Master or slave device. Choose
a value of MASTER to make the port function as a Modbus Master. Choose SLAVE
to make the port function as a Modbus slave.
Page 18 of 80
Page 19 of 80
3.1.7 Protocol
RTU
ASCII
This parameter specifies the Modbus protocol version to be used on the port.
Valid Protocols are RTU and ASCII.
Parameter Value
110
110
150
150
300
300
600
600
1200
12 OR 1200
2400
24 OR 2400
4800
48 OR 4800
9600
96 OR 9600
14,400
19,200
28,800
38,400
57,600
57 OR 576
115,200
115 OR 1152
Note: On all ProLinx gateways, data from the application port on the main board, serial Port 0, is
not buffered. Packets go directly to and from the serial chipset to the processor. This has the
potential to cause the serial communications to become erratic at baud rates above 38,400 baud.
ProLinx gateways with 4 serial ports have a separate serial interface board for serial Ports 1, 2,
and 3. These serial ports are buffered, and can handle communications up to 115,200 baud.
Page 20 of 80
3.1.9 Parity
NONE, ODD, EVEN
Parity is a simple error checking algorithm used in serial communication. This
parameter specifies the type of parity checking to use.
All devices communicating through this port must use the same parity setting.
3.1.12 RTS On
0 to 65535 milliseconds
This parameter sets the number of milliseconds to delay after Ready To Send
(RTS) is asserted before data will be transmitted.
Page 21 of 80
Page 22 of 80
Page 23 of 80
First of all, enable the the Use Guard Band Timer parameter.
This configuration will set the gateway to use a pre-defined time interval for
Modbus message recognition calculated for each baud rate. This should
provide optimal performance for most applications.
If you still observe a considerable number of communication errors, try to
increase the Guard Band Timeout value until the network performance is
improved.
Page 24 of 80
110
350
150
256
300
128
600
64
1200
32
2400
16
4800
9600
19200
28800
38400
57600
115200
Page 25 of 80
Page 26 of 80
3.2
Column #
Modbus
Function
Code
Enable
Code
Internal
Address
Poll
Interval
Time
Count
FC1
Code
Bit
Seconds
Count
FC2
Code
Bit
Seconds
Count
Function
Code
Device
MODBUS
Address
Address
Bit
Address
Bit
FC3
Code
Register
Seconds
Count
Code
Address
Register
FC4
Code
Register
Seconds
Count
Address
Register
FC5
Code
Bit
Seconds
Count
Address
Bit
FC6
Code
Register
Seconds
Count
Code
Address
Register
FC15
Code
Bit
Seconds
Count
Address
15
Bit
FC16
Code
Register
Seconds
Count
Code
Address
16
Register
The first part of the record is the Module Information, which relates to the ProLinx
module and the second part contains information required to interface to the
Modbus slave device. Refer to the Modbus protocol specification and slave
device documentation for a full discussion of each function. The Device Modbus
Address information can be found in the documentation for the slave device.
Command list example:
[PORT 0 COMMANDS]
# INTERNAL POLL
SWAP SLAVE FUNCTION DEVICE
# ENABLE ADDRESS INTERVAL COUNT CODE NODE CODE ADDRESS
START
1
0
0 10 0 1
3
0
1
0
0 10 0 1 16 10
END
Page 27 of 80
3.2.1 Enable
0,1, 2 or 3
This field defines whether the command is to be executed and under what
conditions.
If the parameter is set to 0, the command is disabled and will not be executed in
the normal polling sequence. However, the command can still be activated using
Command Control.
Setting the parameter to a value of 1 causes the command to be executed each
scan of the Command List if the Poll Interval is set to zero (0). If the Poll Interval
is set to a non-zero value, the command will be executed, when the interval timer
for that command expires.
An Enable code of 2 is valid only for write commands, FC 5, 6, 15, and 16. If the
parameter is set to 2, the command will execute only if the internal data
associated with the command changes.
An Enable code of 3 is valid only for bit-level write commands, FC 5 and 15. If
the parameter is set to 3, the command will execute only if the internal bit data
associated with the command changes. It will also clear the bit or bits in the
internal database after the write command is built.
Important: Not all revisions of the MCM driver support an Enable code of 3. To determine if your
gateway supports this Enable code, contact ProSoft Technical Support.
For Modbus functions 1, 2, 5, and 15, this parameter is interpreted as a bitlevel address.
For Modbus functions 3, 4, 6, and 16, this parameter is interpreted as a
register-level address.
Page 28 of 80
Functions 5 and 6 ignore this field as they apply only to a single data point.
For functions 1, 2, and 15, this parameter sets the number of bits (inputs or
coils) to be transferred by the command.
For functions 3, 4, and 16, this parameter sets the number of registers to be
transferred by the command.
Description
No Change is made in the byte ordering (1234 = 1234)
The words are swapped (1234=3412)
The words are swapped then the bytes in each word are swapped
(1234=4321)
The bytes in each word are swapped (1234=2143)
Page 29 of 80
These swap operations affect 4-byte (or 2-word) groups of data. Therefore, data
swapping using these Swap Codes should be done only when using an even
number of words, such as when 32-bit integer or floating-point data is involved.
Page 30 of 80
Description
15
16
00001 or 000001 (0x0001) for bit-level Coil data (Function Codes 1, 5, and
15).
10001 or 100001 (1x0001) for bit-level Input Status data (Function Code 2)
30001 or 300001 (3x0001) for Input Register data (Function Code 4)
40001 or 400001 (4x0001) for Holding Register data (Function Codes 3, 6,
and 16).
For register read or write commands (FC 3, 6, or 16) 4X range, for 40001,
specify a value of 0
(40001 - 40001 = 0).
Note: If the documentation for a particular Modbus slave device lists data addresses in
hexadecimal (base16) notation, you will need to convert the hexadecimal value to a decimal value
to enter in this parameter. In such cases, it is not usually necessary to subtract 1 from the
converted decimal number, as this addressing scheme typically uses the exact offset address
expressed as a hexadecimal number.
Page 31 of 80
Page 32 of 80
Error Codes....................................................................................... 39
The most thorough troubleshooting method for debugging the operation of the
MCM driver (and the gateway in general) is the powerful Debug port on the
gateway. Accessing the Debug capabilities of the gateway is accomplished by
connecting a PC to the Debug port and loading a terminal program such as
ProSoft Configuration Builder or Windows HyperTerminal.
Note: 4101 series modules that use both serial ports (Debug and Port x) as application ports (for
example, 4101-MCM-DFCM) must be reset or power-cycled in order to enable the selected port as
a Debug port. To enable the debug port, connect to the port using a null-modem serial cable, and
then press and hold the [A] key on the keyboard while resetting or power cycling the card. Do not
release the key until HyperTerminal shows the debug port menu. Debug mode can be enabled on
either port. The upload/download command is only available when connected to the Debug port.
4.1
Page 33 of 80
4.2
Starting Address
4400
4800
5200
5600
Note: None of the addresses are available in the Modbus address range. In order to view them via
a Modbus request, they must be moved into the 0 to 3999 address range using the Data Map
section of the configuration file. For additional information on how to move data within the
gateway's internal database, see Moving Data (page 70).
Offset
Description
4400
4401
4402
4403
Number of Requests
4404
Number of Responses
4405
4406
4407
4408
Current Error/Index
4409
Last Error/Index
Refer to the following Error Codes (page 39) section to interpret the status/error
codes present in the data area.
Page 34 of 80
4.2.2 Slave Port: General Port STATE and COMM STATE Status
In addition to the port status information stored in the gateway database memory,
as already mentioned, which are also shown in the diagnostic screens, there are
two additional port status parameters that are not available from the database.
The status values, Port STATE (highlighted in yellow) and Port COMM STATE
(highlighted in orange), can be found only though the diagnostic menus under
"Communication Status" for a port, as shown in the following graphic.
These status values are state registers. They are used as 'scratchpad' areas by
the operating firmware to keep track of the current logical state of activities on a
slave port. These state registers are constantly changing as the gateway
progresses through the various stages needed to process communication on the
serial ports. This processing happens faster than can be followed, unless a port
error causes the value to remain constant for some noticable length of time.
The diagnostic screen displays are 'snapshot' type screens; that is, they display
the current value at the time they are called but do not continue to automatically
update the data displayed. They are not live-data screens. Therefore, to see a
change in STATE or COMM STATE, you must repeatedly call the screen by
pressing the appropriate menu key to have the screen refreshed. Depending on
the refresh timing you may or may not see a change in the displayed values
everytime you call for an update.
Page 35 of 80
Preparing port, Flushing all buffers, Scan for RTS-Off, or Waiting for port enable
signal
-1
Undefined state
2000
The COMM STATE register may display any of the following values.
COMM STATE Description
Value
0
101
Sending data
Waiting for all data to be sent and starting RTS-Off Delay Timer
Waiting for RTS-Off Delay timeout and then turning OFF RTS line after timeout
Address Range
4410 to 4509
4810 to 4909
5210 to 5309
5610 to 5709
The first word in the defined register location contains the status/error code for
the first command in the port's Command List. Successive words in the
Command Error List are associated with corresponding commands in the list.
Refer to Error Codes (page 39) to interpret the status/error codes present in this
data area.
Page 36 of 80
Offset
Description
4410
4411
4412
4413
4414
...
...
...
...
...
...
...
...
...
4507
97
4508
98
4509
99
Note that the values in the Command Error List tables are initialized to zero (0) at
power-up, cold boot, and warm boot. If a command executes successfully, the
value in the associated register will remain at zero (0), indicating no command
error was detected. Any non-zero value in this table indicates the corresponding
command experienced an error. The Error Code (page 39) shown will provide
valuable troubleshooting information.
The data in this table is dynamic. It is updated each time a command is
executed. Therefore, if the command fails once and succeeds on the next
attempt, the Error Code from the previously failed attempt will be replace with
zero and lost. Error Codes are not archived in the gateway's database. To see if
the port has experienced an error since the most recent restart and what the
most recently occurring error was, if any, you can check the Last Error/Index
(page 34).
The slave has not defined in the command list for the Master port and will not be polled
from the Command List.
The slave is configured to be polled by the Master port and the most recent
communication attempt was successful.
The Master port has failed to communicate with the slave device. Communication with
the slave is suspended for a user defined period based on the scanning of the
command list.
Page 37 of 80
Slaves are defined to the system when the gateway loads the Master Command
List during start-up and initialization. Each slave defined will be set to a state
value of 1 in this initial step. If the Master port fails to communicate with a slave
device (timeout expired on a command, retries failed), the Master will set the
state of the slave to a value of 2 in this status table. This suspends
communication with the slave device for a user-specified Error Delay Count
(page 26).
When the Master first suspends polling of a particular slave, it creates a Error
Delay Counter for this slave address and set the value in that counter equal to
the Error Delay Counter parameter in the configuration file. Then, each time a
command in the list is scanned that has the address of a suspended slave, the
delay counter value for that slave will be decremented. When the value reaches
zero, the slave state will be set to 1. This will re-enable polling of the slave.
The first word in the defined register locations contains the status code for slave
node address 1. Each successive word in the list is associated with the next
node in sequence, up to slave node address 255.
The individual Slave List Status for each Modbus port are returned to the address
locations specified in the following table.
Modbus Port
Address Range
4510 to 4764
4910 to 5164
5310 to 5564
5710 to 5965=4
Offset
Description
4510
Slave #1 Status
4511
Slave #2 Status
4512
Slave #3 Status
4513
Slave #4 Status
4514
Slave #5 Status
Note that the values in the Slave List Status tables are initialized to zero (0) at
power-up, cold boot and during warm boot.
Page 38 of 80
4.3
Error Codes
These are error codes that are part of the Modbus protocol or are extended
codes unique to this gateway.
Description
Illegal Function
Acknowledge
Description
-1
-2
-11
253
254
255
Description
-41
-42
-43
-44
-45
-46
-47
Page 39 of 80
4407
4807
5207
5607
If any of these registers contains a non-zero value, it indicates a problem with the
configuration of the associated port. The following table lists the codes, a
description of the problem, and which parameters to change tocorrect the error
condition within the configuration file.
Bit
Code
Description
0x0001
0x0002
0x0004
0x0008
0x0010
0x0020
0x0040
0x0080
0x0100
0x0200
10
0x0400
11
0x0800
12
0x1000
13
0x2000
Reserved
14
0x4000
Reserved
15
0x8000
Reserved
Page 40 of 80
This section contains information on the cable and pin assignments for the
ProLinx gateway's serial ports (RS-232/422/485). The ProLinx gateway will come
with one to five serial ports, depending on the configuration purchased. In all
cases, the protocol serial ports will have the same pinouts.
Example: The 5202-MNET-MCM4 gateway contains five serial communication ports; four
configurable protocol application ports and one Configuration/ Debug port.
The 5201-MNET-MCM gateway contains two serial communication ports; one configurable
protocol application port and one Configuration/Debug port.
Each physical serial port has an eight-pin Mini-DIN jack connector. A six-inch
Mini-DIN-8Male to DB-9Male adapter cable is provided for each serial port. The
DB-9M provides connections for RS-232, wired as Data Terminal Equipment
(DTE), RS-422 and RS-485. The diagrams in the following topics detail the pin
assignments for several possible electrical interface connections.
Page 41 of 80
5.1
5.2
Note: If the port is configured with the Use CTS (page 22) set to YES, then a jumper is required
between the RTS and the CTS line on the gateway connection.
Page 42 of 80
5.3
The Use CTS Line (page 22) parameter for the port configuration should be set
to YES for most modem applications.
5.4
Page 43 of 80
5.5
NOTE: This type of connection is commonly called a RS-485 half-duplex, 2-wire connection. If you
have RS-485 4-wire, full-duplex devices, they can be connected to the gateway's serial ports by
wiring together the TxD+and RxD+ from the two pins of the full-duplex device to Pin 1 on the
gateway and wiring together the TxD- and RxD- from the two pins of the full-duplex device to Pin 8
on the gateway. As an alternative, you could try setting the gateway to use the RS-422 interface
and and connect the full-duplex device according to the RS-422 wiring diagram (page 43). For
additional assistance, please contact ProSoft Technical Support.
Page 44 of 80
LED Indicators
Driver Manual
LED Indicators
In This Chapter
LED indicators provide a means of monitoring the operation of the system and
individual ports. There are extremely useful for troubleshooting. The gateway
provides LEDs to help monitor each port. In addition, system configuration errors,
application errors, and fault indications are all indicated by LEDs, providing alerts
to possible problems.
6.1
State
Power
Off
Green Solid
Fault
Off
Red Solid
Cfg
Off
Amber Solid
Err
Off
Description
Power is not connected to the power terminals or source is insufficient
to properly power the gateway (800mA at 24vdc minimum required)
Power is connected to the power terminals.
Normal operation.
A critical error has occurred. Program executable has failed or has
been user-terminated and is no longer running. Press Reset p/b or
cycle power to clear error. If not, use the Debug procedures described
later in this manual.
Normal operation.
The unit is in configuration mode. The configuration file is currently
being downloaded or, after power-up, is being read, the unit is
implementing the configuration values, and initializing the hardware.
This will occur during power cycle, or after pressing the reset button. It
also occurs after a cold/warm boot command is received.
Normal operation.
Flashing
Solid Red
Page 45 of 80
6.2
LED Indicators
Driver Manual
Color
Debug - ACT
Off
Port 0 - ACT
Green
Port 1 - ACT
Flash
Description
No activity on the port.
The port is actively transmitting or receiving data
Port 2 - ACT
Port 3 - ACT
Debug - ERR
Off
Port 0 - ERR
Port 1 - ERR
RED
Port 2 - ERR
On Solid or
Flashing
Port 3 - ERR
Page 46 of 80
7.1
Page 47 of 80
7.1.2 Protocol
RTU
ASCII
This parameter specifies the Modbus protocol version to be used on the port.
Valid Protocols are RTU and ASCII.
Page 48 of 80
Parameter Value
110
110
150
150
300
300
600
600
1200
12 OR 1200
2400
24 OR 2400
4800
48 OR 4800
9600
96 OR 9600
14,400
19,200
28,800
38,400
57,600
57 OR 576
115,200
115 OR 1152
Note: On all ProLinx gateways, data from the application port on the main board, serial Port 0, is
not buffered. Packets go directly to and from the serial chipset to the processor. This has the
potential to cause the serial communications to become erratic at baud rates above 38,400 baud.
ProLinx gateways with 4 serial ports have a separate serial interface board for serial Ports 1, 2,
and 3. These serial ports are buffered, and can handle communications up to 115,200 baud.
7.1.4 Parity
NONE, ODD, EVEN
Parity is a simple error checking algorithm used in serial communication. This
parameter specifies the type of parity checking to use.
All devices communicating through this port must use the same parity setting.
7.1.7 RTS On
0 to 65535 milliseconds
This parameter sets the number of milliseconds to delay after Ready To Send
(RTS) is asserted before data will be transmitted.
Page 49 of 80
Page 50 of 80
7.2
7.2.1 Enabled
YES or NO
This flag specifies if the port on the gateway will be utilized. If the parameter is
set to NO, the port will not be used. If the parameter is set to YES, the port will be
used.
7.2.2 RS Interface
0 = RS-232
1 = RS-485
2 = RS-422
This parameter is used when Ports 1, 2, and 3 are present to configure the
electrical interface for these ports.
RS Interface selections for Port 0 are done with a jumper (electrical shunt) on the
back of the gateway.
7.2.3 Protocol
RTU
ASCII
This parameter specifies the Modbus protocol version to be used on the port.
Valid Protocols are RTU and ASCII.
Page 51 of 80
Parameter Value
110
110
150
150
300
300
600
600
1200
12 OR 1200
2400
24 OR 2400
4800
48 OR 4800
9600
96 OR 9600
14,400
19,200
28,800
38,400
57,600
57 OR 576
115,200
115 OR 1152
Note: On all ProLinx gateways, data from the application port on the main board, serial Port 0, is
not buffered. Packets go directly to and from the serial chipset to the processor. This has the
potential to cause the serial communications to become erratic at baud rates above 38,400 baud.
ProLinx gateways with 4 serial ports have a separate serial interface board for serial Ports 1, 2,
and 3. These serial ports are buffered, and can handle communications up to 115,200 baud.
7.2.5 Parity
NONE, ODD, EVEN
Parity is a simple error checking algorithm used in serial communication. This
parameter specifies the type of parity checking to use.
All devices communicating through this port must use the same parity setting.
Page 52 of 80
7.2.8 RTS On
0 to 65535 milliseconds
This parameter sets the number of milliseconds to delay after Ready To Send
(RTS) is asserted before data will be transmitted.
Page 53 of 80
First of all, enable the the Use Guard Band Timer parameter.
This configuration will set the gateway to use a pre-defined time interval for
Modbus message recognition calculated for each baud rate. This should
provide optimal performance for most applications.
If you still observe a considerable number of communication errors, try to
increase the Guard Band Timeout value until the network performance is
improved.
Page 54 of 80
110
350
150
256
300
128
600
64
1200
32
2400
16
4800
9600
19200
28800
38400
57600
115200
Page 55 of 80
Page 56 of 80
Reference
Driver Manual
Reference
In This Chapter
8.1
Page 57 of 80
Reference
Driver Manual
Func
Data Start Pt Hi
11
01
00
Data # Of Pts Lo
25
CRC
00
Response
An example response to Read Coil Status is as shown in Figure C2. The data is
packed one bit for each coil. The response includes the Slave address, function
code, quantity of data characters, the data characters, and error checking. Data
will be packed with one bit for each coil (1 = ON, 0 = OFF). The low order bit of
the first character contains the addressed coil, and the remainder follow. For coil
quantities that are not even multiples of eight, the last characters will be filled in
with zeros at high order end. The quantity of data characters is always specified
as quantity of RTU characters, that is, the number is the same whether RTU or
ASCII is used.
Because the Slave interface device is serviced at the end of a controller's scan,
data will reflect coil status at the end of the scan. Some Slaves will limit the
quantity of coils provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status from sequential scans.
Adr
Func
Byte Count
Data Coil
Status 20
to 27
Data Coil
Status 28
to 35
Data Coil
Status 36
to 43
11
01
05
CD
6B
B2
Data Coil
Data Coil
Status 44 to Status 52 to
51
56
OE
1B
Error Check
Field
CRC
Page 58 of 80
Reference
Driver Manual
Func
Data Start Pt Hi
Data Start Pt Lo
11
02
00
C4
00
16
CRC
Response
An example response to Read Input Status is as shown in Figure C4. The data is
packed one bit for each input. The response includes the Slave address, function
code, quantity of data characters, the data characters, and error checking. Data
will be packed with one bit for each input (1=ON, 0=OFF). The lower order bit of
the first character contains the addressed input, and the remainder follow. For
input quantities that are not even multiples of eight, the last characters will be
filled in with zeros at high order end. The quantity of data characters is always
specified as a quantity of RTU characters, that is, the number is the same
whether RTU or ASCII is used.
Because the Slave interface device is serviced at the end of a controller's scan,
data will reflect input status at the end of the scan. Some Slaves will limit the
quantity of inputs provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status for sequential scans.
Adr
Func
Byte
Count
11
02
03
Data Discrete Input Data Discrete Input Data Discrete Input Error Check Field
10197 to 10204
10205 to 10212
10213 to 10218
AC
DB
35
CRC
Page 59 of 80
Reference
Driver Manual
03
00
03
CRC
00
Response
The addressed Slave responds with its address and the function code, followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are two bytes each, with the binary content right justified within each pair
of characters. The first byte includes the high order bits and the second, the low
order bits.
Because the Slave interface device is normally serviced at the end of the
controller's scan, the data will reflect the register content at the end of the scan.
Some Slaves will limit the quantity of register content provided each scan; thus
for large register quantities, multiple transmissions will be made using register
content from sequential scans.
In the example below, the registers 40108 to 40110 have the decimal contents
555, 0, and 100 respectively.
Adr
Func
ByteCnt
Hi Data
Lo Data
Hi Data
Lo Data
Hi Data
Lo Data
11
03
06
02
2B
00
00
00
64
CRC
Page 60 of 80
Reference
Driver Manual
04
00
08
00
01
CRC
Response
The addressed Slave responds with its address and the function code followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are 2 bytes each, with the binary content right justified within each pair of
characters. The first byte includes the high order bits and the second, the low
order bits.
Because the Slave interface is normally serviced at the end of the controller's
scan, the data will reflect the register content at the end of the scan. Each PC will
limit the quantity of register contents provided each scan; thus for large register
quantities, multiple PC scans will be required, and the data provided will be form
sequential scans.
In the example below the register 3009 contains the decimal value 0.
Adr
Func
Byte Count
11
04
02
00
00
E9
Page 61 of 80
Reference
Driver Manual
Func
Data Coil # Hi
Data Coil # Lo
Data
11
05
00
AC
FF
00
CRC
Response
The normal response to the Command Request is to re-transmit the message as
received after the coil state has been altered.
Adr
Func
Data Coil # Hi
Data Coil # Lo
Data
11
05
00
AC
FF
00
CRC
Page 62 of 80
Reference
Driver Manual
Func
11
06
00
01
00
03
CRC
Response
The response to a preset single register request is to re-transmit the query
message after the register has been altered.
Adr
Func
Data Reg Hi
Data Reg Lo
11
06
00
01
00
03
CRC
Page 63 of 80
Reference
Driver Manual
00 00
Any
Response
Field Name
(Hex)
Field Name
(Hex)
Function
08
Function
08
Sub-function Hi
00
Sub-function Hi
00
Sub-function Lo
00
Sub-function Lo
00
Data Hi
A5
Data Hi
A5
Data Lo
37
Data Lo
27
Page 64 of 80
Reference
Driver Manual
The data fields in responses to other kinds of queries could contain error counts
or other data requested by the sub-function code.
Page 65 of 80
Reference
Driver Manual
Func
11
0F
Hi Add Lo Add
00
13
Quantity
Byte
Cnt
00
0A
CD
Error Check
Field
00
CRC
Response
The normal response will be an echo of the Slave address, function code,
starting address, and quantity of coils forced.
Adr
Func
Hi Addr
Lo Addr
Quantity
11
0F
00
13
00
CRC
Page 66 of 80
Reference
Driver Manual
Func
Hi
Add
Lo Add
11
10
00
87
Quantity
00
02
Byte
Cnt
Hi
Data
Lo
Data
Hi
Data
Lo
Data
Error Check
Field
04
00
0A
01
02
CRC
Response
The normal response to a function 16 query is to echo the address, function
code, starting address and number of registers to be loaded.
Adr
Func
Hi Addr
Lo Addr
11
10
00
87
Quantity
00
56
Page 67 of 80
Reference
Driver Manual
If the server device receives the request without a communication error, and
can handle the query normally, it returns a normal response.
If the server does not receive the request due to a communication error, no
response is returned. The Master program will eventually process a timeout
condition for the request.
If the server receives the request, but detects a communication error (parity,
LRC, CRC, ...), no response is returned. The Master program will eventually
process a timeout condition for the request.
If the server receives the request without a communication error, but cannot
handle it (for example, if the request is to read a non-existent output or
register), the server will return an exception response informing the Master of
the nature of the error.
The exception response message has two fields that differentiate it from a
normal response:
Function Code Field: In a normal response, the server echoes the function
code of the original request in the function code field of the response. All function
codes have a most-significant bit (MSB) of 0 (their values are all below 80
hexadecimal). In an exception response, the server sets the MSB of the function
code to 1. This makes the function code value in an exception response exactly
80 hexadecimal higher than the value would be for a normal response.
With the function code's MSB set, the Master's application program can
recognize the exception response and can examine the data field for the
exception code.
Data Field: In a normal response, the server may return data or statistics in the
data field (any information that was requested in the request). In an exception
response, the server returns an exception code in the data field. This defines the
server condition that caused the exception.
The following table shows an example of a Master request and server exception
response.
Request
Response
Field Name
(Hex)
Field Name
(Hex)
Function
01
Function
81
Exception Code
02
Starting Address Hi
04
Starting Address Lo
A1
Quantity of Outputs Hi
00
Quantity of Outputs Lo
01
In this example, the Master addresses a request to server device. The function
code (01) is for a Read Output Status operation. It requests the status of the
output at address 1245 (04A1 hex). Note that only that one output is to be read,
as specified by the number of outputs field (0001).
Page 68 of 80
Reference
Driver Manual
If the output address is non-existent in the server device, the server will return
the exception response with the exception code shown (02). This specifies an
illegal data address for the Slave.
Modbus Exception Codes
Code
Name
01
Illegal Function
02
03
04
Meaning
Slave Device Failure An unrecoverable error occurred while the Slave was attempting
to perform the requested action.
05
Acknowledge
06
08
0a
Gateway Path
Unavailable
0b
Gateway Target
Device Failed To
Respond
Page 69 of 80
8.2
Reference
Driver Manual
The Delay Preset parameter determines how often the data transfer will happen.
The value entered here is in number of internal firmware scan cycles. Since the
actual amount of time required for an internal firmware scan varies based on the
protocols involved and application-specific configuration variations, there is no
direct relationship between scan counts and time interval. Therefore, if you need
to move data based on specific timing, you will have to determine this
relationship experimentally by trying different Delay Preset values and monitoring
the time between data moves, until you discover an acceptable setting for your
application.
Page 70 of 80
Information about the processor and user data files as viewed through and
LED patterns on the processor.
Details about the serial devices interfaced, if any.
9.1
Asia Pacific
+603.7724.2080, support.asia@prosoft-technology.com
Languages spoken include: Chinese, English
Europe (location in Toulouse, France)
+33 (0) 5.34.36.87.20, support.EMEA@prosoft-technology.com
Languages spoken include: French, English
North America/Latin America (excluding Brasil) (location in California)
+1.661.716.5100, support@prosoft-technology.com
Languages spoken include: English, Spanish
For technical support calls within the United States, an after-hours answering system allows pager
access to one of our qualified technical and/or application support engineers at any time to answer
your questions.
Brasil (location in Sao Paulo)
+55-11-5084-5178, eduardo@prosoft-technology.com
Languages spoken include: Portuguese, English
Page 71 of 80
9.2
Page 72 of 80
9.3
LIMITED WARRANTY
This Limited Warranty ("Warranty") governs all sales of hardware, software and
other products (collectively, "Product") manufactured and/or offered for sale by
ProSoft, and all related services provided by ProSoft, including maintenance,
repair, warranty exchange, and service programs (collectively, "Services"). By
purchasing or using the Product or Services, the individual or entity purchasing or
using the Product or Services ("Customer") agrees to all of the terms and
provisions (collectively, the "Terms") of this Limited Warranty. All sales of
software or other intellectual property are, in addition, subject to any license
agreement accompanying such software or other intellectual property.
Page 73 of 80
Page 74 of 80
Page 75 of 80
e) Customer agrees that it shall not, and shall not authorize others to, copy
software provided by ProSoft (except as expressly permitted in any
license agreement accompanying such software); transfer software to a
third party separately from the Product; modify, alter, translate, decode,
decompile, disassemble, reverse-engineer or otherwise attempt to derive
the source code of the software or create derivative works based on the
software; export the software or underlying technology in contravention of
applicable US and international export laws and regulations; or use the
software other than as authorized in connection with use of Product.
f) Additional Restrictions Relating To Software And Other Intellectual
Property
In addition to compliance with the Terms of this Warranty, Customers
purchasing software or other intellectual property shall comply with any
license agreement accompanying such software or other intellectual
property. Failure to do so may void this Warranty with respect to such
software and/or other intellectual property.
Page 76 of 80
Page 77 of 80
Page 78 of 80
Index
H
[
0
00 Return Query Data 64
I
Important Installation Instructions 2
Install ProSoft Configuration Builder Software 10
Intellectual Property Indemnity 75
Internal Address 28
Internal Slave ID 22, 48
A
All Product Returns: 72
All ProLinx Products 2
Allocation of Risks 77
LED Indicators 45
LEDs for Serial Ports 46
Limitation of Remedies ** 76
LIMITED WARRANTY 73
C
Command Control Reg 26
Command List Error Codes 39
Common gateway LEDs 45
Communication Port Cables 41
Connecting Power to the Unit 9
Controlling Law and Severability 77
D
Data Bits 21, 49, 53
Diagnostics (Function Code 08) 64
Disclaimer of all Other Warranties 76
Disclaimer Regarding High Risk Activities 75
E
Enable 26, 28
Enabled 18, 51
Error Codes 34, 36, 37, 39
Error Delay Counter 26, 38
Example and state diagram 64
F
Float Flag 15, 19
Float Offset 15, 20
Float Start 15, 19
Force Multiple Coils (Function Code 15) 66
Force Single Coil (Function Code 05) 62
Functional Overview 11
Master Port
Command List Errors 36, 37
Modbus Slave List Status 37, 38
MB Address in Device 31
MCM Protocol Configuration 17
Minimum Command Delay 25
Minimum Response Delay 22, 50, 53
Modbus Configuration Error Word 40
Modbus Error and Status Data Area Addresses 34
Modbus Error Codes 39
Modbus Exception Codes 69
Modbus Exception Responses 39, 68
Modbus Function 30
Modbus Master/Slave Port Specifications 13
Modbus Master/Slave Port(s) 11
Modbus Port Access to Database 15
Modbus Port Expander (4102/5102-MBS3-MBM) 47
Modbus Ports
Error and Status 34, 37
Modbus Protocol Specification 57
Module Internal Database 14
Mounting the gateway on the DIN-rail 9
Moving Data using the Data Map 34, 70
N
No Other Warranties 77
O
Output Offset 23
P
Package Contents 8
Parity 21, 49, 52
Page 79 of 80
Pinouts 2, 24
Poll Interval 29
Port 0 Command Error List Layout 37
Port 0 Slave List Status Layout 38
Port 0, 1, 2, 3
RS-232 - DTE to DCE Modem Connection 43
RS-232 - Null Modem (DTE with Hardware
Handshaking) 42
RS-232 - Null Modem (DTE without Hardware
Handshaking) 42
RS-422 Interface Connections 43, 44
RS-485 Interface Connections 44
Preset Multiple Registers (Function Code 16) 67
Preset Single Register (Function Code 06) 63
Procedures for Return of Units Out of Warranty: 73
Procedures for Return of Units Under Warranty: 72
ProLinx Gateways with Ethernet Ports 2
ProSoft Technology Product Documentation 3
Protocol 20, 48, 51
U
Use CTS Line 22, 42, 43, 50, 54
Use Guard Band Timer 24, 54
Using PCB Help 10
V
Viewing Error and Status Data 33
W
What Is Covered By This Warranty 74, 76
What Is Not Covered By This Warranty 74
Word Input Offset 23
Y
Your Feedback Please 3
R
Read Coil Status (Function Code 01) 58
Read Holding Registers (Function Code 03) 60
Read Input Registers (Function Code 04) 61
Read Input Status (Function Code 02) 59
Reference 57
Reg Count 29
Request Timeout 55
Response Timeout 22, 50
Retry Count 22, 50
Return Material Authorization (RMA) Policies and
Conditions 72
RS Interface 18, 51
RTS Off 21, 49, 53
RTS On 21, 49, 53
S
Serial Port Modbus Error and Status Data 33, 46
Serial Port Specifications 12
Slave Address 30
Slave Port
General Port STATE and COMM STATE Status
35
Start Here 7
Stop Bits 21, 49, 53
Sub-function codes supported 64
Support, Service & Warranty 71
Swap Code 29
System Requirements 7
T
Time Limit for Bringing Suit 76
To Order a ProLinx Plus gateway with the -WEB
option: 3
To upgrade a previously purchased Series C model:
3
Type 18
Page 80 of 80