logo


DL3500-DH-485/MODBUS
COMMUNICATION CONTROLLER APPLICATION NOTE



PDF   Download

This application note contains information on the DL3500-Modbus to DH-485 interface. The DL3500 model contains two modes of operation, Modbus Master and Modbus Slave, which are selectable by the PC Configuration Software. The latest version is available on the web at http://www.equustek.com/downloads.html The information contained in this application note is supplementary information specific to Modbus not contained in the regular User's Guide.

Master or Slave mode?
This application note is divided into two parts, Modbus Master and Modbus Slave modes; they correspond to the mode the DL3500 is going to be on the Modbus Network, and which side either DH+ or Modbus the commands will be initiated on.

Master mode is used when a device on the DH+ network is going to initiate all communications with one or many Modbus slave devices. Please Refer to DL3500-DH-485/Modbus Master Application note.

Slave mode is used when a device on the Modbus network is going to initiate all communications with one or many SLC’s, PLC’s or other DH+ devices. Please Refer to DL3500-DH-485/Modbus Slave Application note.

The application notes generally assume that a SLC or other DH-485 device which can originate commands to Modbus via a DL3500 in master mode, or responding to Modbus commands via a DL3500 in slave mode. Only devices capable of transmitting DH-485 message commands in PLC5 (or PLC3) format and able to receive DH-485 message commands in PLC5 format can be used with the DL3500-Modbus/DH-485 including SLC’s, MicroLogix’s, ControlLogix’s and HMIs as well as other intelligent devices.

Due to differences between DH-485 and Modbus protocols and the universal design of the DL3500 there are differences between the lengths of messages, error handling and addressing which have to be carefully considered by the Systems Designer, Programmer and Installer.

CAUTION:
Incorrect configuration may result in unsafe operation, damage to equipment or safety hazard to personnel. Read the DL3500 User's Guide and the appropriate application notes carefully before putting a DL3500 on-line. The hardware and software must be fully tested off-line in a safe “TEST” environment prior to putting the unit on-line in an operational environment.

DL3500-DH-485 MODBUS MASTER TO A-B DH-485 CONFIGURATION
Use this option when the is required to be the master on a Modbus network.
The Modbus Master Application notes contain configuration information for the DL3500-DH-485 protocol and should be used in conjunction with the DL3500 User's Guide.

DL3500-DH-485 MODBUS SLAVE TO A-B DH-485 CONFIGURATION
Use this protocol when the is required to be a slave device on a Modbus network.
The Modbus Master Application notes contain configuration information for the DL3500-DH-485 protocol and should be used in conjunction with the DL3500 User's Guide.

NOTES:
1. The unit that you have received can be configured as Modbus Master or Modbus Slave. Ensure that you understand and carefully follow the specific configuration procedures for the Modbus protocol.
2. There are significant differences between the configuration, programming and operational requirements of Modbus Master and Modbus Slave protocols.
3. If you configure the DL3500 for Modbus Master Operation it must be the only master on the Modbus network. A station on DH-485 originates commands to the DL3500-DH-485 Modbus Master that then re-transmits them over Modbus to a Modbus Slave device. Other intelligent DH-485 devices capable of initiating DH-485 messages in PLC5 (or PLC3) format and able to receive PLC5 message commands could also be used as the DH- 485 “master”.
4. Be sure to fully test the hardware and software off-line to ensure that you understand its configuration and operation. Prior to putting the DL3500 on-line in an production process, the operation of the complete system should be fully tested on-line in a safe "test" environment.

5. Due to differences between DH-485, Modbus and the hardware and software there are differences between the lengths of messages, error handling and addressing which have to be carefully considered by the Systems Designer, Programmer and Installer.

6. Additional literature regarding DH-485, Modbus and PLC products can be obtained from Modicon and A-B. Suggested reference materials for A-B DH-485 protocol is shown in section 1.7 of the User's Guide.

CAUTION:
Incorrect configuration may result in unsafe operation, damage to equipment or safety hazard to personnel.
Read the DL3500 User's Guide and the appropriate application notes carefully before putting a DL3500 on-line. The DL3500 hardware and software must be fully tested off-line in a safe “TEST” environment prior to putting the unit on-line in an operational environment.

Contact Technical Support if you need further information or assistance.

TECHNICAL SUPPORT

Tel : (604) 266-8547

Or E-Mail :  info@equustek.com


The following table provides a reference between the different radixes used for your reference

DECIMAL TO OCTAL TO HEXADECIMAL ADDRESS CONVERSION TABLE



APPLICATION NOTE

DL3500-DH-485 MODBUS SLAVE PROTOCOL


The information contained in this configuration guide is for the Modbus Slave protocol only, and is supplementary to the information in the User's Guide.

INDEX FOR MODBUS SLAVE TO DH-485

1.1 MODBUS COMMAND CAPABILITIES
2
1.2 BROADCAST COMMAND
2
1.4 MODBUS EXCEPTION CODE RESPONSES
3
1.5 MODBUS MESSAGE DATA LENGTH CONSIDERATIONS
3
1.6 MODBUS TO DH-485 - GENERAL OVERVIEW
3
1.7 MODICON MODBUS TO A-B PLC ADDRESS MAPPING
4
       1.7.1 DEFINITION OF MODBUS SLAVE PARAMETER SCREEN
5
       1.7.2 MODICON TO AB ADDRESS MAPPING EXAMPLE
5
       1.7.3 ADDRESS MAPPING LIMITATIONS AND PRACTICES
6
1.7 MODBUS MASTER USING BM85 MODBUS PLUS/MODBUS BRIDGE MUX
6
       2.0.1   MODBUS MASTER TO DH-485 NETWORK
7
       2.0.2   MODBUS PLUS TO DH-485 VIA BM85 MODBUS BRIDGE
7

1.0   GENERAL


The DL3500-DH-485 Modbus Slave module facilitates communication between a Modbus Master and an Allen-Bradley DH-485 network. provides for serial communications to Modbus with RS232C, RS232 or RS422/RS485 interface capabilities. Interface cable drawings are in section 3. Communication between Modbus and the DL3500-DH-485 can only be initiated from a Modbus Master (not from the DH-485).

The Modbus serial port on the DL3500-DH-485 is transparent to Modbus and does not require an address. The DH-485 network side of the DL3500 unit is an active station on the DH-485 and requires its own DH-485 address that must be different than the DH-485 station address(es) that the Modbus Master needs to communicate with.

A Modbus Master can read and write to any SLC on DH-485 that can handle PLC5 message commands without the need for any programming in the SLC, however the PLC addresses used must not be “protected" and the full range of addresses that the Modbus Master requires to read from or write to must have been previously created in the SLC's data Table. Modbus read and write bit/coil commands are used with A-B SLC Binary (B) files and Modbus read and write word/register commands are used with A-B SLC’s Integer (N) files.

1.1    MODBUS COMMAND CAPABILITIES
The DL3500-DH-485 firmware module is compatible with the following Modbus commands: -
1.2   BROADCAST COMMAND
Modbus protocol uses the Broadcast command (i.e. commands 05, 06 and 16 with a station address of 00) to write to all slave devices on a Modbus network simultaneously, no response is expected by the Master. Allen-Bradley DH-485 protocol does not support Broadcast. A-B SLC’s are not capable of responding to a single "Broadcast" command over the DH-485 network. DL3500s can be configured to ignore or to execute Broadcasts. Broadcasting is accomplished by splitting the command into separate messages for retransmission one at a time to each DH-485 station within pre-configured range of stations. Because of the time taken to send out multiple messages over the DH-485, Broadcasts commands are normally restricted to an absolute minimum range of DH-485 stations.

A SLC or other device at DH-485 station address 00 cannot be addressed by Modbus read or write commands as 00 is normally the Broadcast command. DH-485 station 00 may be used as the DH-485 station address for the DL3500.

NOTES:
1. Restrict the DH-485 stations receiving a Modbus broadcast to prevent writing to unintended DH-485 destinations.
2. Valid Modbus Slave addresses of stations on DH-485 are 1 to 31 decimal (i.e. Slave station addresses 1 to 31.).


1.3     COMMUNICATIONS SEQUENCE
The DL3500 module receives a Modbus query on its asynchronous serial port, converts it into the appropriate DH- 485 message and sends it out on the DH-485 network. The DH-485 response is received, converted into the corresponding Modbus response and sent back to the Modbus Master. Modbus protocol does not allow messages to be buffered so the DL3500 processes one message at a time. The DL3500 unit will respond to the Modbus interface with the appropriate Modbus exception codes in the event of detectable errors.


1.4     MODBUS EXCEPTION CODE RESPONSES

1.5     DL3500-DH485-modbus-slave
The following shows the maximum number of coils/registers that can be sent or received in a single Modbus message. The limits are because of the different structure of Modbus and A-B DH-485 protocols, and also due to the internal memory structure of the DL3500. These values have only a limited relationship to the Modbus/DH-485 address mapping ranges configured in the DL3500.

•     The max. number of coils that can be read in a single transaction is 1600. (Normal Modbus allows 2000)
•     The max. number of registers that can be read in a single transaction is 100. (Normal Modbus allows 125)
•     The max. number of registers that can be written in a single transaction is 100. (Normal Modbus allows 100)

CAUTIONS :
1. Ensure that your communications program design prevents self-optimising Modbus Master communications programs (in some MMIs and Operator Interfaces) from requesting data in packets larger than the above limits.
2. Ensure that the Modbus program does not generate Modbus commands with addresses that can bridge across more than one of the address range entries configured in the.
3. Any of the above conditions could cause indeterminate errors.

1.6     MODBUS TO DH-485 - GENERAL OVERVIEW
The DL3500 unit is transparent to valid Modbus commands addressed to station numbers corresponding to active stations on DH-485. The DL3500 will only accept commands to DH-485 station addresses 1 to 31 decimal. Modbus commands using address 0 are broadcast commands and are handled differently by the DL3500.

After formatting and converting the Modbus message to DH-485 protocol the command is sent out to the addressed DH-485 (slave) device. If the station is inactive the query is disregarded. Each addressed slave station must be a unique address on Modbus or on the DH-485 network i.e. do not duplicate an address used on the Modbus network with a station address on the DH-485. If duplicate addresses exist then the situation will arise where two or more stations could accept the query resulting in multiple responses which would cause communications errors and perhaps writing to unintended destinations.

NOTE :
Special consideration should be given to the Modbus and DH-485 addressing to avoid duplication of network addresses. Confusion could arise because A-B uses an "octal" addressing scheme for DH-485 network stations and Modbus uses "decimal". Ensure use of a common numbering scheme (see section 1.6 for cross-references).

1.7     MODICON MODBUS TO A-B PLC ADDRESS MAPPING
The relationship between Modicon Modbus and Allen-Bradley PLC addresses is programmed by the user and is stored in the DL3500's EEPROM. The DL3500 can be programmed for eight different address ranges. Each Modicon address range that you wish to set-up may be mapped to a unique A-B address range. The length of the AB field required is the same as that defined by the Modicon address range. All A-B files should be either Binary, Integer or Floating Point files. These A-B files must be created by the A-B PLC programmer to the full length required by the Modbus Address Translation and Mapping parameters specified. No logic is needed in the A-B PLC to respond to commands received from the Modbus network. To define how a range of Modicon addresses maps over to Allen-Bradley addresses, the user must enter the following configuration information:

In the configuration software the type of PLC used is selected. See below.
Modbus Parameters-DL32 V3.1
1.7.1     DEFINITION OF MODBUS SLAVE PARAMETER SCREEN
Modicon Start Address :     Specifies the starting address of a range of Modbus addresses that will be mapped to A-B. Valid entries are 00000 to 09999, 10000 to 19999, 30001 to 39999 and 40001 to 49999.

Modicon End Address :     Specifies the end address of a range of Modbus addresses that will be converted to A-B. The range of entries is shown above.

A-B Starting Address :     Specifies the A-B PLC starting file number for the Modbus data. Valid entries are 001:000 to 999 : 999 (Sometimes files less than 8 are reserved) (ensure that data length does not exceed file boundary). NOTE: N7 and B3 are valid files!!

Floating Point Checkbox :     Used to Specify if the data is Modbus Floating point and to be written into Floating Point Files

Coils/discretes :
The bit address range of an A-B Binary file is 1000 words or 16,000 bits (i.e. 0 - 15,999 decimal). This means that one A-B file is more than sufficient to hold the largest Modbus coil address possible. An A-B binary file/bit address starts at bit 0 and the first “legal” Modbus coil address starts at 1, which means that normally the first Modbus coil address 00001 (or 10001) will correspond to bit 0 in A-B word 0. If a Modbus address of 00000 (or 10000) is entered in the Starting Address field it causes the first (legal) Modbus coil addresses i.e. bit 1 to correspond to an A-B file/word bit 1. This technique makes it easy to compare and match the Modbus and A-B memory maps, and easier to bit search the A-B program. When a Modbus coil /bit address is defined in the Start Address field i.e. 0XXXX or 1XXXX), then the first A-B Starting Address that can be used is Binary file 9 word 000 (B9:0).


Registers/words :
The word address range of an A-B Integer file is 0 - 999 i.e., only 1000 words (registers). Therefore if a Modbus address range greater than 1000 registers is required, it is necessary to use more than one A-B Integer (N) file, which will require multiple configuration parameter entries. The first A-B address that can be used for 3xxxx and 4xxxx register/word transfers is an A-B Integer file at file/word address N9:0.


Address Ranges :
The Modicon Address Range (i.e., Start Address less End Address), and the A-B Start Address selected, must not overflow the maximum A-B file address limit. This means that if A-B Starting Address of word 250 is used then the maximum register range for mapping must be 1000 minus 250, i.e. 750.


1.7.2     MODICON TO AB ADDRESS MAPPING EXAMPLE


NOTES:
1. The (Binary File) and (Integer File) text after the A-B File:Word address does not appear on the configuration screen and is provided here for reference only.
2. The A-B file corresponding to Modbus Coil addresses should have been previously configured in the PLC as a Binary (B) file and its size configured for the largest coil address.
3. The A-B file corresponding to Modbus Register addresses should have been previously configured in the PLC as an Integer (N) file and its size configured for the largest register address.


1.7.3     ADDRESS MAPPING LIMITATIONS AND PRACTICES
Modbus protocol generally permits a maximum of about 125 registers or 2000 coils to be read in a single transaction (the maximum number is dependent on the Modbus driver). When specifying multiple address translation ranges within the same type of Modbus address (either Oxxxx, 1xxxx, 3xxxx or 4xxxx) it is essential to establish a buffer region of at least 125 registers or 2000 coils between each address type’s range. Failure to do this may allow a self-optimising MMI interface program to write (or read) data to/from two different areas of the Allen-Bradley SLC with undesired and indeterminate results.

The examples above define a similar A-B word address to the Modbus start address which allows easier comparison between the Modbus A-B addresses used. For example a Modbus start address of 40001 can be represented in A-B PLC-5 file format by using A-B integer file N 40:001. Address mapping using this technique is recommended for a user’s convenience only, as it provides a very useful method for record-keeping, cross-reference and recognition. This technique is not mandatory and any Modbus address can be written to any A-B file.

When considering use of the above technique note that the first available open A-B files address for a PLC-5 controller is file 9. Modbus address 0xxxx cannot be displayed similarly in A-B format as A-B output file 0 should not be used. In this case for easy recognition use an A-B Binary file for Modbus output coils such as 9, 99, 999 or any other convenient file number is easily recognisable.

DL3500 firmware permits the entry of 00000 and 10000 values in the Modicon Start Address field even though strictly speaking these are not legal Modbus addresses. This feature allows a programmer to align an A-B Binary file bit 1 with the first legal Modbus Bit / Coil address 1. For example mapping Modicon Start Address 00000 to AB Start Address (B) 009:000, or Modicon Start Address 10000 to A-B Start Address (B) 010:000 aligns Modbus bit 1 with A-B bit 1. The "B" for Binary file is implied but not displayed.

NOTES:
1. Enough space must have been configured and be available in the A-B file to contain the full range of Modbus addresses specified or it will cause over-writing existing A-B files and data.
2. Do not transmit Modbus messages to the DL3500 to read or write more than 1600 coils or 100 registers in a single Modbus read or write command (see section 1.4 above).
3. Ensure that all A-B addresses specified have been created in the destination PLC on DH-485.
4. Set all unused Modbus to A-B addresses to zero.


1.7     MODBUS MASTER USING BM85 MODBUS PLUS/MODBUS BRIDGE MUX
The DL3500-DH-485 will communicate with Modicon PLCs and other devices via Modbus Plus when it is connected to one of the four Modbus ports of a NW-BM85-000 Modbus Plus/Modbus Network Bridge Mux (see DL3500 users guide for cable drawings)..

If a Modicon PLC (or other device) on Modbus Plus requires to communicate with a single A-B PLC on DH-485 then the selected Bridge Mux Port connected to the DL3500 can be configured as SLAVE in which case it must have the same Modbus station number as the target PLC-5's station address on DH-485.

If a Modicon PLC (or other device) on Modbus Plus requires to communicate with multiple A-B PLCs on DH-485 then the selected Bridge/Mux Port connected to the DL3500 should be set for NETWORK (slave) in which case the station number routing of the destination A-B PLC must be programmed into the appropriate Modicon PLC Ladder Logic Master Function Blocks (or command string) for the Modbus Plus network.

Ensure that the serial communications parameters for the Bridge Mux Modbus port are the same as the ’s.

2.0   MODBUS APPLICATIONS


2.0.1   MODBUS MASTER TO DH-485 NETWORK


NOTE:
The Modbus Master can communicate with any Slave device on the Modbus Slave network (01 and 02, and any PLC5, SLC5/03 or HMI station on DH-485, i.e. devices capable of receiving PLC5 message commands. Modbus and DH-485 addresses must not be duplicated (convert to the same radix) or the Master will receive two responses. The DL3500 can be any station number on DH-485 including Station 00 (not used on Modbus).

2.2   MODBUS PLUS TO DH+ VIA BM85 MODBUS BRIDGE


NOTE:
PLCs and HMIs etc. on Modbus Plus can be programmed to communicate with PLC5s, SLC5/03s and HMIs on DH-485, i.e. any devices capable of handling PLC-5 DH-485 message commands.
Back to Top