Modbus extension to share tag values through Modbus TCP communication. Both reads and writes are supported through Holding registers.
Tags in Web Port are linked to either auto mapped registers or by setting them manually. # registers for each tag is determined by the datatype of the tag.
Installation
This is a pre-release beta of the extension and therefore must be manually installed by following the below steps.
- Install the latest patch of version 2.22.6 (2.22.6.10031 or later) of Web Port and make sure to select Modbus Gateway module during setup.
- Start Web Port and follow the regular instruction to require a license if needed. If an existing license already exists, make sure to complement it with the ExtMUGUI add-on by contacting the support team.
- Install the new license by copying it to the data folder for Web Port (se regular manual).
Start Web Port and verify that ExtMUGUI is loaded by navigating to “System settings” which now should contain an icon for “Modbus Gateway”.
Troubleshooting
If Web Port failed to load ExtMUGUI, start with looking under System settings/Activity log/Error log for clues about what could have failed. Common reasons are listed below.
- Addon cannot be loaded due to license issues. → Contact Web Port support to confirm that the license is OK to use with ExtMUGUI.
- Addon cannot be loaded because windows have blocked the files and therefore can not be loaded by Web Port. → Right click on every dll-file that was updated or copied and see if there is a Unblock button. If so click the button and try restarting Web Port.
Configuration
The extension is managed through /System settings/Modbus Gateway menu. The main interface shows a list of currently available tags through modbus. This is empty from the start and has to be configured.
To add tags to the list download the configuration file (tagsetup.csv) from the top menu using the button named Download. (See tagsetup.csv below for more information)
After configuring the desired tags for modbus, upload the finished file using the Upload button in the top menu. The list should now be updated with the new configuration. The list shows relevant information about the tag-modus connection and is a great tool to both monitor and search for information when connecting to Web Port with a Modbus client.
To save the list to file use the Export list button in the top menu. This will create the file mugui_tagexport.csv which can be used as documentation for a 3:d party doing a modbus integration with Web Port.
tagsetup.csv
The tagsetup.csv file has a simple structure. It only has three columns where two of them can be left blank if default settings and auto mapping should be used. See below for more details.
| Column: | Description: |
| Tagname | The name of the tag used in Web Port |
| Address | The desired holding registry starting from 1 (which would be mapped to 40001) This is optional and will be automatically set for new tags if left empty. |
| Refresh | Refresh interval that Web Port will use to update the tags value. If left empty the default setting will be used. See Settings for more information. |
Settings
The Modbus Gateway has a few settings to change or enable to get started. The settings are reached through the top menu button Server settings. See list below with explanations for the different settings.
| Setting: | Description: |
| Server status | Shows the current status of the Modbus Gateway |
| Enable Modbus | Needs to be checked to start listening for incoming connections |
| TCP-port | Listening port for incoming connections (default 502) |
| Use Big Endian | Sets if Web Port should use big-endian for byte order on integers. (default is little-endian) |
| Refresh interval | The default refresh interval for tags. This is used if nothing is set for the individual tags |
| Max # connections | The max number of incoming modbus connections |
| Connection timeout | Timeout for incoming modbus connections |
Usage
When the tag configuration is completed and Modbus is enabled, a client can connect to the configured TCP port. All tag values are cached and directly returned when a request is made to a matching holding register. The values are updated according to the set cycle time for each respective tag or the default interval. Web Port also supports multiple reads for adjacent registers.
NOTE!
The Modbus Gateway now supports three byte order options: Big Endian, Mid-Little Endian, and Little Endian.
This setting determines how data is split and transferred between different Modbus devices, especially for 32-bit values (e.g., LONG) that span two registers such as 30001 and 30002.
-
Big Endian:
ab-cd– Register30001is most significant. -
Mid-Little Endian:
cd-ab– Register30001is least significant. -
Little Endian:
dc-ba– Both the register and byte order are reversed compared to Mid-Little (i.e.,30002byte 2 is least significant, and30001byte 1 is most significant).
Make sure to select the correct byte order to ensure accurate data interpretation across the network.