IOMOD88 User Manual Modbus v1.4

Introduction

IOMOD 8DI8DO is a compact size stand-alone Modbus (RTU) or IEC 60870-5-103 digital input and digital output controller. IOMOD is used for industrial applications, where digital signaling is used and robust communication is needed. IOMOD is ideal solution for applications such as data acquisition, observation, control, process monitoring, testing and measurement at remote places.  It is controlled over Modbus or IEC 60870-5-103 protocol, and can be used with any SCADA system.

Features

Device operational information

IOMOD 8DI8DO uses Modbus (RTU) or IEC 60870-5-103 protocol  over RS485 interface. Protocol used by device can be changed by uploading corresponding firmware. Default communication settings are: 9600 baudrate, 8N1, Slave address - 1.

MODBUS operational information

To read output status, send 01 Modbus command (Read Coils) with resolution of first register (0), and size of 8. Returned value will show all 8 output states (1 - turned On, 0 - turned Off).

To read input status, send 02 Modbus command (Read Discrete Inputs) with resolution of first register (0) and size of 8. Returned value will show 8 input states.

To read input counter values, send 04 Modbus command (Read Input Registers) or 03 Modbus command (Read Holding Registers) with resolution of first register (0) and size of 24. Returned data will show pulse count (first register) and ON time (2nd and 3rd registers) for each input – pulse count of input #2 will be at register 4th, and so on. ON time will be shown as seconds. ON time and pulse count will increase when input pulse is longer than Filter time, which is configured by user in USB terminal menu. Shorter pulses will be ignored in both pulse and ON time registers. From software version 1.10, as capacity of input counter expanded to 32-bits, additional 16 registers depict such wider values in registers 00023-00039.

These input counter values can be changed by using 06 Modbus command.

To turn single output on or off, send command 05 (Write Single Coil), with output address (0 to 7). To turn output on – send hex value FF00; to turn off – hex value 0000.

To turn multiple outputs on or off, use command 15 (Write Multiple Coils), and send binary coded value for 8 coils at address (0) and length 8.

To invert input states by software, or to use pull-up resistors on inputs, configure device over USB terminal. Useable Modbus commands shown in table below.

Supported MODBUS functions

01 (0x01) Read Coil Status 
Reads status of relays (Off or On). IOMOD 8DI8DO has 8 digital outputs from address 0 to address 7.

02 (0x02) Read Discrete Inputs
Reads status of digital inputs (Off or On). IOMOD 8DI8DO has 8 digital inputs from address 0 to address 7; These inputs are active-high by default; user can turn on pull-up resistors (through USB) to these inputs to make them active-low.

03 (0x03) Read Holding Registers
Lets user read counter/timer values dedicated to digital inputs. There are 40 MODBUS registers. Values held in these registers are explained in a table below. There are two types of values - Pulse Counter and On Timer, the latter calculating the time that respective input was held in its active state.

04 (0x04) Read Input Registers 
Lets user read counter/timer values dedicated to digital inputs. There are 80 MODBUS registers. Values held in these registers are explained in a table below. There are two types of values - Pulse Counter and On Timer, the latter calculating the time in seconds that respective input was held in its active state. This function is deprecated and mirrors function 0x03 to conform to past versions of IOMOD 16DI.

05 (0x05) Write Single Coil  
Sets single digital output On or Off. Output addresses from 0 to 7 (first output – address 0, last output – address 7).

06 (0x06) Preset Single Register
Sets single register. Register addresses is identical to “Read Input Registers” addresses.

15 (0x0F) Write Multiple Coils 
Sets multiple digital output On or Off. Output addresses from 0 to 7 (first output – address 0, last output – address 7).

Modbus register mapping table

Register Description Value range
  Read coil status (01)  
00000-00007 Reading digital outputs DO1-DO8

0-255

  Read discrete inputs (02)  
00000-00007 Reading digital inputs DI1-DI8

0-255

  Read holding register (03), Read input register (04), Preset Single Register (06)  
00000 Pulse count for DI1, Least Significant Word

0-65535

00001-00002 On time, in seconds, for DI1, Least Significant Word first* 0-65535
... ... ...
00021 Pulse count for DI8, Least Significant Word 0-65535
00022-00023 On time, in seconds, for DI8, Least Significant Word first* 0-65535
00024-00039 Pulse count for DI1-DI8, Least Significant Word first* 0-65535
  Write single coil (05)  
00000-00007 Writing digital outputs DO1-DO8 0x0000 / 0xFF00
  Write multiple coils (15)  
00000-00007 Writing multiple digital outputs DO1-DO8 0-255

*It is advised to set most significant word of counter/timer first

IEC 60870-5-103 operational information

IOMOD uses standard communication scheme. Initiation, control messages and queries are initiated by master (controlling station), while IOMOD device (controlled station) only answers requests and statuses. First message sent by master is RESET CU to restart communication. When device answers with ACK, master proceeds with acquiring General Interrogation and sending time synchronization.

When this initialization is complete, master polls IOMOD device with class 1 and class 2 requests. Class 2 is used when master polls for cyclic data. Controlled device responds when spontaneous data exists and master then sends request for Class 1. Controlled station responds with time tagged message.

To control device outputs, master (controlling station) sends command (ASDU type – 20; Cause of Transmission – 20;). Info number represents number of output pin, while info elements shows DPI information of output state ( 1 – off, 2 – on, 0 and 3 – not used (define error)).

When input status changes, device filters input glitches with user configurable filter time. When filter is passed device sends “spontaneous” message with “Function type” as input address (default function type of inputs – 160), and “Info number” as input pin number.

IEC 60870-5-103 telegram description

To initialize communication Master (controlling station) sends “Link Reset CU” or “Link Reset FCB” commands, which is function code “0” or “7” within fixed frame telegram.
Example: | 0x10 | 0x40 | 0x01 | 0x41 | 0x16 |

Device (controlled station) responds with ACK.

Master, requesting Link status must send fixed frame telegram with function code “9”. Device then responds with “Access Demand” (function code “11”).

On first “Class 1” request, device will send its identification string. If there is spontaneous messages to send, they will be sent first.

Master, initiating time synchronization, must send variable frame, with function code “User data with ACK” , ASDU type “6” and Cause of Transmission “8”. Info elements must contain 7-byte time structure.

GI is initiated by master with variable frame, including function code “3” (User data with ACK) , ASDU type “7” and Cause of Transmission “9”. Slave device then responds with ACK. Master gets GI data by polling with Class 2 request till slave transmits “End of GI” (Cause of Transmission – “10”). IOMOD device responds with time tagged message, including DPI states of inputs and outputs (Outputs is sent first). Output and input numbers is represented by “Info number” in protocol.

To control IOMOD outputs, controlling station sends variable frame, with function code “User data with ACK” , ASDU type “20” and Cause of Transmission “20”. Info Number shows output pin number whilst info elements shows DPI information of output state ( 1 – off, 2 – on, 0 and 3 – not used (define error)). Slave device then responds with ACK and confirms changed state when master sends Class 2 request. Output numbers is represented by “Info number” in protocol.

Device configuration for IEC-60870-103-5

When active low signaling is needed, user can configure input polarity. When internal pull-up resistors are turned on, all input statuses are turned on. When low signal is connected to input, status of that input is turned off. If user desires to turn input status on, when that input signal is low, user then does logic inversion. All input indication LEDs stay the same (are not inverted).

Sometimes two inputs or two outputs must be captured as one DPI input or output. Inputs and outputs can be grouped into pairs of two. This allows outputs to be controlled by one DPI command (of address of first output in the group). Only two neighboring pins can be grouped into pair, while first pin in pair must be odd number pin. When grouped, second pin in the pair is not used anymore – all approaches to this pin generate an error. For example – OUT1 and OUT2 can be grouped, after that OUT2 is not used; OUT2 and OUT3 cannot be grouped; OUT3 and OUT4 can be grouped, but OUT4 then is not used, etc.

Fig. 3.1 shows outputs and inputs ungrouped and controlled independently. In this mode, General Interrogation will be composed of 8 output states and 8 input states.

image-1623932210349.png

Fig. 3.1

In addition to this, Fig. 3.2 shows first two outputs grouped into pair, while 3rd and 4th inputs are grouped into pair. Now, General interrogation will be composed of 7 output states (with OUT2 missing), and 7 input states (with IN4 missing). Output and input numbers is represented by “Info number” in protocol.

image-1623932251535.png

Fig. 3.2

Input filter is simple glitch filter with time input. This filter time corresponds to stable time that input must achieve before sending status change.

User can configure outputs to be pulse controlled – it means that output will be turned on for configured amount of time. When this time runs out, output is turned off. This is useful when pulse toggle relays are used. Output pulse is independent from output grouping option and can be used on both grouped and ungrouped outputs. When output is grouped, device will allow only one command completion at a time – when output is already turned ON, other “turn ON” requests will be responded with NACK. If user desires latching outputs to be used, output pulse time is set to 0.

Fig. 3.3 shows example of pulse output usage. In this example inputs and outputs are grouped, and output pulse time is set to 1s. When user sends ON command, OUT2 is pulsed for 1s, and relay is set. This will connect NO contact and IN2 will turn on (assuming it is not inverted). When user sends OFF command, OUT1 is pulsed, and relay is reset, turning IN1 on.

image-1623932295416.png

Fig. 3.3

User can detect output change with inputs (example shown in Fig. 3.4).

image-1623932324565.png

Fig. 3.4

To be informed when relays are turned on, user can connect relay outputs to IOMOD inputs (maximum allowed voltage must be taken into account). When relays are turned on, device responds with IEC-60870-5-103 protocol message “Remote Operation”. If inputs are never turned on or off, device will send “Remote Operation” message after time-out period, with current input statuses. Time-out period is configured by user.

Devices Output, Input and Output feedback addresses are configurable. These addresses in IEC-60870-5-103 protocol are considered as “Function Type”. Output address and Output feedback address are 128 by default. Input address is 160 by default.

Device is addressed by “Link address”, which is 1 by default.

Testing With “THE VINCI” software

To test IOMOD with default settings for Modbus, user connects device through RS485 to Modbus master. Example using “The Vinci Expert” device as serial interface converter and adapter to PC with “The Vinci” software. Default settings for Modbus – 9600 baudrate; 8 data, no parity, 1 stop bit. When opening “The Vinci” software, choose Modbus serial – Master mode. In settings tab, choose station number (default – 1); configure tags (as described in section 3.A. Modbus working information); Press start and go to “Statistic” tab:

image-1623932363054.png

Fig. 3.1. Statistic Tab in “The Vinci” software

To test IOMOD with default settings, user connects device through RS485 to IEC 60870-5-103 master. Example using “The Vinci Expert” as serial interface converter and adapter to PC with “The Vinci” software. When opening “The Vinci” software, choose IEC 60870-5-103 – Master mode. Initial settings – 9600 baudrate; 8 data, no parity, 1 stop bit. Press start, send time synchronization, General interrogation and go to “Statistic” tab:

image-1623932386558.pngFig. 3.5

As seen in Fig. 3.5, Outputs and inputs are shown with info numbers 1-8, and function type is 128 and 160 respectively.

GI, time synchronization and general command options can be found at right side of the program, in “System” tab.

Output commands are controlled by “General command” window at right side of the program, in “System” tab, with Output address (Function type) 128, and output number (Info number). Fig. 3.6 shows 1st and 6th output command sent and “CMD ACK” response received.

Fig. 3.7 shows first 4 Outputs and last 4 Inputs grouped (notice order of info numbers).

image-1623932426174.png

Fig. 3.6

image-1623932454950.pngFig. 3.7

Technical information

  System  
1. Dimensions 101 x 119 x 17.5, mm
2. Case ABS, black
3. Working environment Indoors
4. Working temperature

-30 ⎟ +70°C

5. Recommended operating conditions 5 – 60°C and 20 – 80%RH;
6. Configuration USB
7. Firmware upgrade USB – mass storage device
  Electrical specifications  
8. Inputs 8 X 2kV isolated 12-24VDC;
Selectable inversion.
9. Outputs 8 X 2kV isolated open collector outputs (300mA each, Max 50V);
  Power  
10. Power Supply 9V to 33V
11. Current consumption

38mA @ 12VDC, 20mA @ 24VDC

 

Mounting and installation guide

IOMOD 8DI8DO RS485 interface

IOMOD 8DI8DO has integrated 120Ω termination resistor which can be enabled or disabled over USB configuration. It is recommended to use termination at each end of the RS485 cable. See typical connection diagram on Fig. 5.1.

image-1623932730266.pngFig. 5.1. Connection example of RS485 interface

IOMOD 8DI8DO has 1/8 Unit load receiver which allows to have up to 256 units on line (compared to standard 32 units). To reduce reflections, keep the stubs (cable distance from main RS485 bus line) as short as possible when connecting device.

IOMOD 8DI8DO inputs

Typical application of IOMOD 8DI8DO inputs is shown on Fig. 5.2. When default configuration for inputs is applied, user will see inputs connected to +12/24V as “high” or state “1” and input status LED will glow.