Материал из Module developer
Перейти к: навигация, поиск
Эта страница является переводом страницы Modbus. Перевод выполнен на 100%.

Другие языки:
English • ‎русский • ‎中文(简体)‎

Updated 30.8.2018

How to use Modbus TCP module



Adding subdevices

Subdevice Type Description
Button - It's a button. When it is pressed, it turns on/off something
Multistate button - It's a button. When it is pressed, a drop down list appears with an option to select one variant (selector)
Relay Through Relay
Light
Fan Control
It's a switch. When it is pressed, something can be turned on/off and feedback is displayed.
Dimmer Through Dimmer
Light
It is a slider. It can be moved and feedback is displayed.
Display Through analog input
Temperature sensor
Luminosity sensor
Pressure sensor
Humidity sensor
Noise sensor
Rain sensor
Wind speed sensor
Motion sensor
Smoke sensor
Air pollution sensor
Visibility sensor
Current meter
Energy meter
Frequency meter
Voltage meter
CO2 sensor
It's an indicator to display a numeric value
Binary sensor Through Binary Input
Input Button
Input Switch
Contact
Motion detector
Smoke detector
Noise detector
Rain detector
Wind detector
Filling detector
Water leakage detector
Gas leakage detector
Glass break detector
Presence detector
Proximity detector
Vibration detector
Light detector
It's an indicator to display on/off state (lamp)
Text display Through analog input
Temperature sensor
Luminosity sensor
Pressure sensor
Humidity sensor
Noise sensor
Rain sensor
Wind speed sensor
Motion sensor
Smoke sensor
Air pollution sensor
Visibility sensor
Current meter
Energy meter
Frequency meter
Voltage meter
CO2 sensor
It's an item to enter text
Blinds - It's a two-button (open/close) or a three-button (open/close/stop)
item to control blinds.
Value input - It's an item to enter a numeric value
RGB color input Main light
Back light
It's an item to control a three-channel dimmer
Custom color
(color display)
Main light
Back light
It's an item to display color


Setting subdevices

General parameters

Parameter Valid values Description
Name Any text Name of subdevice for identification
Device ID 0-255 Device ID in Modbus TCP network
Type Coil
Holding register
Discrete Inputs
Input Register
Type of Modbus TCP data
Address 0-65535 Address of data location in the memory of Modbus TCP device
Word Size Word(16bit)
DWord(32bit)
Float(32bit)
Data size
(not specified for binary types of data Coil and Discrete Inputs)
Content Type Low Endian
Big Endian
Swapped Low Endian
Swapped Big Endian
The order of bytes in words and double words
(not specified for binary types of data Coil and Discrete Inputs)
Bit number 0-31 The ordinal number of a bit in a word or double word
(not specified for binary types of data Coil and Discrete Inputs)


Button

Parameter Valid values Description
Press Value Any number A number that is sent to a Modbus TCP device the moment a button is pressed
Release Value Any number A number that is sent to a Modbus TCP device the moment a button is released


Multistate button

Parameter Valid values Description
Active states 2-5 Number of states (variants in the list)
State 1 label Any text A text that is displayed for state 1
State 1 value Any number A value that is sent to a device when state 1 is selected
State 2 label Any text A text that is displayed for state 2
State 2 value Any number A value that is sent to a device when state 2 is selected
State 3 label Any text A text that is displayed for state 3
State 3 value Any number A value that is sent to a device when state 3 is selected
State 4 label Any text A text that is displayed for state 4
State 4 value Any number A value that is sent to a device when state 4 is selected
State 5 label Any text A text that is displayed for state 5
State 5 value Any number A value that is sent to a device when state 5 is selected


Relay

Parameter Valid values Description
On value (write) Any number A value that is sent to a device when the relay is switched to "on" position
Off value (write) Any number A value that is sent to a device when the relay is switched to "off" position
On value (read) Any number A value that must be received from a device when the relay is switched to "on" position
Off value (read) Any number A value that must be received from a device when the relay is switched to "off" position


Dimmer

Parameter Valid values Description
Min value Any number A value that corresponds to the utmost left position of the slider bar
Max Value Any number A value that corresponds to the utmost right position of the slider bar


Display and Value input

Parameter Valid values Description
Units Any text
(no more than 5 symbols)
Measuring units
Number after point Off, 0-9 The number of decimal places displayed after a point
Scale mode Off, On Turning on the scaling mode
InputMin Any integer number A value to which the minimal input value is corresponded
InputMax Any integer number A value to which the maximum input value is corresponded
OutputMin Any integer number A value to which the minimal output value is corresponded
OutputMax Any integer number A value to which the maximum output value is corresponded


Blinds

Parameter Valid values Description
Open Value Any number A value that is sent to a device when "Open" button is pressed
Close Value Any number A value that is sent to a device when "Close" button is pressed
Stop Value Any number A value that is sent to a device when "Stop" button is pressed


Importing subdevices from Microsoft Excel or Google Sheets


You can tune the module Modbus TCP in Microsoft Excel or Google Sheets fast using a template and then import the settings as a .csv-file to i3 lite project via the web-interface.

1 Open the template file in Microsoft Excel, Google Sheets or any other table processor.

2 Add a required number of channels.

Modbus csv template02.png

3 Add a required number of tags.

Modbus csv template03.png

4 Add a required number of subdevices.

Modbus csv template04.png

Headings of obligatory parameters of subdevices are hilighted orange. Headings of optional parameters are hilighted grey.

You can add a required number of rows to the template table.

You can delete unrequired rows and even tables (except the red "Separator" cell).

Do not change the contents of the colored cells (headings of tables).

You can import Modbus TCP settings to i3 lite, using a pro version of the table template. The formats of imported files are compatible.

5 Save the file of the set table in .csv format.

In Microsoft Excel:

Modbus csv template05.png

Then click OK in the dialogue window and then click No.

Modbus csv template11.png
Modbus csv template12.png

In Google Sheets

Modbus csv template06.png

6 Open i3 lite project, add "Modbus TCP" module in the Devices tab.

7 Press "+" to add a new subdevice.

8 Press "down arrow" to import a .csv-file.

Modbus csv template07.png

9 A message appears:

Modbus csv template08.png

10 Enter the IP address of a panel, a colon and "1090" port number in the address bar of a browser. Press "Enter".

Modbus csv template09.png

11 Drag'n'drop the.csv file from the conductor to the open web-page to the open web-page or select a file by pressing "Browse".

12 The previous message must disappear from i3 pro panel and new subdevices must appear in the "Modbus TCP" module.

Modbus csv template10.png

If devices are not specified correctly in the .csv-file they are ignored during addition.

If parameters are not specified correctly in the .csv-file, their values are changes by default ones.