Industry Solutions

Haiwell remote I/O expansion application

2016-11-17 10:40:16 Xiamen Haiwell Technology Co., Ltd. Read

With the continuous development of industrial technology, there are more requirements of remote I/O expansion application and it becomes more important. Especially of industries which are having lot of decentralized I/O signals (as for humidity, temperature, differential pressure, air volume, flow, fan speed, valve opening etc.), this application is very important for its data collection and monitoring. With this function distributed installation can be easily achieved without I/O expansion limitation, greatly enhancing the configuration flexibility of the control system and expansion capability that might be need in future, reduce lot of wiring and also avoid the interference problems caused by long distance transmission, save lot of costs for projects.

Haiwell PLC expansions have one built-in RS485 port, support Modbus protocol and can be used as a Modbus slave.

Address: 1-254 can be configured

Baud rate: 2400, 4800, 19200, 38400, 57600, 115200 (optional)

File format: N, 8, 2 RTU/ E, 8, 1 RTU/ O, 8, 1 RTU/ N, 8, 1 RTU/ E, 7, 1 ASCII/ O, 7, 1 ASCII/ N, 7, 2 ASCII (optional)

Descriptions:

1. All expansions have one built-in RS485, except the module of H04DT and the 8point analog expansions.
2. Modules without DIP: 16point digital modules, 4points analog modules and temperature modules. The DIP is used of addressing. Modules with external DIP will use the address which setup with the switch (Address range of 4 DIP is 1~15). When without DIP then you need to setup the address with software.

3. How to setup address/baud rate/file format for modules through software?
3.1 Hardware connection:  The module is with RS485 communication port and PC with serial port, can connect them with a 232 to 485 convertor. If it is a USB port, can use USB to 485 convertor.

3.2 Software operation:

1. Click “Tools - Remote module”in the software,choose  from the pop up window and open the “Online” window. Module default address is 1. 19200, B 8 2 RTU, a successful online connection will be like below:


Haiwell Industry Automation

Click Exit, and access to the windows of remote modules.

You can change the address/baud rate/file format/time of baud rate for modules from here.

Haiwell Industry Automation

Click  to download data after editing. Usually will use the default 19200 8 2, no need to change. Below are examples. 

Modules will use Modbus protocol, CR number is the related Modbus address in below table.

Haiwell Industry Automation

From above table we can see:

10H—4FH is the input value 1—64 of DI channel

 50H—8FH is the output value 1—64 of DO channel

 This is very important information. It means if we can get the input & output Modbus address from the upper monitor, then we can get the real IO status information.

For example

Example 1: Digital module H16XDR used as remote IO

Requirements: Through the communication with the remote IO module, PLC MPU need to get status of input X0-X7 and controls the corresponding output Y0-Y7.

Haiwell Industry Automation

Haiwell Industry Automation

 In the programming, MO is the input XO from module, and same manner for rest.

Status program of the output Y0-Y7 for H16XDR is like below:

Haiwell Industry Automation

 After downloading program to PLC, click online monitor and get below status.

Haiwell Industry Automation

 

 Above program can be same used with all digital modules which have communication port.

Example 2: Analog module S04AO used as remote IO

The configurations for module address/baud rate/file format are same as digital module. In this example we put module adress=2, baud rate=19200, file format=U 8 2 RTU. Also we need to know the corresponding Modbus address for each channel of analog modules, and you can get it from HaiwellHappy PLC online help. Below are some pictures for the info of S04AO Modbus address.

Haiwell Industry Automation

 

 

From above image we can see the corresponding Modbus for AQ0-AQ3 is 10H-13H, so when programming we only need to put value for these 4 channels. Program as below:

Haiwell Industry Automation

 

So, the read & write methods for other analog modules/thermocouple/thermal resistance will be same like this. As the program for reading the temperature value for the 8 channels of H08TC will be as below (address=3, baud rate=19200, file format= N 8 2RTU)

Haiwell Industry Automation

Example 3: Digital temperature H32DT used as remote IO                 

The configurations for module address/baud rate/file format are same as previous. In this example we put module address=4, baud rate=19200, file format=U 8 2 RTU.

Haiwell Industry Automation

From above image we can see the corresponding Modbus of 10H-1FH for Channel 1&2 are 20H-2FH, total value for 16 channels, so PLC programming for communication will be as belwo:

Haiwell Industry Automation

Summary: All Haiwell PLC MPUs support 2 communication ports (RS232+RS485) and can expand to maximum 5. Each communication port can use for programming and online connection, as well as host and slave. It supports 1:N / N:1 / N:N connection methods and all types of HMI and SCADA, can communicate with all third parties which have communication ability (Like 
Inverter, instrumentation, bar code reader etc)

Each communication port can connect with multiple remote I/O modules, greatly expand the I/O points of PLC and become more important on industrial automation applications.

Appendix:

1. Connection diagram of PLC MPU and modules

Haiwell Industry Automation

2. Connection diagram of PLC and module use as remote IO

Haiwell Industry Automation

3. When connect with upper monitors as SCADA/ HIM/ Text Display/ PLC, just to select Modbus protocol and you can do data collection and monitoring for modules.