Integrations & Setup
...
Modbus TCP
Configuring a Modbus TCP collector
the modbus tcp collector in factry historian allows you to connect to a modbus tcp server and collect process values once configured the collector will historize those values so they are available for trending, reporting, and further analysis in factry historian prerequisites you have permissions in factry historian to manage collectors see privileges docid\ k2nnyecuxqqsiuclmpfkh an installed modbus collector if you have not done so already, first installing a collector docid\ iv4 sd56tdxcqkrkcj4kv a working modbus tcp connection to the modbus server if you are running into issues or setting this up for the first time, follow our guide to testing a modbus tcp connection docid\ f44bsgwvgi69fchvnkboj a configured creating a time series database connection docid\ sq5uvlchyg7umi930nyml to write the collected data to configure the collector after installing the collector, you should see it in the collectors overview in factry historian its initial initial state indicates the collector has established a connection to factry historian and is awaiting configuration to configure the collector, select it from the collectors overview and click the edit button configure the following fields endpoint this is the host and port of the modbus tcp server the collector will connect to you may write it with a scheme or simply as host\ port examples tcp\ //\<hostname> \<port> for example tcp\ //localhost 502 this field must be provided the collector cannot connect without a valid endpoint byteorderdefault defines the default byte and register ordering the collector uses to reconstruct multi register values (32/64 bit) from 16 bit modbus registers modbus returns 16 bit words, how those words and their bytes are combined determines whether a value is interpreted correctly keep a conservative global default and override it per measurement when a device requires different ordering supported values (exact tokens) ab (cd) (ef gh) big endian byte and register order (common default) ba (dc) (fe hg) little endian byte and register order (hg fe) (dc) ba inverted register order, little endian bytes (gh ef) (cd) ab inverted register order, big endian bytes the collector uses ab (cd) (ef gh) unless you explicitly change it set this once when most devices use the same ordering; prefer per measurement overrides for outliers if multi register reads show wrong sign, swapped halves, or incorrect scaling, verify the device’s byte/register order rather than globally changing the default then, click save expected outcome after you have configured the collector, a green start button will appear in the top right corner of the collector page click start to launch the collector if the connection is successful, the collector status will change to collecting collecting troubleshooting if the collector fails to connect or you see frequent timeouts verify network connectivity from the collector host to the modbus server and that the configured port (typically 502) is open confirm byteorderdefault (or a per measurement override) matches the device's register/byte order reduce concurrent requests or distribute measurements across multiple collectors if the server is overloaded inspect collector logs for specific error codes and timings to determine whether failures are network, device, or polling strategy related best practices timestamps make sure all clocks (collector, server, devices) are synchronised (for example using ntp) so timestamps are correct multiple devices through a single modbus gateway/server if you connect multiple devices through a single modbus gateway or device avoid polling too many devices at the same time , stagger polling intervals or distribute measurements across collectors limits a single modbus tcp collector can handle thousands of measurements depending on polling rates, network quality and device responsiveness if you hit hard limits (cpu, ram, network) at the modbus server or gateway, consider splitting measurements across additional collectors as a last resort