The ETHERNETIP route enables communication with CIP (Common Industrial Protocol) compatible devices using EtherNet/IP explicit messaging. It provides access to device attributes using CIP addressing (Class, Instance, Attribute) and supports Allen-Bradley PLCs and other EtherNet/IP devices.
EtherNet/IP uses CIP addressing which provides structured access to device data. Use this route when you need explicit messaging to specific CIP objects.
DEFINE ROUTE EIPDevice WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 750 ADD MAPPING DeviceData WITH EVERY 1 SECOND ADD TAG Temperature WITH ADDRESS "1.1.100.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "eip/temperature"
ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 500 WITH CONNECTION_TIMEOUT 5000 WITH READ_WRITE_TIMEOUT 3000 WITH RETRY_ATTEMPTS 3 WITH RETRY_TIME_SECONDS 5
ADD TAG ProcessTemperature WITH ADDRESS "102.1.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "eip/process/temperature" WITH SCALING_FACTOR 0.1 WITH OFFSET 0 WITH DEADBAND 0.5 WITH PUBLISH_MODE "JSON" WITH LENGTH 1
For on-demand EtherNet/IP operations (not polling), use the EVENT syntax. Publish a message to SOURCE_TOPIC to trigger the operation; the route executes it and publishes the result to DESTINATION_TOPIC.
DEFINE ROUTE DeviceIdentity WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 5000 ADD MAPPING IdentityData WITH EVERY 30 SECONDS ADD TAG VendorID WITH ADDRESS "1.1.1.0" WITH DATA_TYPE "UINT16" WITH SOURCE_TOPIC "device/identity/vendor" ADD TAG DeviceType WITH ADDRESS "1.1.2.0" WITH DATA_TYPE "UINT16" WITH SOURCE_TOPIC "device/identity/type" ADD TAG ProductCode WITH ADDRESS "1.1.3.0" WITH DATA_TYPE "UINT16" WITH SOURCE_TOPIC "device/identity/product" ADD TAG SerialNumber WITH ADDRESS "1.1.6.0" WITH DATA_TYPE "UINT32" WITH SOURCE_TOPIC "device/identity/serial" ADD TAG ProductName WITH ADDRESS "1.1.7.0" WITH DATA_TYPE "STRING" WITH LENGTH 32 WITH SOURCE_TOPIC "device/identity/name"
Read analog input points:
DEFINE ROUTE AnalogIO WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 500 ADD MAPPING AnalogInputs WITH EVERY 500 MILLISECONDS ADD TAG AnalogIn1 WITH ADDRESS "102.1.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "io/analog/in/1" WITH SCALING_FACTOR 0.01 WITH OFFSET 0 WITH DEADBAND 0.1 ADD TAG AnalogIn2 WITH ADDRESS "102.2.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "io/analog/in/2" WITH SCALING_FACTOR 0.01 WITH DEADBAND 0.1 ADD TAG AnalogIn3 WITH ADDRESS "102.3.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "io/analog/in/3" WITH SCALING_FACTOR 0.01 WITH DEADBAND 0.1
Read discrete input/output points:
DEFINE ROUTE DiscreteIO WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 100 ADD MAPPING DiscreteInputs WITH EVERY 100 MILLISECONDS ADD TAG DI_Status1 WITH ADDRESS "104.1.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "io/discrete/in/1" ADD TAG DI_Status2 WITH ADDRESS "104.2.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "io/discrete/in/2" ADD TAG DO_Command1 WITH ADDRESS "105.1.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "io/discrete/out/1" ADD TAG DO_Command2 WITH ADDRESS "105.2.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "io/discrete/out/2"
Read assembly object data:
DEFINE ROUTE AssemblyData WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 250 ADD MAPPING InputAssembly WITH EVERY 250 MILLISECONDS ADD TAG InputAssembly100 WITH ADDRESS "4.100.3.0" WITH DATA_TYPE "UINT32" WITH SOURCE_TOPIC "assembly/input/100" WITH PUBLISH_MODE "JSON" ADD TAG InputAssembly101 WITH ADDRESS "4.101.3.0" WITH DATA_TYPE "UINT32" WITH SOURCE_TOPIC "assembly/input/101" ADD TAG OutputAssembly150 WITH ADDRESS "4.150.3.0" WITH DATA_TYPE "UINT32" WITH SOURCE_TOPIC "assembly/output/150"
Different polling rates for different data:
DEFINE ROUTE MultiRateEIP WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 ADD MAPPING FastData WITH EVERY 100 MILLISECONDS ADD TAG CriticalStatus WITH ADDRESS "104.1.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "fast/status" ADD TAG ProcessValue WITH ADDRESS "102.1.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "fast/pv" ADD MAPPING SlowData WITH EVERY 5 SECONDS ADD TAG DeviceStatus WITH ADDRESS "1.1.5.0" WITH DATA_TYPE "UINT16" WITH SOURCE_TOPIC "slow/device_status" ADD TAG DiagnosticCount WITH ADDRESS "1.1.8.0" WITH DATA_TYPE "UINT32" WITH SOURCE_TOPIC "slow/diagnostic"
Continuous monitoring with on-demand read and write events in the same route:
DEFINE ROUTE FullEIPSetup WITH TYPE ETHERNETIP ADD ETHERNETIP_CONFIG WITH IP "192.168.1.100" WITH PORT 44818 WITH POLLING_MS 500 ADD MAPPING AnalogInputs WITH EVERY 500 MILLISECONDS ADD TAG ProcessValue WITH ADDRESS "102.1.3.0" WITH DATA_TYPE "FLOAT32" WITH SOURCE_TOPIC "eip/analog/pv" WITH SCALING_FACTOR 0.01 ADD TAG Status WITH ADDRESS "104.1.3.0" WITH DATA_TYPE "BOOLEAN" WITH SOURCE_TOPIC "eip/discrete/status" ADD EVENT ReadAttribute WITH SOURCE_TOPIC "eip/commands/read" WITH DESTINATION_TOPIC "eip/responses/read" WITH QUERY "{operation: READ, address: 1.1.6.0, data_type: UINT32}" ADD EVENT WriteOutput WITH SOURCE_TOPIC "eip/commands/write" WITH DESTINATION_TOPIC "eip/responses/write" WITH QUERY "{operation: WRITE, address: 103.1.3.0, data_type: FLOAT32, value: 0}"
The MAPPING continuously reads an analog input and a discrete status. To trigger an on-demand read (e.g., device serial number), publish any message to eip/commands/read. To write an analog output, publish to eip/commands/write.