HMI Modbus: User Manual v1.18
HMI Modbus: User Manual v1.18
Developed by Sagram.net
Contact: [email protected]
Contents
Other possible example of using this software – «Smart house» for monitoring and
setting parameters of the equipment.
https://play.google.com/store/apps/details?id=net.sagram.hmi_modbus
6
Fig 1. Start screen.
1. Create new project: creates new project with a new project name. If project
name already exists, no project will be created. Project name can consist latin
letters, numbers, “-“ and “_” symbols. Using any other symbol can lead to
project compatibility lost. By default, project with “default” name will be
created.
2. Load last project: loads most recent project, that was edited and saved by user.
3. Load project: loads project from a project list.
4. Delete project: delete project from a project list and on device.
5. Exit: Quits program.
6. “Load from” Switch: switches load path –
/data/data/net.sagram.hmi_modbus/databases or external path.
3.2 Main screen, element creating and editing
Touch “+” button placed on bottom right on main screen to add new element. In
order to change element collection, you need to swipe left or right on add element panel.
Main screen appearance with add element panel shown on fig 2.
Main menu
Ancillary panel
Switch
collection groups
Long tap on element on add element panel will add this element on editing screen.
Long tap on element, already placed on editing screen, allow to move this element.
In order to remove element from the screen, you need to move this element out of
screen borders.
Short tap on element will show floating menu, from where further element
settings can be made.
Floating menu consists of:
An attempt to establish connection will be made on “Start” button on the top of the
screen. In case of success, communication will start. To stop communication, press
“Stop” button. On communication start project will be saved with “auto_save” project
name. To restore damaged project from this save point, you need to get to the main
menu, load project named “auto_save” and save it with a new project name.
3.3 Main menu
After project creating or loading user gets to a main working screen. Pressing
“settings” button shows main menu, from where user can adjust following:
Navigation panel for managing working screens can be called by left-to-right slide
on left screen side or by pressing "≡" on upper-left corner of the screen.
By default, project have only one screen called “Screen#1”. In order to add screen
to project press “Add new screen” button – new screen dialog will be shown. To create
screen, press “+” button on upper right, and set a name for this screen. Screen editor is
shown on fig 3.
Add screen
Screen button
Change screen
order
Screen menu
To start group work with elements user should select required elements. To do this,
touch free area on editor screen, and, without press release, select elements you want to
work with. After selecting group of elements you can add (remove) element to selection
by short-tap on it. User can move selected element group by long-tap (if selected group
moves out screen border it will be deleted)
While group selection is idle, group operation panel is shown on top of the screen.
This panel allow user to perform following actions:
Group operations panel is shown on fig 4. This panel can be shown on screen by
pressing "˅" button. To hide this panel press "˄" button.
Copy Paste
Cut
When you move projects between devices with different screen resolutions may be
necessary to change the size of all the elements. For this purpose, the program includes a
scaling factor. By default, it is equal to 1. If the ratio is less than 1, all of the elements
will be proportionally reduced if the opposite - increased proportionally.
Scaling is not performed automatically when you transfer the project to a new
device.
4. Communication settings
Server list screen can be called from main menu or from floating element menu.
Two types of servers are supported on this moment: TCP/IP and Bluetooth. In
order to add a new server, press corresponding button on the screen. When adding TCP
server user must set following parameters: server name (optional), IP address
XXX.XXX.XXX.XXX format and communication port (usually 502 or 8000 in most
Modbus-TCP devices).
On adding Bluetooth devices user must choose device from the list of Bluetooth-
connected devices. In case on any problems on establishing Bluetooth-connection, try
connect through default Android Bluetooth interface. To refresh connected device list use
“Device scan” button.
If server list screen was called from floating element menu, then chosen server will
be applied to this element and user will be returned to main workspace.
5. Element description
The buttons and indicators are designed to input-output the bits data. It is also
possible to record in the register Int16 values.
Any indicator can be switched to the button setting the resolution: " Allow write
request" in the communication settings.
The buttons and indicators allow you to change the image of their states. To do
this, click on the "Set drawable ..." from the popup list. You can select images from the
preset program or load an image from disk (the image must be loaded for the "OFF" and
"ON", respectively).
1. None – no notification.
2. Off – notification will be show during "Off" state.
3. On – notification will be show during "On" state.
1. Read Coil Status 0x01 – it refers to the storage registers, are available writing
and reading.
2. Read Discrete Inputs 0x02 – It refers to the storage registers, are available
only reading.
This element is used to add text on the screen, display the numerical values of the
registers and change their values. If the item only as a text, then it does not specify the
server, and the item will not be participate in communication.
The element supports the following settings: size, color, text alignment, and
background color selection.
If an element is specified server (you can choose from the popup menu), it is
possible to set the parameters for communication.
Value for the notification is entered in the next menu item, are supported as the
whole and the real numbers.
To display the relative value is a "Progress bar", to enter the relative value of the
element, you can use a "Seekbar". These elements have the ability to set the vertical or
horizontal position, the choice of position is produced from the popup menu element.
Request type, function code and the notification similar to the element "numeric
input". Additionally, the communication settings set to the maximum value of the
progress display. The value is scaled from "0" to the specified value.
5.4 Chart
To display the value changes in real time provides an element "Chart".
In the setting of the chart: the text color matches the color graphics, text
background corresponds to the background graphics.
5.5 Image
To download your images on the screen you can use the element "Image". Loading
image is from the directory: Pictures / HMI_Modbus. The use of this element is not
recommended, instead of it is better to load the background of the screen image.
5.6 IP camera
The program provides the ability to view the IP camera picture. Currently
implemented only camera operation in "default" mode, camera mode support "native" is
not added. At the same time is only one element the "Camera" on the same screen. This
element in this version is under construction.
In the camera settings, you must specify the IP address and port of the server to
connect to the camera. You also need to specify the source video to determine the name
of the video source, you can use the method: https://github.com/niqdev/ipcam-view/wiki.
In the setting "Authorization", you can specify a username and password. If not
required, the data leave empty blank. Due to the lack of IP cameras for testing,
development of the suspended element.
The username and password are stored in an SQL file without encryption, as plain
text.
To start the communication, press the button "► Run" on the upper applications
toolbar. At the start of the communication all buttons will be set to "Off".
Communications speed depends on the total number of elements and settings "Delay
between requests" in the main menu, "Global Settings".
To see the current status of the communication, press the button "˅" under the top
panel. This opens the auxiliary panel. It contains the following items:
1. There are no active requests – did not match any item with a full set of
communication parameters.
2. Cycle № xx – number of the current communication cycle. By cycle is meant
executing requests all elements.
3. Successful: xx – the number of successful requests in the last cycle.
4. Errors: xx – the number of failed requests in the last cycle. Unsuccessful
considered a request which has not received a response within timeout or
received a response does not match expected.
If communication is not successful, you can use to analyze the function "Log"
from the main menu.
To stop communication press the button "■ Stop" on the upper application bar.
7 Log communication, error analysis
The log contains the last 50 requests upon reaching this amount will automatically
delete old requests from the log, so that the analysis is desirable to stop the process of
communication.
Clear the log, you can using the "x" button on the top panel.
1. The request to: IP address of the server: server port | PLC Address # function
modbus x register address (bits) type of request.
2. If the connection was not, then: Try to connect: the Ip address of the server:
server port.
3. Connection: the Ip address of the server: server port: the connection status.
4. If the connection is successful, will be shown in hexadecimal format request.
5. If you receive a response will be shown a response in hexadecimal format.
6. The value: is the requested value converted to the specified format.
7. If no value is received, the output value is "null"
1 request
2 request
3 request
1. The bit request to the server 192.168.82.125 port 8000, PLC №0, Modbus
request type 3, address: 7. Receive the value: 55.
2. The bit request to the server 127.0.0.1 port 502. Since the connection was
unsuccessful, the "null" value is obtained. In the next cycle requests will be
reconnection.
3. Numeric request to the server 192.168.82.125 port 8000, PLC №0, Modbus
request type: 1, address 5. Receive a successful a response "true" that
corresponds to the "ON" button.
To quit the program press the "Back" button, and the dialog box will appear, which
prompts exit without saving, save the project, or cancel exit from the app.
After exit the user returns to the start window. In start window you can select the
desired action. When you exit the main window will automatically stop communication.
For the execution of projects established in app HMI Modbus created separate
application: HMI Modbus Viewer.
HMI Modbus Viewer only allows loading and execution projects created in the
main version of the program. Loading is performed only from external folders, so the
project must first be exported from the main program using the "Export" of the main
menu.
New viewer version will be available shortly after the publication of a new version
of the editor.
The viewer project provides an opportunity to set the project execution without
displaying the startup screen. If this option is selected, the communication launches when
the application starts.
https://play.google.com/store/apps/details?id=net.sagram.hmi_modbus_viewer