For Live data, Historical data, Datalogging to MQTT broker, and Alarming you'll need to set up a data source and add variables. This article shows you how to do this for communication via Modbus TCP. The IXrouter will function as the Modbus Master and the machine will be the Modbus Slave.
Manufacturers that support Modbus TCP: Beckhoff, Fanuc, Omron, Siemens LOGO! and more.
- Prepare the machine
- Add a data source
- Add variables
- Test variables
- Live data, Historical data, Alarming
Prepare the machine
Some machines need to be prepared to enable communication.
Add a data source
The machine will need to be added as a Modbus TCP data source.
- Go to Fleet Manager > Devices and click on your device name.
- In the left menu, at Services, click on the icon and select Data source > EtherNet/IP.
- Enter the requested information (details below) and click on Add.
Field Description Name Enter a name for the data source. Identifier The identifier is entered automatically and ensures that every data source remains unique, even if they share the same name. IP address Enter the IP address of your machine. Leave empty if you're using an IXagent. Port
The port number will be entered automatically (port 502 for Modbus).Using a Siemens LOGO! and is 502 not working? Try port 510 instead.
Slave & Byte order Enter the Modbus server's slave ID and byte order. The byte order determines how the bytes in a register are translated to a numerical value. Read mode
The read mode determines how data is requested from the machine. Requires IXrouter3 firmware 3.22 or higher.
OptimizedOptimized - Gapped (default)
Variables with adjacent addresses are grouped together in data requests. Only variables configured in the IXON Cloud are requested from the machine and then logged to the IXON Cloud.
Variables are grouped together in data requests as much as possible for efficient communication. This means that intermediate addresses are included as well. This mode may result in errors if intermediate variables do not actually exist in the machine (please use "Optimized" instead if this is the case). Variables configured in the IXON Cloud, as well as intermediate addresses, are requested from the machine, but only the configured variables are logged to the IXON Cloud.
Polling sleep time
The IXrouter will continuously request data from the machine. This then enables you to log aggregated values, like the average value or the maximum value that occurred, and to trigger alarms when certain conditions are met.
The polling sleep time is the time that the IXrouter waits before asking data again, after it just received data from the machine.A polling sleep time of 100ms is recommended. In the rare case that you are experiencing a high CPU load on the machine, you can increase this setting to reduce the load.
Once you've added a data source, you can start adding variables.
- Under your Data source, go to Variables and click onAdd variable.
- Enter the requested information (details below) and click on Add.
Field Description Name Enter a name for the variable. Identifier The identifier is entered automatically and ensures that every variable remains unique, even if they share the same name. Type Select the variable's data type (bool, int, float, etc). Function Code Enter the variable's function code (details below). Address
Enter the variable's address. If the variable consists of two Modbus registers, enter the address of the first Modbus register.
Modbus addresses in your machine start at 0 or at 1. This differs per Modbus server and is called the base address. The base address in the IXON Cloud is 0. If the base address in your Modbus server is 1, you need to subtract 1 from the address when you enter it in the IXON Cloud. For example, if your base address is 1 and the variable's address is 65, you enter 64 as address in the IXON Cloud.
A Modbus address can have a number or function code notation. The IXON Cloud uses the function code notation. Use the table with examples below to translate from one notation to the other.
"Number" notation "Function code" notation Number Function code Address 000010 1 - Coil 10 100010 2 - Discrete input 10 400010 3 - Holding register 10 300010 4 - Input register 10 Factor Multiplies the value. Leave empty if the data type is boolean. Unit Displayed behind the value (e.g. kg).
- Repeat step 5 for every variable you want to add or click Import from CSV-file near the top right corner to add variables in bulk instead.
You have now made the changes in the IXON Cloud, but these are not yet active in your device. You will need to push your changes to your device for them to take effect.
Temporary disconnectAfter this next step, the config push, the device may temporarily disconnect and LAN communication may be temporarily interrupted while it's applying the new settings. This only takes a moment.
- Click on Push config to device in the top right corner.
The variables test is recommended to check if all added variables are configured correctly. It shows the value of all variables if everything is configured correctly and shows an error if something is not configured correctly.
- Click on Run test near the top right corner.
- The test will attempt to update values every 0.5 seconds.
- Is the test showing unexpected values? Check the addresses and data types of the variables. Are you using Unitronics hardware? Also make sure that the Read mode setting in the data source is set to Optimized.
- Is the test showing a timeout error? Check that the data source is configured correctly and the machine is connected and powered on. If you are still getting a timeout error, contact your IT to make sure the test is not blocked. The test sets up an outgoing connection from your computer to the IXrouter using:
Port Transport protocol Application protocol 443 TCP WebSocket
- Is the test showing a different error? Consult the table below for common error messages and possible ways to resolve the error.
Error Message Details Illegal data address
The variable's address is incorrect or the variable does not exist in the machine.If the error message shows a range of variables (e.g. [0-13]), the problem may be the communication. Set the Read mode setting in the data source to Optimized (requires IXrouter3 firmware 3.22 or higher). If the problem persists, make sure that the variable's addresses are correct and that the variables exist in the machine.
Gateway path unavailable Incorrect slave ID. Check the slave ID on the machine and correct the slave ID in the data source accordingly. Connection reset by peer The machine isn't accepting new Modbus connection requests. There may be a limit to the number of concurrent Modbus connections allowed on the machine and they may already be in use. Make sure there is no other Modbus communication taking place and then restart the machine and IXrouter. Connection failed: operation now in progress Modbus communication is not possible. The machine's Modbus server may not have been able to handle the amount of requests and requires a restart. Make sure that the Polling sleep time in the data source is set to 100 ms or higher and then restart the machine.
Live data, Historical data, Alarming
Now that the data source and variables have been set up, you can continue below.