Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
36 views58 pages

Modbus To Ethernet

The BL124 Modbus to Ethernet/IP Gateway facilitates communication between Modbus and Ethernet/IP networks, allowing seamless data exchange in industrial systems. The user manual provides detailed instructions on product features, hardware setup, operation, and web configuration. It also includes technical specifications and guidelines for troubleshooting and warranty information.

Uploaded by

ramy alfons
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views58 pages

Modbus To Ethernet

The BL124 Modbus to Ethernet/IP Gateway facilitates communication between Modbus and Ethernet/IP networks, allowing seamless data exchange in industrial systems. The user manual provides detailed instructions on product features, hardware setup, operation, and web configuration. It also includes technical specifications and guidelines for troubleshooting and warranty information.

Uploaded by

ramy alfons
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Modbus to Ethernet/IP Gateway

BL124
User Manual
Modbus to Ethernet/IP Gateway
-BL124

Version: V1.0

Date:2024-05-22

Shenzhen Beilai Technology Co., Ltd

Website: https://www.bliiot.com

Preface
Thanks for choosing BLIIoT BL124 Gateway. Reading this manual with full attention
will help you quickly learn device functions and operation methods.

Copyright
This user manual is owned by Shenzhen Beilai Technology Co., Ltd. No one is
authorized to copy, distribute or forward any part of this document without written
approval of Beilai Technology. Any violation will be subject to legal liability.

Disclaimer
This document is designed for assisting user to better understand the device. As the
described device is under continuous improvement, this manual may be updated or
revised from time to time without prior notice. This Protocol Gateway is mainly used
for industrial data transmission over Ethernet. Please follow the instructions in the
manual. Any damages caused by wrong operation will be beyond warranty.

Revision History

Page 2 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Revision Date Version Description Owner


2024-5-24 V1.0 Initial Version ZL

Content
1 Product Introduction .............................................................................................. 5

Overview ........................................................................................................ 5

Packing List .................................................................................................... 5

Features ......................................................................................................... 6

Technical Parameter ...................................................................................... 6

2 Hardware Introduction .......................................................................................... 8

Outline Dimension .......................................................................................... 8

LED Indicator.................................................................................................. 9

Reset ............................................................................................................ 10

Mounting ....................................................................................................... 10

3 Operation ............................................................................................................ 10

Power On ..................................................................................................... 10

3.1.1 Gateway Power On ............................................................................... 10

Page 3 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

3.1.2 System Running .................................................................................... 10

COM Port ..................................................................................................... 10

3.2.1 Modbus Master ...................................................................................... 12

3.2.2 Modbus Slave ........................................................................................ 12

3.2.3 Modbus to Ethernet/IP........................................................................... 12

4 Web Page Configuration ..................................................................................... 13

Wired connection ......................................................................................... 13

Factory Default Settings ............................................................................... 16

Login to Web Configuration Page ................................................................ 16

Web page Configuration Instructions........................................................... 17

4.4.1 Status ..................................................................................................... 18

4.4.2 System ................................................................................................... 19

4.4.2.1 System ............................................................................................ 19

4.4.2.2 Administration ................................................................................. 22

4.4.2.3 Backup/Flash .................................................................................. 23

4.4.3 Settings .................................................................................................. 24

4.4.4 Serial Module ......................................................................................... 25

4.4.4.1 Serial Settings ................................................................................. 25

4.4.4.2 Modbus Settings ............................................................................. 25

5 Fieldbus Communication Example ..................................................................... 28

Overview ...................................................................................................... 28

Modbus Storage Area .................................................................................. 29

Modbus Function Code ................................................................................ 29

5.3.1 Function Code 01H (Read Output Status) ............................................ 29

5.3.2 Function Code 02H (Read Input Status) ............................................... 30

5.3.3 Function Code 03H (Read Holding Registers) ..................................... 30

5.3.4 Function Code 04H (Read Input Registers).......................................... 31

5.3.5 Function Code 05H (Force Single Coil) ................................................ 32

5.3.6 Function 06H (Single Holding Register) ............................................... 32

5.3.7 Function Code 0FH (Force Multiple Coils) ............................................ 33

Page 4 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

5.3.8 Function Code 10H (Preset Multiple Registers) ................................... 33

Communicates with CODESYS ................................................................... 34

Communicates with an Omron NX1P2 PLC ................................................ 42

Communicates with an AB 1769-L16ER ..................................................... 50

6 Warranty Term .................................................................................................... 57

7 Technical Support ............................................................................................... 57

1 Product Introduction

Overview

BL124 Modbus to Ethernet/IP gateway is a device that enables communication


between Modbus devices and Ethernet/IP networks. The Modbus to Ethernet/IP
gateway serves as a bridge between devices that use the Modbus protocol and
devices that use the Ethernet/IP protocol. This allows for seamless communication
and data exchange between different parts of an industrial system that may use
different protocols.

Page 5 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Packing List

Before connecting the gateway, please make sure below items are included in the
package:
(Pictures are for reference only.)
⚫ 1 X Gateway with terminal Blocks

⚫ 1 x User Manual(PDF File Download Guide)


⚫ 1 x Product Qualification Certificate
⚫ 1 x Warranty Card

Note: If any of above items are missing, please contact BLIIOT Sales team.

Page 6 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Features

➢ Downlink supports: Modbus RTU

➢ Uplink supports: Ethernet/IP

➢ 2CH RS485

➢ The network port can be configured via a web interface

Technical Parameter

Parameter Description
Power Input Voltage DC 9~36V
Supply Power Consumption Normal: 50mA@12V, Max: 20mA@36V
Specification 2 x RJ45, 2x10/100Mbps
Ethernet
ESD: ±6kV(Contact), ±8kV(Air)
Port Protection
EFT: 1kV, 5kHz
QTY 2CH RS485
2400, 4800, 9600, 19200, 38400, 57600,
Baud Rate
115200
Data Bit 8
Parity Bit None, Even, Odd
Serial Port Stop Bit 1, 2
Mode RTU Master/Slave
Function 01H, 02H, 03H, 04H, 05H, 06H, 0FH, 10H
Connection Up to 31 connections to a single serial port
ESD ±6kV(Contact), ±8kV(Air)
Protection
EFT ±1kV, 5kHz
PWR Always on when device powered on
RUN Flickering when system running
Indicator
LINK Flickering when TCP communicating
RS485 Flickering when communicating
Protocol Ethernet/IP, Modbus RTU
Default bytes "2Bytes"
Max input/output
Software Max Input Bytes ≤496Bytes
data volume
Max Output Bytes ≤496Bytes
File EDS
Safety EMC IEC 61000-4-2 (ESD) Level 3

Page 7 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Regulations IEC 61000-4-4 (EFT) Level 3


IEC 61000-4-5 (Surge)Level 3
Others CE, FCC, RoHs
Environment Working -30~55℃, 5~95% RH
Housing Material Plastic
Size 30×83×110mm(LxWxH)
Others
Protection IP30
Mounting DIN Rail Mounting
Note: When configuring with function code 01 or 02, to facilitate the calculation and
display of 2 bytes on the PLC, configure in double bytes as much as possible. For
function code 03 or 04, the configuration must not exceed 125 data points (in
accordance with Modbus specifications).

2 Hardware Introduction

Outline Dimension

Page 8 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

LED Indicator

Page 9 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

LED Indicator Introduction


Status Description
Always ON Power on
PWR Power Supply
OFF Failure
Flickering Device is running
RUN Running
OFF Failure
Always ON TCP communicating
LINK TCP Communication
OFF Failure
Flickering Data acquisition normal
RS485 RS485
OFF Failure

Reset

After the gateway operates normally, press and hold the Reset button continuously
for about 10 seconds until link indicator light remains on, at which time the gateway
restores the factory default settings if it restarts automatically.

Mounting

The gateway supports DIN-rail mounting.

3 Operation

Power On

3.1.1 Gateway Power On

The device is powered by a 9-36V DC voltage, and the power indicator LED (PWR)

Page 10 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

always on after powering on.

3.1.2 System Running

The "RUN" status indicator light is initially off after powering up. After waiting for 1 to
2 minutes, the RUN indicator light will start blinking slowly, indicating that the device
is starting up and operating normally. If the light remains off continuously, it indicates
a device failure.

COM Port

The device features two RS485 serial ports, which can be used for Modbus RTU
master, Modbus RTU slave.

RS485 and RS232

Serial Side Connection


1 RS485A TXD A/D+
2 RS485A RXD B/D-
3 GND GND
4 RS485B TXD A/D+
5 RS485B RXD B/D-

Page 11 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

3.2.1 Modbus Master

Modbus Master Function: This gateway will operate as a Modbus master. The serial
port will be connected to Modbus slave devices. By configuring slave parameters
through the configuration page, the gateway will collect data from the slaves using
the Modbus protocol, thereby achieving the conversion from the Modbus protocol to
the Ethernet/IP protocol.
When the Modbus master settings select the slave interface as RS485, RS232, or
Ethernet, the gateway will continuously and actively poll the slave devices according
to the Modbus RTU protocol (for RS485 interfaces) or the Modbus TCP protocol (for
Ethernet interface). The read and write operations will be transmitted directly to the

Page 12 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

slave devices via the RS485 serial port or Ethernet.

Users can connect various slave devices through the RS485 serial port or Ethernet
port to expand I/O ports and to read and write intelligent instruments and devices.
For example, users can connect to our Mxxx series remote I/O modules to expand
the number of DI, DO, AI, AO, and PT100 input ports, connect to power parameter
monitoring modules to read the current, voltage, and power of three-phase electricity,
or connect to a UPS power supply for parameter monitoring. Additionally,
combinations of these intelligent devices can be used to meet the functional
requirements of most application scenarios.

3.2.2 Modbus Slave

Modbus Slave Function: This gateway will operate as a Modbus slave. The serial
port will connect to Modbus master devices. By configuring serial port parameters
and server parameters through the configuration page, the master device can collect
this device's I/O data using the Modbus RTU protocol (via RS485 interfaces) or the
Modbus TCP protocol (via Ethernet interface).

3.2.3 Modbus to Ethernet/IP

This device will convert the Modbus protocol to the Ethernet/IP protocol in the form of
a Modbus RTU master or slave.

 Supports standalone use of RS485


 Supports configuration via a 31-line web page
 Supports RTU data collection from 31 slaves (dependent on baud rate)
 Supports data collection as Modbus RTU master/slave
 Supports simultaneous use of multiple function codes
 Supports Modbus RTU protocol with function codes 01H, 02H, 03H, 04H, 05H,
06H, 0FH, 10H
 Supports selectable baud rates of 2400, 4800, 9600, 19200, 38400, 57600,
115200

4 Web Page Configuration

The device supports web configuration using a wired connection. To configure the
device, connect your computer to the configuration port using an Ethernet cable.

Page 13 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Open a web browser on your computer and enter the default login address for the
device, which is 192.168.3.10. The default login username is "admin" with no
password required.

Wired connection

On the PC side, there are two methods to configure its IP address:


1, Enable automatic IP address assignment on the PC's local connection, allowing
the PC to obtain an IP address automatically from the router.
2, Manually configure a static IP address on the PC's local connection within the
same subnet as the router.
Below is an example using Windows 7 for configuration. Configuration steps for
Windows systems are generally similar.
1, Click on "Start > Control Panel > Network and Sharing Center." Then, in the
window that opens, double-click on "Local Area Connection."

Page 14 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

2, In the "Local Area Connection Status" window, click on "Properties."

3, Select "Internet Protocol Version 4 (TCP/IPv4)" and then click on "Properties."

Page 15 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

4, Configure the IP address for the PC


Automatically obtains IP address from DHCP server by clicking on "Use the following
IP address" and configuring the settings.

Manually assign a static IP address to the PC within the same subnet as the router's
address, clicking and configuring "Use the following IP address."

Page 16 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

5, Click "OK" to complete the configuration.

Factory Default Settings

Item Description
Login IP address 192.168.3.10
Username admin
Password No password

Login to Web Configuration Page

1, Connect to the router either via wired or wireless connection on your PC. Then,
open a web browser such as IE, Edge, Google Chrome, or another browser.
2, Enter the router's IP address 192.168.3.10 to access the login page.

3, Enter the username "admin" (default) and leave the password blank (default), then
click the "Login" button.

Page 17 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

4, After successfully logging in to it, you will be directed to the status overview page.

5, After configuring the parameters, make sure to click on "Save and Apply" on the
interface to apply the settings.

Web page Configuration Instructions

Web page configuration options: "Status", "System", "Settings", "Serial Module",

Page 18 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

"Logout".

4.4.1 Status

In the status menu, options include Overview, System Log, and Kernel Log, allowing
users to view device parameters and operational status.
Status > Overview

Status > System Log

Page 19 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Status > Kernel Log

4.4.2 System

4.4.2.1 System

System > General Settings

Page 20 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Description Default
Display the current device time. You can click on
Local Time "Sync with Browser" or "Sync with NTP Server" --
button to update the device time.
You can customize the device name for easier
Hostname BL124
differentiation between multiple devices.
Timezone You can select the time zone UTC

System > Logging

Page 21 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Description Default
System log buffer size Default 64 64
Enter the IP address of the server
External system log server
where the location is saved.
External system server port Server port
External system log server protocol UDP or TCP UDP
Write system log to file /tmp/system.log
Log output level Select the log level for saving the logs. Debug
Cron Log Level Debug

System > Time Synchronization

System > Language and Style

Page 22 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Description Default
Language Auto, English, Chinese Auto
Design Bootstrap Bootstrap

4.4.2.2 Administration

Administration > Router Password


Change the administrator password for accessing the device.

Administration > SSH Keys


Compared to using regular passwords, public key authentication allows for more
secure SSH logins. To upload a new key to the device, paste the OpenSSH-
compatible public key line or drag the .pub file into the input field.

Page 23 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

4.4.2.3 Backup/Flash

Description Default
Click "Generate archive" to download the
Backup --
current configuration file as a tar archive.
Upload the backup archive to restore the
configuration. To reset the firmware to its initial
Restore --
state, click "Perform Reset" (only valid for
squashfs format firmware).

Page 24 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Click "Save mtdblock" to download the


Save mtdblcok
specified mtdblock file. (Note: This feature is --
contents
intended for professionals!)
Flash new Upload a sysupgrade-compatible image to
--
firmware image update the running firmware.

4.4.3 Settings

Description Default
Choose between "static address" and
IP Address Type Static IP
"dynamic address".
Set device IP Address Device Ethernet/IP Address
Subnet Mask 255.255.255.0
On the same network segment as the
Gateway Address
device IP

Page 25 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

4.4.4 Serial Module

4.4.4.1 Serial Settings

Description Default
COM Type RS485
COM Name RS485A, RS485B
Baudrate 2400-115200 9600
Data bits 7 or 8 8
Parity None, Odd, Even None
Stop bits 1 or 2 1
Modbus Settings Check chapter 4.4.4.2

4.4.4.2 Modbus Settings

By default, input and output are "2 bytes" without configuration. For the convenience
of calculation, it is best to calculate the function codes 01/02/05/06 in 2-byte

Page 26 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

increments when adding them.


Function Code Number of configuration data supported
01, 02 0, 1, 2, 4, 8, 16, 32, 64, 128
03, 04 0, 1, 2, 4, 8, 16, 32, 64
05, 06 0, 1
0F 0, 1, 2, 4, 8, 16, 32, 64, 128
10 0, 1, 2, 4, 8, 16

As an example, add 8 bytes each of input and output, and calculate the number of
T>>O, O>>T bytes

Add 01 function code, number of data is 64, 8 data is 1 byte

Add output 10 function code, number of data is 4, 1 data is 2 bytes

Page 27 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Display when finished, 8 bytes each for input and output

When adding an odd number of bytes, the number of bytes should be increased by 1;
as shown in the figure below, adding inputs as 0-8 is 9 bytes, so plus 1, actually filled
in 10 bytes.

Page 28 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

5 Fieldbus Communication Example

Overview

The gateway reads and writes data from the Ethernet/IP side and the Modbus side,
storing the data in their respective buffers. The gateway then exchanges the buffer
data internally, thereby enabling data transmission between the two sides.

Ethernet/IP is a network suitable for industrial environments and applications with


stringent time requirements. Ethernet/IP uses standard Ethernet, TCP/IP technology,
and an open application layer protocol called CIP (Control and Information Protocol).

Page 29 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Modbus Storage Area

MODBUS involves controllers (or MODBUS devices) with storage areas identified by
0xxxx, 1xxxx, 3xxxx, 4xxxx:
Storage Area
Name Type Write/Read Storage Unit Address
Identifier
0xxxx Coil Bit Read/Write 00000~0xxxx
1xxxx Input Coil Bit Read-only 10000~1xxxx
3xxxx Input Register Word Read-only 30000~3xxxx
4xxxx Holding/Output Word Read/Write 40000~4xxxx
Register

Modbus Function Code

5.3.1 Function Code 01H (Read Output Status)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Starting Starting of Coil of Coil
Address Address Count Count
13H 01H 00H 11H(17) 00H 25H XXXX
Function: Read the status of output coil 0xxxx from the slave.

In this example: Read output coils from slave 13H, starting at coil address 001H
(which is 17 in decimal), with a count of 0025H (which is 37 in decimal). Therefore,
the query message functionality is to read output coils from slave 19 (13H in
hexadecimal), addressing coils 00017 to 00053, totaling 37 coils.

Slave Response Format

Address Function Byte Coil Coil Coil Coil Coil CRC


Code Count Status Status Status Status Status

00017- 00025- 00033- 00041- 00049-


000024 00032 00040 00048 00053

13H 01H 05H CDH ABH EFH 12H 1BH XXXX

Page 30 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Function: Slave returns status of output coil 0xxxx.

In this example: 1B = 00011011, corresponds to 000049-000053.

1B = 0 0 0 1 1 0 1 1, corresponds to 00049-00053, fill in 0 00049 0005.

00049
0

00053

5.3.2 Function Code 02H (Read Input Status)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Starting Starting of Coil of Coil
Address Address Count Count

13H 02H 00H 12H(18) 00H 10H XXXX

Function: Read the status of output coils 1xxxx from the slave.
In this example: Reading output coils from slave 13H, starting at coil address 0012H
(which is 18 in decimal), with a count of 0010H (which is 16 in decimal). Therefore,
the query message function is to read output coils from slave 19 (13H in
hexadecimal), addressing coils 10018 to 10033, totaling 16 coils.

Slave Response Format


Address Function Byte Count Coil Status Coil Status CRC
Code
10018-10025 10026-10033

13H 02H 02H CDH ABH XXXX

5.3.3 Function Code 03H (Read Holding Registers)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Starting Starting of of
Address Address Register Register

13H 03H 00H 60H(96) 00H 02H XXXX

Function: Read the status of output coils 4xxxx from the slave.

Page 31 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In this example: Reading output coils from slave 13H, starting at register address
0060H (which is 96 in decimal), with a count of 0002H (which is 2 in decimal).
Therefore, the query message function is to read values of 3 holding registers 40096-
40097 from slave 19 (13H in hexadecimal).

Slave Response Format

Address Function Byte High Byte Low Byte High Byte Low Byte CRC
Code Count of of of of
Register Register Register Register
40096 40096 40097 40097

13H 03H 04H 03H 00H 02H 2AH XXXX

Function: Slave returns the values of holding registers: 40096 = 0300H, 40097 =
022AH.

5.3.4 Function Code 04H (Read Input Registers)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Starting Starting of of Register
Address Address Register

13H 04H 00H 05H 00H 01H XXXX

Function: Read the status of output coils 3xxxx from the slave.

In this example: Reading output coils from slave 13H, starting at register address
0005H (which is 5 in decimal), with a count of 0001H (which is 1 in decimal).
Therefore, the query message function is to read the value of 1 holding register
30005 from slave 19 (13H in hexadecimal).

Slave Response Format

Address Function Byte Count High Byte of Low Byte of CRC


Code Register 30005 Register 30056

13H 04H 02H 00H 00H XXXX

Function: Slave returns the value of input register 30005: 30005 = 0000H

Page 32 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

5.3.5 Function Code 05H (Force Single Coil)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Starting Starting of of
Address Address Register Register

13H 05H 00H 11H(17) FFH 00H XXXX

Function: Force the status of output coils 0xxxx for slave 19.

• For the disconnect flag = FF00, set the coil ON.


• For the disconnect flag = 0000, set the coil OFF.

In this example: Starting address = 0011H (which is 17 in decimal), force set coil
0017 of slave 19 to ON state.

Slave Response Format

Address Function High Byte of Low Byte of Disconnect Disconnect CRC


Code Starting Starting Flag Flag
Address Address

13H 05H 00H 11H(17) FFH 00H XXXX

Function: Force slave 19 to return coil 0017 to the ON state.

5.3.6 Function 06H (Single Holding Register)

Master Query Message Format

Address Function High Byte of Low Byte of High Byte Low Byte CRC
Code Register Register of of
Register Register

13H 06H 00H 15H 01H 01H XXXX

Function: Pre-set single holding register 4xxxx state.

In this example: Pre-set single holding register 40021 of slave 19 to the value
0x0101.

Page 33 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Slave Response Format

Address Function High Byte of Low Byte of High Byte of Low Byte of CRC
Code Register Register Register Register

13H 06H 00H 15H 01H 01H XXXX

Function: Pre-set holding register 40021 of slave 19 to the value 0x0101 and then
return the original message.

5.3.7 Function Code 0FH (Force Multiple Coils)

Master Query Message Format

Addre Function High Low High Low Byte Coil Coil CRC
ss Code Byte of Byte of Byte Byte Coun Statu Statu
Coil Coil of of t s s
Addres Addres Coil Coil
s s Coun Coun
t t

13H 0FH 00H 11H 00H 09H 02H 01H 01H XXX
X

Function: Force multiple consecutive coils 0xxxx to ON/OFF state.

In this example: Pre-set multiple consecutive coils for slave 19. Starting coil address
is 0011H (which is 17 in decimal), with a count of 0009H (which is 9 in decimal).
Therefore, the query message function is to force 9 coils, addresses 00017 to 00025,
of slave 19.

Slave Response Format

Address Function High Byte Low Byte of High Byte of Low Byte of CRC
Code of Coil Coil Coil Count Coil Count
Address Address

13H 0FH 00H 11H 00H 09H XXXX

5.3.8 Function Code 10H (Preset Multiple Registers)

Master Query Message Format


Addr Functi High Low High Low Byt Hig Lo Hig Lo CR

Page 34 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

ess on Byte Byte Byte Byte e h w h w C


Code of of of of Cou Byt Byt Byt Byt
Regis Regis Regis Regis nt e e e e
ter ter ter ter of of of of
Coun Coun Da Da Da Da
t t ta ta ta ta

13H 10H 00H 0AH 00H 02H 04H 01 02 01 CD XX


H H H H XX

Function: Pre-set values for multiple holding registers 4xxxx of the slave.
In this example: Pre-set values for multiple holding registers of slave 19. Starting
register address is 000AH (which is 10 in decimal), with a count of 0002H (which is 2
in decimal). Therefore, the query message function is to force the values of 2 holding
registers of slave 19.

Slave Response Format


Address Function High Byte of Low Byte of High Byte of Low Byte of CRC
Code Coil Address Coil Address Coil Count Coil Count

13H 10H 00H 0AH 00H 02H XXXX

Communicates with CODESYS

⚫ Providing the gateway with 24VDC system power and on-site power, using an
Ethernet cable to connect from the ETHERNET/IP interface to the PC.
⚫ Open a web browser, enter the gateway device's IP address to access the
configuration interface. (Ensure the computer is on the same network segment
as the gateway.)
⚫ Access the configuration interface for the master station, and write the
corresponding parameters into the configuration.
⚫ Open CODESYS software. Create a new project, and in the popup window,
select "CODESYS Control Win V3 x64 (3S-Smart Software Solution GmbH)".
Click OK to proceed.

Page 35 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Click on the icon in the bottom right corner of the computer. “CODESYS

Gateway SysTray - x64” and


"CODESYS Control Win SysTray - x64". Right-click on the icons "Start Gateway" and
"Start PLC" to use SoftPLC, allowing communication testing even without hardware
PLC. After starting both, all icons will appear red in color.

Page 36 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Double-click on "Devices", then click on "Scan Network" on the right-hand side. The
software will automatically scan the laptop (computer name). Double-click on the
computer name to access the communication settings interface. The laptop's
communication status will display green, indicating normal communication. It will be
online, allowing for downloading and monitoring of data. (You can find the computer
name in Settings -> System -> About.)

After establishing communication, right-click on "Device" and select "Add Device".


Choose "Ethernet/IP", select "Ethernet Adapter", then "Ethernet", and click "Add
Device".

Page 37 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Select "Ethernet", right-click to add a device, then choose "EthernetIP" -> "EthernetIP
Scanner" -> "EthernetIP Scanner", and click "Add Device".

Double-click on "Ethernet", then click on "General" on the right side. Select the
local network card and click "OK".

Page 38 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Right-click on "Ethernet/IP Scanner" and click "Scan Modules". In the popup window,
it will display "Unable to scan devices: stack not available, please login first".

Close the window, select "PLC Device", and click "Compile". If there are no

errors during compilation, click "Login to" Click "Yes", then click "Start".

Right-click on "Ethernet/IP Scanner" and click "Scan for Devices".

Page 39 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In the popup window, it shows that the device is not located in the device library.

Click on "Tools" - "Device Repository" (This allows you to install the EDS files for the
Ethernet/IP gateway when opening CODESYS software).

Page 40 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In the popup window, click "Install", select the EDS file for the gateway, click "Open",
and successfully install the gateway's EDS file.

Right-click on "Ethernet/IP Scanner" and click "Scan Modules". Copy the scanned
gateway information into the project.

Page 41 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

To logout from the PLC, double-click on the module information to view all input and
output data.

Click on Ethernet/IP Mapping, and enable continuous variable updating: Enable 1.

Page 42 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Select "PLC Device", click on "Compile", then "Login", and finally "Online".

Communication is normal, with default input and output both set to "2 bytes".

Communicates with an Omron NX1P2 PLC

Configuring BL124 gateway with 2-byte input and output in the 192.168.1.xx network
segment.
 Preparation: Module assembly, wiring referencing product installation guide, and
device connection operations.
 Open Sysmac Studio software, click on "New Project", select NX1P2-9024DT,
and click "Create".

Page 43 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 Click on "Configuration and Setup" -> "Controller Setup" -> "Built-in EtherNet/IP
Port Settings" to modify the IP address.

 Set your computer's IP address to be in the same network segment as the PLC.
The PLC address is 192.168.1.21.

 View the size of the input and output data areas for Ethernet/IP communication,
both T-->O and O-->T byte sizes, can be checked through web configuration or
calculated. Refer to “Serial Settings”.
T-->O size is 2 bytes and O-->T size is 2 bytes for Ethernet/IP communication, as
obtained from web configuration.

Page 44 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 Click on "Global Variables". Based on the web configuration, T-->O size is 2


bytes and O-->T size is 2 bytes. Create new input variable input (ARRAY[0…1]
OF Byte) and new output variable output (ARRAY[0…1] OF Byte), and set their
networking properties to public for both input and output.

 Click on "Tools", then click on "Ethernet/IP Connection Settings". In the popup


window, double-click on PLC to enter the Built-in EtherNet/IP Port Settings and
Connection Settings interface.

Page 45 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 Click on "Registered All". In the popup window, select the input variable input and
the output variable output defined in the global variables, then click on
"Register".

Page 46 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 In the right-side toolbox, right-click and select "Display EDS Library". If it's your
first time using it, you'll need to install the EDS file for BL124.

Page 47 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 After installation, in the toolbox pane, click on "+" to add the BL124 gateway. In
the "Model Name" dropdown, select "BL124", choose version "2", and enter the
specific gateway address as required.

 Click on the connect icon, then click "+" to add a new connection. Choose
"192.168.1.123 BL124" as the target device. Under "Originator Variable", select
the variable "input" for input and "output" for output. In the "Target Variable"
section, enter "100" for input and "150" for output, ensuring the target byte size
matches the start variable byte size.

Page 48 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 Click on "Controller" -> "Online", or click on the shortcut icon Click on the
menu bar: "Controller" -> "Transfer" -> "Transfer to Controller". In the popup
window, click "Execute" to download the configuration, settings, and program to
the PLC. In the popup window, click "Yes" -> "Yes" -> "OK" in sequence. For
Ethernet/IP configuration, also click "Transfer to Controller" to download the
configuration to the PLC.

Page 49 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

 Click on "View" -> "Watch Tab Page". In the watch window, add input and output
variables to monitor data. You can monitor all data like input[0..1], or individually
monitor data from a specific module such as input[0]. These names correspond
to variables created as global variables.

Page 50 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Communicates with an AB 1769-L16ER

Configuring the BL124 gateway with 2-byte input and output in the 192.168.1.xx
network segment.

 Preparation: Module assembly, wiring following product installation guidelines,


and connecting devices.

 Configure PC, BL124 gateway, and AB PLC Ethernet/IP interfaces to be in the


same network segment: PC IP is 192.168.1.222, AB PLC IP is 192.168.1.111,
and BL124 IP is 192.168.1.123.

Run RSLinx Classic , Click on the shortcut RSWho

Click on the shortcut "Configure drivers." , Configure the driver in the pop-up
dialog box.

Page 51 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

After completing the driver configuration, devices on the EtherNet/IP network are
listed in the left navigation area of the interface.

To run Studio 5000 software, select "New Project" to create a new project. Choose
the PLC model as the device name, name your project, and then click the "Next".

Page 52 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

Select the version number, then click the "Finish" button to complete the process.

Import the slave device's EDS file by following these steps:

1. Click on the "Tools" menu in the menu bar.


2. Select "Device Description Installation Tool" from the dropdown menu.
3. Follow the wizard prompts to import the EDS file of the slave device.

Page 53 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

To add a slave device:

1. In the left navigation pane of the tools, select the "Ethernet" node.
2. Right-click on it and choose "New Module..." from the pop-up menu.

Page 54 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In the pop-up dialog box, locate the model of the gateway device, then click the
"Create" button.

Page 55 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In the pop-up interface, configure the gateway parameter information:

1. Set the name.


2. Enter the gateway IP address.
3. Click the "Change" button.
4. In the module definition dialog that appears, adjust the input and output byte
sizes (considering data types), and leave other parameters as default.

To download the configuration:

1. Click on the "Communications" menu in the menu bar.


2. Choose "Download" from the dropdown menu.
3. In the pop-up dialog box, select the ABPLC device under the Ethernet
network.
4. Click the "Download" button.

Page 56 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

In the left navigation pane, select the "Controller" node. Open the tabbed interface to
view input and output data.

Page 57 of 58 Shenzhen Beilai Technology Co., Ltd V1.0


Modbus to Ethernet/IP Gateway
-BL124

6 Warranty Term

1) This equipment will be repaired free of charge for any material or quality problems
within one year from the date of purchase.
2) This one-year warranty does not cover any product failure caused by man-made
damage, improper operation, etc.

7 Technical Support

Shenzhen Beilai Technology Co., Ltd


Website: https://www.bliiot.com

Page 58 of 58 Shenzhen Beilai Technology Co., Ltd V1.0

You might also like