Professional Documents
Culture Documents
The controller of the series "iGreenhouse - small controller v3.1" has advanced features, and for their
full use it is necessary to make the appropriate settings using the settings utility. The configuration
utility must be installed from the installation package file, which you can download from the
repository at https://www.iteplica.ru/downloads.php. The file is named Config_xxx.zip (always
choose the highest numbered file).
After starting the application, you will see the main window, as shown in the figure below:
Hardware ID1, Hardware ID2, Hardware ID3 - unique numbers of controller identifiers. To read
them, you need to connect to the controller via a mini-USB cable and click the [Read from PLC
hardware ID number] button.
[Apply license] - button for entering a license. The controller comes with an activated license, but if
the firmware is replaced, the license is lost. Each controller in the delivery set has a unique serial
number that must be entered in this window to reactivate the license. After pressing the [Apply
license] button, it is necessary to restart the controller by pressing the Reset button or reconnecting
the general power supply. After that, the license will be activated.
Modbus master option - when activated, the program switches the corresponding
UART1 or UART2 to the modbus RTU network master mode.
Modbus slave option - when activated, the program switches the corresponding
UART1 or UART2 to the slave mode of the modbus RTU network.
Option Not use - when activated, the program deactivates the corresponding UART1
or UART2.
Speed setting - here you can select the speed of data exchange in the form of a drop-
down list. The following values are supported:
9600,19200,38400,57600,115200,187500,256000,500000 kbps.
Parity setting - here you can select parity values. The following values are supported:
Odd, Even, None.
[Upload from PLC] - reading the current configuration from the controller. After
pressing this button, the program will fully read the configuration of the corresponding
UART1 or UART2 and, according to the settings, will change the appearance of the tab.
Important! When the controller is shipped or immediately after a software update, UART1 is
configured as a slave with address 1 and baud rate 115200, no parity, 8 bits, 1 stop bit. UART2 is
configured as slave with address 2 and baud rate 115200, no parity, 8 bits, 1 stop bit. That is, you
can immediately use the ports of data exchange without any configuration.
In the wizard mode, you will be shown a window as in the picture below:
Purpose of controls:
[Add slave] - used to add and configure a data request by the master.
[Modify slave] - used to modify and customize an existing data request by the master. To edit, you
need to select the required line and click on this button. A dialog will open that will contain all the
data for editing.
Address - the address of the slave for which this master's request is addressed.
Address slave - the address of a word or bit in the slave address space, from which the master starts
reading or writing.
Address master - the address of a word or bit in the master's address space, from which the master
starts reading or writing.
Function - modbus RTU function. Supports writing or reading bits from the M0-M3072 area, writing
or reading words from the D0-D8000 area. In the case of using a device other than our controller,
respectively, you can work with 3072 bits of coils and 8000 storage registers.
Timeout [ms] - time during which the master will wait for a response from the slave. The time is
considered by the controller from the beginning of the request, that is, the timeout takes into
account the duration of the request itself.
To start configuring in master mode, you need to activate the Modbus master control by simply
right-clicking on the control. You will also be shown a configuration table. To add a master request,
click on the Add slave button, and you will see the following pop-up window:
Purpose of controls:
Slave number – slave number in the configuration.Changes
automatically.
Slave modbus address - slave address in the modbus RTU
network.
Function type - modbus RTU function type. Can take values:
Read coils, Read holding register, Write multiply register,
Write coils.
Word / Coil number to read / write –slave part - number of
registers or binary values to read from the slave or write to
the slave.
Slave address point start read / write - address in the memory
area of registers or binary values for reading or writing. The
address belongs to the slave.
Master address to place Word / Coil fro slave - address in the
memory area of registers or binary values for reading or writing.
The address belongs to the master.
Timeout [ms] - time to wait for a response from the slave. At this time, the query itself is also
included.
SGH Technology, https://www.iteplica.ru support e-mail: support@iteplica.ru Page 4
SGH Technology
Controller i Greenhouse - small controller v 3.1
This picture shows the following configuration - slave address 3, 100 registers will be read from it,
starting from address 0 and placed in the master register block with offset 0 and with a timeout of
100ms.
All addresses are double checked to avoid loading incorrect values into the controller. And so there
are limits for values:
Slave with address 79, write binary data (coils) into it, the
number of 200, start writing from address 50 in the slave,
read the data from the master's register block from address
25, wait for a response from the slave within 400 ms.
Speed and parity are set here in the same way as in the master mode.
The only difference is that in the MB address field, you can set the slave address in the modbus RTU
network for the corresponding UART1 or UART2 port. To activate the slave mode after loading the
configuration into the controller memory, it is necessary to restart the controller using the Reset
button or by reconnecting the main power supply.
In this controller, holding registers with addresses 0-8000 correspond to general-purpose registers of
the D0-D8000 controller, the general-purpose marker area of the M0-M3071 controller corresponds
to coils 0-3071. All of these areas support both reading and writing of values. Also, these data areas
in the controller are permanently stored in an independent RAM memory, supported by a battery
backup. Access to the system values area D8000 - D8125 and M8000-M8255 is not supported.
Purpose of controls:
1-wire master - designed to activate the 1-wire network master mode. Not use - designed to
deactivate the 1-wire network master mode.
[Write to PLC] - button for activating the configuration writing mode into the controller's non-
volatile memory. If you enable the wizard mode, then to activate you will need to restart the
controller by pressing the Reset button or reconnecting the main power supply.
[Upload from PLC] - button for receiving the current configuration from the controller's non-volatile
memory.
Purpose of controls:
[Search slave] - button for activating the search mode for connected sensors of 1-wire network.
Finding sensors is currently the fastest and most accurate way to prepare a configuration.
To start configuring in master mode, you need to activate the 1-wire master control by simply right-
clicking (right mouse button) of the mouse in the control. You will also be shown a configuration
table. Further, by clicking on the [Add slave] button, you activate the data entry window, which is
shown in the figure below.
The [Modify slave] button is intended for manual data editing. To edit you need to highlight the
required line and click on this button. A dialog will open that will contain all the data for editing.
Picture below:
The [Search slave] button is designed to activate the 1-wire network sensors search mode. After
clicking it, the sensor search window will be activated, which is shown below:
Number sensor on the bus - the number of sensors determined by the search algorithm.
Start address for automatic slave addition in the main - starting address for automatically increasing
the address of data recording from sensors. The memory area of the registers D0-D8000 is used as a
SGH Technology, https://www.iteplica.ru support e-mail: support@iteplica.ru Page 10
SGH Technology
Controller i Greenhouse - small controller v 3.1
memory area. We strongly recommend using only even values here, for example 100, 102, 1040,
etc.
[Replace all in the table] - the button for deleting the old sensor configuration and writing the newly
found sensors to the configuration.
Important! To carry out the correct search operation, you must activate the wizard mode in
advance. Otherwise, the search algorithm will give you all zero values and show that one sensor was
found. This error situation is shown in the figure below:
Correct activation of the mode is performed by selecting the 1-wire master option using the LMB of
the mouse. After that, press the [Write to PLC] button. Upon completion of the download, for
activation, you must restart the controller by pressing the Reset button or reconnecting the main
power supply. The result of a correctly conducted search is shown in the picture below. Here the
addresses of 2 temperature sensors are correctly defined.
By clicking on the [Replace all in the table] button you can clear the current configuration and use
only those sensors that you found using the search procedure.
By clicking on the [Add new in the table] button you can add the found sensors to your existing
configuration.
Clicking the [Close] button closes the window without any configuration
The figure below shows a window with a configuration of 2 sensors, which were added as a result of
the sensor search procedure
Further, after completing the sensor search procedure, it is necessary to write the configuration to the
controller. To do this, click the [Write to PLC] button. The program will show the operation
confirmation window as shown below.
After pressing the [OK] button, the configuration is written to the controller. Upon completion of
the download, for activation, you must restart the controller by pressing the Reset button or
reconnecting the main power supply.
The next tab is the page for diagnostics of the UART1 and UART2 communication blocks. General
view is shown in the figure below:
Diagnostics works when the communication unit is configured to act as a modbus RTU master and
has at least a minimal operating configuration. To read the status, press the corresponding button -
SGH Technology, https://www.iteplica.ru support e-mail: support@iteplica.ru Page 13
SGH Technology
Controller i Greenhouse - small controller v 3.1
for the UART1 data exchange module - [Read modbus buffer 1], for the UART2 data exchange
module - [Read modbus buffer 2].
The picture below shows an example of how the diagnostic unit works - UART1 is configured as a
master with 8 exchange slots, UART2 works as a slave. At the same time, no slave answers.
The figure below shows the diagnostic module window with 8 slaves running
To read the status, the communication block must be active and have at least a minimum sensor
configuration. The appearance after opening the tab is shown in the figure.
To read the state of the data exchange block, press the [Read 1-wire buffer] button. After reading the
data from the controller, you will be shown it
state.
In case of a successful exchange for 2 sensors, the following picture will be shown:
If there is no response from the sensors, you will be shown the following picture:
The next bookmark is a converter for converting floating point numbers. The fact is that if it is
necessary to set a constant for a controller, we use a number in hexadecimal format as a floating
point number, but with a display in the IEEE754 standard. To convert a floating point number to the
IEEE754 standard and back, enter the number into the window and click on the [To IEEE] button.
Below is an example of converting 23.5 to 41BC0000 in the IEEE754 standard and vice versa.
The default decimal separator is point, but you can also use a comma.
[To IEEE] button converts from floating point format, [To float] button converts to floating point
format. Below is an example of use - in this case, a block for comparing sensor data taking into
account the dead zone.
Y0 PA7
Y1 PB0
Y2 PB1
Y3 PB11
Y4 PA0
Y5 PA4
Y6 PA5
Y7 PA6
X0 PA15
X1 PB3
X2 PB4
X3 PB5
X4 PB9
X5 PB8
X6 PB7
X7 PB6
UART1 RX -PA10 TX -PA9
DE(RS485) -PA8
You can find firmware updates, as well as additional materials on our support forum for this product
- https://iteplica.ru/forum/viewforum.php?f=7
https://sudonull.com/post/10562-Blue-pill-blue-tablet-STM32F103-as-a-PLC