User's Manual of Haiwell PLC Digital Module
User's Manual of Haiwell PLC Digital Module
User's Manual of Haiwell PLC Digital Module
Contents
2 / 12
www.haiwell.com Haiwell PLC - Digital Module User Manual
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
8 9 10 11
DI(X) 8 9 10 11 12 13 14 15 8 9 10 11 12 13 14 15
1 2 3 0 1 2 3 4 5 6 7
16 17 18 19 16 17 18 19 20 21 22 23
DI(X) DI(X)
DI(X) 24 25 26 27 28 29 30 31
DI(X)
95.0
35.0
1 8 9 10
12 13 14 15
11
2
X0 X1 X2 X3 GND A+ B- RS485
S/S X4 X5 X6 X7 X8 X9 X10 X11
0 1 2 3 4 5 6 7
8 9 10 11
3 DI(X)
4 POW
LINK
H24DI
ON DIP
DI(X)
1 2 3 4 12 13 14 15 16 17 18 19
5
20 2122 23
DC
IN X18 X19 X20 X21 X22 X23
S/S X12 X13 X14 X15 X16 X17
3 / 12
www.haiwell.com Haiwell PLC - Digital Module User Manual
2. Indicator Description
1 PWR: power indicator .green,constant light -Power normal; Not light - Power abnormal.
2 LINK: multi-status indicator, three colors (Red/ Yellow/ Green), as follow:
Reference processing mode Module bus state LINK indicator state
No communication of module No light
Normal MPU has identified the module but no communication Constant light in green
Serial or parallel port in communication Green jitter: indicator on 30ms and off 30ms
Parallel power supply not enough, Without serial or parallel port in communication Yellow flicker: indicator on 0.5s and off 0.5s
must connect to external power Yellow is darkened and jitter alternately: indicator off
With serial or parallel port in communication
supply 0.5s and jitter 0.5s
Without serial or parallel port in communication Red flicker: indicator on 0.5s and off 0.5s
Firmware upgrade failed, reupgrade
Red is darkened and jitter alternately: indicator off
the module firmware With serial or parallel port in communication
0.5s and jitter 0.5s
Without serial or parallel port in communication Constant light in red
Hardware failure and maintenance
With serial or parallel port in communication Red jitter quickly: indicator on 30ms and off 30ms
3 RJ45 Ethernet indicator: there are two Ethernet LEDs, green and yellow, as shown on the picture:
Color Status description
Green light is long bright Physical connection of TCP module and external device is normal;
TCP module fails to connect with external device or the module itself is
Green light goes out
abnormal
TCP module is connected to an external device normally, and blinking
Yellow light blinks frequency indicates the data transmission speed. When speed is fast, human
eye is not easy to distinguish, at this time, yellow light is long bright.
Yellow light goes out No data transmission communication of TCP module and external device
4 / 12
www.haiwell.com Haiwell PLC - Digital Module User Manual
X0 X1 X2 X3 GND A+ B- RS485 OUTPUT + 24V OUT - X0 X1 X2 X3 GND A+ B- RS485 H08DI H08DOR/T/P H08XDR/T/P
S/S X4 X5 X6 X7 X8 X9 X10 X11 Max 200mA S/S X4 X5 X6 X7 X8 X9 X10 X11 C0 C0
H24DI(-e) H24DI2(-e) X4 Y0 Y0
DC + 24V IN - X18 X19 X20 X21 X22 X23 AC L N X18 X19 X20 X21 X22 X23
X5 Y1 Y1
IN S/S X12 X13 X14 X15 X16 X17 IN S/S X12 X13 X14 X15 X16 X17
X6 Y2 Y2
X7 Y3 Y3
X0 X1 X2 X3 GND A+ B- RS485 OUTPUT + 24V OUT - X0 X1 X2 X3 GND A+ B- RS485
S/S X4 X5 X6 X7 X8 X9 X10 X11 Max 200mA S/S X4 X5 X6 X7 X8 X9 X10 X11
H24XDR/T/P(-e) H24XDR/T/P2(-e)
DC + 24V IN - Y2 Y3 C4 Y6 Y7 Y10 Y11 AC L N Y2 Y3 C4 Y6 Y7 Y10 Y11
IN C0 Y0 Y1 Y4 Y5 C8 Y8 Y9 IN C0 Y0 Y1 Y4 Y5 C8 Y8 Y9
5 / 12
www.haiwell.com Haiwell PLC - Digital Module User Manual
9. Module Parameter Table (CR code is corresponding to the Modbus register address)
Note: CR code is corresponding to the Modbus register address, the gray parts are read-only ,the white parts are readable and
writable.
Function Description
CR Code H16DI, H16DOR, H16DOT, H16XDR, H16XDT, H24DI, H24XDR, H24XDT,
H40DI, H36DOR, H36DOT, H40XDR, H40XDT, H64XDR, H64XDT
00H Low byte for module code, and high byte for module version number.
01H Communication address
Communication protocol: The low 4-bit of the low byte: 0 - N,8,2 For RTU,1 - E,8,1 For RTU,2 - O,8,1 For RTU,3 - N,7,2 For
02H ASCII,4 - E,7,1 For ASCII,5 - O,7,1 For ASCII,6 - N,8, 1 For RTU
The high 4-bit of the low byte: 0 – 2400,1 – 4800,2 – 9600,3 – 19200,4 – 38400,5 – 57600,6 - 115200
03H~06H Module name
07H~08H Default IP address: 192.168.1.111
09~0AH Reserve
High byte subnet mask (b3~b0,1indicates 255, 0 indicates 0, for example, subnet mask255.255.255.0 , b3~b0=1110), low byte
0BH
Reserved
0CH~0EH Reserve
Error code: 0-Normal, 1-Illegal firmware identity, 2-Incomplete firmware, 3-System data access exception, 4-No external 24V power
0FH
supply
10H~4FH DI channel 1~64 input value
50H~8FH DO channel 1~64 output value
90H DI filter time ms,0 - 0.8、1 - 1.6、2 - 3.2、3 - 6.4、4 - 12.8、5 - 25.6、6 - 51.2
91H~9FH Reserve
Extension Module Wiring: Connections between extension modules and connections between module and MPU are achieved
through bus.A extension cable will be configured to every extension module, for the connection between two different
modules.Connection methods: turn the right side of extended interface(the last MPU or extension module) over, plug the
extension cable in the extended interface, then press down the cover of the extended interface to reset the interface, the extended
interface at the right side of the module will be reserved for extension of the next module. Connect all extension modules in turn in
the same way.
6 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
1.2. Set the module digital input filter time and whether the digital output is downtime output or not through hardware
configuration. The hardware configuration determines the corresponding address of the input and output points on the
module
For example, the host PLC T48S2T connects with two digital module of H24XDT/P and H08DOT/P through the parallel port, when
the hardware configuration is completed, the address of the module input and output points will be immediately determined.
First, enter the PLC programming software menu bar - view - hardware configuration, add the module model according to the
external actual order, after adding, the switching points address will be automatically arranged, as shown below:
Set the filtering time of the external switch input points in the hardware configuration, and set whether the each output point of the
module is downtime output or not. In this example, in order to set Y24 and Y25 as downtime output, just select the corresponding
boxes of Y24 and Y25 .
7 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
Distributed installation is very important for the system which needs to collect and monitor a large number of decentralized digital
or analog signals(temperature, humidity, differential pressure, blowing rate, flow, fan speed, valve opening, etc.), it can easily
achieve distributed installation control and unlimited points of expansion, greatly improving the control system configuration
flexibility and future control expansion capabilities, reducing the number of signal wiring, also reducing the interference problem of
too long analog signal line, saving the project investment costs.
The following will introduce the operation key points and techniques.
2.1. Module power supply
When the module is used as remote IO, there are two optional models of 24VDC and 220VAC, such as H24DI model for the DC
24V power supply. H24DI2 for AC 220V power supply. If the module is powered normally, the PWR indicator will light.
Address: 1 ~ 254 can be set; module address is divided into soft address and hard address, hard address has the highest
priority.
Soft address: The address set through programming software - remote tool, address range 1-254;
Hard address: The address set through the 4-bit DIP switch of module hardware, address range 1-15. Hardware address
setting example:
8 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
Ethernet +: Support the standard Modbus TCP protocol, it can communicate with the configuration, touch screen, PLC and other
third-party host computers, which must support Modbus TCP protocol. Among them:
Ethernet default parameters:
IP: 192.168.1.111
Subnet mask: 255.255.255.0
Gateway: 192.168.1.1
2.4. Module parameter configuration method introduction, when the module is used as remote IO
There are three ways to configure remote IO parameters:
1 It can be configured via programming software - tools - remote modules (recommended);
2 It can be configured via the hardware configuration and TO instructions, when the module is hung behind the host PLC
through the parallel port;
3 It can be configured via MODW instructions through the serial communication.
2.5. Parameter configuration example: The module is configured by programming software remote module tool
Hardware connection
1 Through the RS485 communication port (the terminals of A +,B- on the module) connection: If the computer has a serial port,
you can use the converter of 232 to 485 connecting with the module; if it has one USB interface, you can use the converter of
USB to 485 connecting with the module.
2 Through the connection of Ethernet + communication interface: You can connect the module with the computer's network port
directly by the standard network cable, or take the computer and module connected to the switch.
Click the button in the pop-up window to open the "Online" window. The module default address is 1,19200, N 8 2 RTU, the
online success is as follows:
9 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
If there is only one machine connected with 485 line, then check "stand-alone search"; if there are more than one, then remove
the button of "stand-alone search", and set the start address and end address, so that all the machines connected with 485 line
can be found and achieve parameter configuration.
We can change the module name, address, IP, subnet mask, baud rate, data format and other communication parameters in the
communication parameter area.
In the external switch input area, we can set the channel filter time.
10 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
After setting, select the "Download parameter" to download the parameter into the module.
In addition, we can do the following operations through the remote module tool:
1 Online monitoring the channel value of module, error code.
2 Upload the module parameter, upgrade the module firmware, then make the module support new features.
3 It can export the module configuration to save or import and restore the default value.
2.6. Remote IO application example(RS485 mode): The PLC reads the 12 input channels status of the H24XDT module
1 Hardware wiring: PLC connects to 485 port of module by shielded twisted pair, A + connects to A +, B- connects to B-, if the
PLC connects to multiple remote IO modules, it needs to use hand in hand way to connect.
2 Modbus address: It can be seen from the above CR parameter list of digital module that the CR code 10H ~ 1CH of
H24XDT module stores the input status of channels 1 ~ 12.
3 PLC program: Host PLC wants to read the 12 channels input status of remote IO module H24XDT. In this example,
H24XDT communication is the default parameter: Station number address is 1, baud rate is 19200, data format is N 8 2
RTU. The PLC reads the 12 channels input status of H24XDT module:
The host PLC reads the 12 channels input status of H24XDT by Modbus read instruction MODR, the start address is 10H
(hexadecimal), that is, the decimal value is 16. When the communication is successful, M50 is ON, the input points status
which are read back will be stored in M0-M11.
2.7. Remote IO application example (RS485 mode): The PLC writes the 12-channel output values of H24XDT module
1 Hardware wiring: PLC connects to 485 port of module by shielded twisted pair, A + connects to A +, B- connects to B-, if the
PLC connects to multiple remote IO modules, it needs to use hand in hand way to connect.
2 Modbus address: From the above digital module CR parameter table shows that, the output channel 1 ~ 12 output values
of 12-channel module are stored in address 50H~5CH.
3 PLC program: Host PLC wants to write the 12-channel output values of remote IO module H24XDT. In this example,
H24XDT communication parameters: Station number address is 1, baud rate 19200, data format N 8 2 RTU. The program
of writing 12-channel output values of H24XDT is as follows:
11 / 12
www.haiwell.com Haiwell PLC - Digital Module Application Case
Host PLC writes the 12-channel output values of H24XDT by Modbus write instruction MODW, the start address is
50H(hexadecimal), that is, the decimal value is 80. When writing successfully, M51 is ON, the 12-channel values which will
be written into are stored in M20-M31.
2.8. Remote IO application example(Ethernet mode): PLC read and write each channel input and output values of H64XDT-e
1 Hardware wiring: PLC and module Ethernet port connected with a shielded network cable, they can be connected directly
or through the switch.
2 Modbus address: From the above H64XDT-e digital module CR parameter table shows that the input values of module
input channel 1 ~ 32 are stored in the address 10H~30H. The output values of module output channel 1-32 are stored in
50H~70H.
3 PLC program: Read the 32-channel input status of remote Ethernet module H64XDT-e and write the 32-channel output
values of H64XDT-e, if the module IP address is 192.168.1.112, station number address is 1, the read results are stored
in the M100~M131, the values to be written are stored in the register M200-M231. As follows:
Thanks for choosing Haiwell PLC, If you have any questions about our products or services, please let us know!
Haiwell website: www.haiwell.com Copyright © 2005 Xiamen Haiwell Technology Co.,Ltd.
12 / 12