USER GUIDE FOR MODBUS REMOTE IO MODULE STHM-MBIO

STHM-MBIO-MN-EN-01 

JUN-2020

This document is applied for the following products

SKU STHM-MBIO HW Ver. 1.0 FW Ver. 1.0
Item Code

STHM-MBIO-4AI4DI4RL-NR RS485/ModbusRTU Remote I/O Module, 4AI/DI, 4DI, 4xRelay, 1xPulse Output, Non-ROHS
   

1. Functions Change Log

HW Ver. FW Ver. Release Date Functions Change
1.0 1.0 JUN-2020

 

     

 

2. Introduction

STHM-MBIO is Modbus RTU Remote IO Module to help PLC/SCADA/BMS and any IoTs gateway extend the number of I/O capabilities. STHM-MBIO has a simple but powerful design with 4 AI/DI, 4 DI, 4 Relay, 1 Pulse PWM output, 1 RS485 Master ModbusRTU and 2 RS485 Slave ModbusRTU allow them to connect to more devices such as sensors, meters, … directly and easily. The module with advanced technology provide high stability and reliability, multiple functions and easy installation with DIN rail design. The module can be used in many applications such as machine monitoring, manufacture monitoring, environmental monitoring, smart farms, etc.

STHM-MBIO-H1.png

3. Specification

Digital Inputs 04 x Ports, opto-coupler, 4.7 kohms input resisrtance, 5000V rms isolation, Logic 0 (0-1VDC), Logic 1 (5-24VDC), Functions: logic status 0/1 or Pulse counting (32 bit counter with max 4kHz pulse)
Analog Inputs 04 x Ports, select between 0-10VDC input or 0-20mA input, 12 bit Resolution, can be configured as Digital input by DIP switch (max 10VDC input)
Relay Output 04 x Ports, electro-mechanical Relays, SPDT, contact rating 24VDC/2A or 250VAC/5A, LED indicators, Latch control enable
Pulse Output 01 x Ports, open-collector, opto-isolation, max 10mA and 80VDC, On/off control, Pulser (max 2.5Khz, max 65535 Pulses) or PWM (max 2.5Khz)
Communication 02 x ModbusRTU-Slave, 01 x ModbusRTU-Master, RS485, speed 9600 or 19200, LED indicator
Reset button For resetting 02 x RS485 Slave port to default setting (9600, None parity, 8 bit)
Power supply 9..36VDC
Consumption 80mA @ 24VDC supply
Mounting type DIN rail
Terminal Block pitch 5.0mm, rating 300VAC, wire size 12-24AWG
Working temperature/humidity 0..60 degC / 95%RH non-condensing
Dimension H87xW117xD42
Net weight 80 grams

4. Applications

STHM-MBIO-H1.png STHM-MBIO-H2.png
STHM-MBIO-H3.png STHM-MBIO-H4.png
STHM-MBIO-H5.png STHM-MBIO-H6.png

5. Operation Principle

STHM-MBIO-H7.png

5.1 Modbus communication

image-1591342596596.png

02 x RS485/ModbusRTU-Slave

Protocol: Modbus RTU

Address: 1 - 247, 0 is the Broadcast address

Baud rate: 9600 , 19200

Parity: none, odd, even

Default configuration: Address: 1, Baudrate slave 1: 9600, Parity slave 1: none, Baudrate slave 2: 9600, Parity slave 2: none

Status indicator LED:

  • Led on: modbus communication OK
  • Led blinking: received data but modbus communication incorrect, due to wrong Modbus configuration: address, baudrate
  • Led off: STHM-MBIO received no data, check the connection
Memmap resgisters

READ uses command 03, WRITE uses command 16

Modbus
Register
#Registers Description Range Default Format Length Properties Comments
0 1 Analog value AI1 0-4095   int16 2 Read  
1 1 Analog value AI2 0-4095   int16 2 Read  
2 1 Analog value AI3 0-4095   int16 2 Read  
3 1 Analog value AI4 0-4095   int16 2 Read  
4 1 Digital status DI1 0-1   int16 2 Read  
5 1 Digital status DI2 0-1   int16 2 Read  
6 1 Digital status DI3 0-1   int16 2 Read  
7 1 Digital status DI4 0-1   int16 2 Read  
8 1 Digital status AI1 0-1   int16 2 Read  
9 1 Digital status AI2 0-1   int16 2 Read  
10 1 Digital status AI3 0-1   int16 2 Read  
11 1 Digital status AI4 0-1   int16 2 Read  
12 1 Setting Status 0-1   uint16 2 Read 0: From Eeprom, 1: Setting Default
13 1 Eeprom Error Count     uint16 2 Read  
14 1 Hardware Version   11 uint16 2 Read  
15 1 Firmware Version   21 uint16 2 Read  
256 1 Address of slave 1-247 1 int16 2 Read/Write  
257 1 Baudrate 0-1 0 int16 2 Read/Write 0: 9600, 1: 19200
258 1 Parity 0-2 0 int16 2 Read/Write 0: none, 1: odd, 2: even
259 1 Default Relay 1 0-1 0 int16 2 Read/Write 0: off, 1: on
260 1 Default Relay 2 0-1 0 int16 2 Read/Write 0: off, 1: on
261 1 Default Relay 3 0-1 0 int16 2 Read/Write 0: off, 1: on
262 1 Latch Relay 1 0-1 0 int16 2 Read/Write 0: reset default, 1: latch
263 1 Latch Relay 2 0-1 0 int16 2 Read/Write 0: reset default, 1: latch
264 1 Latch Relay 3 0-1 0 int16 2 Read/Write 0: reset default, 1: latch
265 1 Relay 1 0-1 0 int16 2 Read/Write 0: off, 1: on
266 1 Relay 2 0-1 0 int16 2 Read/Write 0: off, 1: on
267 1 Relay 3 0-1 0 int16 2 Read/Write 0: off, 1: on
268 1 Open-collector 0-3 0 int16 2 Read/Write 0: off, 1: on, 2: PWM, 3: phát xung
269 1 Time On 0-65535 0 uint16 2 Read/Write x0.1ms
270 1 Time Cycle 0-65535 0 uint16 2 Read/Write x0.1ms
271 1 Pulse Number 0-65535 0 uint16 2 Read/Write  
272 1 Pulse Start 0-1 0 int16 2 Read/Write 0: stop, 1: start
273 2 Counter DI1 0-4294967295 0 uint32 4 Read/Write  
275 2 Counter DI2 0-4294967295 0 uint32 4 Read/Write  
277 2 Counter DI3 0-4294967295 0 uint32 4 Read/Write  
279 2 Counter DI4 0-4294967295 0 uint32 4 Read/Write  
281 1 Set status 0 for AI1   500 int16 2 Read/Write  
282 1 Set status 1 for AI1   1800 int16 2 Read/Write  
283 1 Set status 0 for AI2   500 int16 2 Read/Write  
284 1 Set status 1 for AI2   1800 int16 2 Read/Write  
285 1 Set status 0 for AI3   500 int16 2 Read/Write  
286 1 Set status 1 for AI3   1800 int16 2 Read/Write  
287 1 Set status 0 for AI4   500 int16 2 Read/Write  
288 1 Set status 1 for AI4   1800 int16 2 Read/Write  
289 6 Serial Number   ddmm2016seri string 12 Read/Write  
295 1 Time min logic 0 Counter 1 0-65535 500 uint16 2 Read/Write x0.1ms, default 10Hz
296 1 Time min logic 1 Counter 1 0-65535 500 uint16 2 Read/Write x0.1ms
297 1 Time min logic 0 Counter 2 0-65535 500 uint16 2 Read/Write x0.1ms
298 1 Time min logic 1 Counter 2 0-65535 500 uint16 2 Read/Write x0.1ms
299 1 Time min logic 0 Counter 3 0-65535 500 uint16 2 Read/Write x0.1ms
300 1 Time min logic 1 Counter 3 0-65535 500 uint16 2 Read/Write x0.1ms
301 1 Time min logic 0 Counter 4 0-65535 500 uint16 2 Read/Write x0.1ms
302 1 Time min logic 1 Counter 4 0-65535 500 uint16 2 Read/Write x0.1ms

5.2 Reset Button

When holding the reset button for 4 seconds, STHM-MBIO will reset the default configuration to 02 x RS485 / Modbus RTU-Slave.

Default Modbus RTU Configuration:

  • Address: 1
  • Baud Rate: 9600
  • Parity: none

5.3 Digital Input

image-1591342634783.png

Specification:

  • 04 channels DI, isolated
  • Input Resistance: 4.7 kΏ
  • Isolation Voltage: 5000Vrms
  • Logic level 0: 0-1V
  • Logic level 1: 5-24V
  • Function:
    • Read logic 0/1
    • Pulse Counter

5.3.1 Read the logical state 0/1

Logic value in Modbus Memory Map: 0-1

Registers to store logic values in the Modbus Memory Map:

  • DI1__DI2: digital status: stores the logical state of channel 1 and channel 2.
    • H_byte: DI1
    • L_byte: DI2
  • DI3__DI4: digital status: store the logical state of channel 3 and channel 4.
    • H_byte: DI3
    • L_byte: DI4

5.3.2 Pulse Counter

Counter value in Modbus Memory Map, when adding the number exceeds the threshold, it will automatically return: 0 - 4294967295 (32bits)

The register that stores Counter value in the Modbus Memory Map cannot be erased:

  • Counter DI1: stores the logic state of channel 1
  • Counter DI2: stores the logic state of channel 2
  • Counter DI3: store the logic state of channel 3
  • Counter DI4: stores the logic state of channel 4

The register that stores Counter value in the Modbus Memory Map cannot be erased:

  • None reset counter DI1: stores the logic state of channel 1
  • None reset counter DI2: stores the logic state of channel 2
  • None reset counter DI3: stores the logic state of channel 3
  • None reset counter DI4: stores the logic state of channel 4

Pulse Counter Mode:

Low-speed pulse count less than 10Hz with filter, anti-jamming:

  • Set register "counter DI1: filter time" = 500-2000: Channel 1 counts pulses less than 10Hz
  • Set register "counter DI2: filter time" = 500-2000: Channel 2 counts pulses less than 10Hz
  • Set register "counter DI3: filter time" = 500-2000: Channel 3 counts pulses less than 10Hz
  • Set register "counter DI4: filter time" = 500-2000: Channel 4 counts pulses less than 10Hz

High-speed pulse count with max 2KHz frequency without filter:

  • Set register "counter DI1: filter time" = 1: channel 1 counts pulses with Fmax = 2kHz
  • Set register "counter DI2: filter time" = 1: channel 2 counts pulses with Fmax = 2kHz
  • Set register "counter DI3: filter time" = 1: channel 3 counts pulses with Fmax = 2kHz
  • Set register "counter DI4: filter time" = 1: channel 4 counts pulses with Fmax = 2kHz

5.4 Analog Input

image-1591342412832.png

04 AI channels, no isolation

Use DIP SW to configure Analog input: 0-10V, 0-20mA

 

sw.png

Value Type of AI
0

0-10 V

1

0-20 mA

Input type:

  • Measure voltage: 0-10V
  • Measure current: 0-20mA
  • The configuration for AI reads the same logical state as DI, but it is not isolated with a pulse range of 0-24V

Input impedance:

  • Measure voltage: 320 kΏ
  • Measure the current: 499 Ώ

5.4.1 Read the Analog value

Resolution 12 bits

Non-Linearity: 0.1%

Analog value in Modbus Memory Map: 0-3900

Analog value register in the Modbus Memory Map:

  • AI1 analog value: store the Analog value of channel 1
  • AI2 analog value: stores the Analog value of channel 2
  • AI3 analog value: store the Analog value of channel 3
  • AI4 analog value: store the Analog value of channel 4

5.4.2 AI configuration works as DI

No isolation

AI Configure AI to read the same logic state as DI with pulse amplitude from 0-24V

There are 2 counter threshold AIx: logic threshold 0 and counter AIx: threshold logic 1 in the modbus table: 0-4095

  • Analog Analog value of AI <counter AIx: threshold logic 0: is considered Logic 0 status of AI
  • Analog Analog value of AI> counter AIx: threshold logic 1: is considered to be Logic 1 state of AI
  • Counter AIx: threshold logic 0 = <Analog value of AI <= counter AIx: threshold logic 1: is considered to be the constant logic state

Logic Logical status value of AI in Modbus Memory Map table: 0-1

The register stores logical values ​​in Modbus Memory Map:

  • AI1___AI2: digital status: stores the logical state of channel 1 and channel 2.
      • H_byte: AI1
      • L_byte: AI2
  • AI3___AI4: digital status: stores the logical state of channel 1 and channel 2.
      • H_byte: AI3
      • L_byte: AI4

5.4.3 Pulse Counter AI max 10Hz

Counter value in Modbus Memory Map, when adding the number beyond the threshold, it will automatically return: 0 - 4294967295 (32bits)

The register that stores Counter value in the Modbus Memory Map cannot be erased:

  • Counter AI1: stores the logic state of channel 1
  • Counter AI2: save logic state of channel 2
  • Counter AI3: save logic state of channel 3
  • Counter AI4: save logic state of channel 4

The register that stores Counter value in the Modbus Memory Map cannot be erased:

  • None reset counter AI1: stores the logic state of channel 1
  • None reset counter AI2: stores the logic state of channel 2
  • None reset counter AI3: stores the logic state of channel 3
  • None reset counter AI4: save logic state of channel 4

5.5 Relay

image-1591341815045.png

04 channel Relay SPDT NO / NC

Contact rating: 2A / 24VDC, 0.5A / 220VAC

There are status LEDs:

  • Led on: Close Contact
  • Led off: Open Contact

Set the "relay x" register in the Modbus Memory Map table to control Relay Close / Open Contact:

Relay Set Relay Register Status of relays
Channel 1

1 Close Contact
0 Open Contact
Channel 2

1 Close Contact
0 Open Contact
Channel 3

1 Close Contact
0 Open Contact
Channel 4

1 Close Contact
0 Open Contact

Relay has 2 modes: 

  • Latch Mode
  • Normal Mode

5.5.1 Latch Mode of Relay

The relay will remember the previous Close / Open Contact status, when resetting or losing power:

Relay Channel Relay Register Set Relay Register Description
Channel 1

relay default 1 2 Relay channel 1 remembers the previous Close / Open Contact status
0/1 Relay channel 1 status does not remember the Close / Open Contact
Channel 2

relay default 2 2 Relay channel 2 remembers the previous Close / Open Contact status
0/1 Relay channel 2 status does not remember the Close / Open Contact
Channel 3

relay default 3 2 Relay channel 3 remembers the previous Close / Open Contact status
0/1 Relay channel 3 status does not remember the Close / Open Contact
Channel 4

relay default 4 2 Relay channel 4 remembers the previous Close / Open Contact status
0/1 Relay channel 4 status does not remember the Close / Open Contact

5.5.2 Normal Mode of Relay

Relay operates normally, do not remember the status of Close / Open Contact when power reset or power failure. Relay status table when resetting the power as follows:

Register Default Relay Status of relays when resetting power
0 Open Contact
1 Close Contact
2 Remember the previous state (Latch mode)

5.6 Pulse Output

image-1591341459629.png

01 isolated open-collector channel

Opto-coupler: Source current Imax = 10mA, Vceo = 80V

Functions: On / Off, pulse generator, PWM

5.6.1 On/Off Function

Set the Open-collector register in the Modbus Memory Map table:

  • Set Open-collector register: 1 => Pulse Output ON
  • Set Open-collector register: 0 => Pulse Output OFF

5.6.2 Pulse generator

Pulse output transmits a maximum of 65535 pulses, with Fmax 2.5kHz

Configure the following registers in the Modbus Memory Map table:

  • Set register "open collector: pulse number": 0-65535 => Pulse Number = 65535: broadcast 65535 pulses
  • Set register "open collector: time cycle": (0-65535) x0.1ms => Time Cycle = 4: Fmax 2.5kHz
  • Set register "open collector: time on": (0-65535) x0.1ms => Time On: is the logic time 1 of the pulse
  • Set the register "open collector ctrl" = 3 => configure the Pulse Output to generate a pulse and start to pulse, generate a sufficient number of pulses in the "open collector: pulse number" register => stop pulse generator and register " open collector ctrl ”= 0

5.6.3 PWM

Max frequency 2.5kHz

Configure the following registers in the Modbus Memory Map table:

  • Set the register "open collector ctrl" = 2 => configure Pulse Output PWM function
  • Set register "open collector: time cycle": (0-65535) x0.1ms => Time Cycle = 4: Fmax 2.5kHz
  • Set register "open collector: time on": (0-65535) x0.1ms => Time On: is the logic time 1 of the pulse

6. Installation

Mounting type: DIN rail

DSC_0134.png

7. Troubleshooting

No. Phenomena Reason Solutions
1 Modbus failed to communicate

Modbus LED Status:

  • LED is off: received no data
  • LED is blinking: the Modbus configuration is not the correct 
  • Check the connection
  • Check the Modbus configuration: Address, Baud Rate, Parity
2 Timeout Modbus Noise appears on the line Configure Baudrate 9600 and use a twisted pair cable with anti-jamming protection

8. Support contacts

Manufacturer

Daviteq Technologies Inc

logo-01.png

No.11 Street 2G, Nam Hung Vuong Res., An Lac Ward, Binh Tan Dist., Ho Chi Minh City, Vietnam.
Tel: +84-28-6268.2523/4 (ext.122)

Email: info@daviteq.com | www.daviteq.com