A Modbus strategy that works in PAC Sim can fail after moving the Control Engine to groov EPIC because the same loopback address now identifies a different machine. The evidence refers to both “EPIC LC” and “EPIC PR1”; confirm the installed model, but resolve the network endpoint before changing the Modbus read length or data type.
Root Cause: 127.x.x.x Never Reaches the PC
Addresses in the 127.x.x.x range are loopback addresses. With PAC Sim and the Modbus slave simulator running on one computer, a handle such as tcp:127.0.0.26:8502 stays inside that computer and works locally.
After the strategy runs on groov EPIC, the same address refers to the EPIC itself. It does not refer to the PC at 127.0.0.26. The request can therefore reach the EPIC Modbus server and return status 2, “illegal data address,” because the requested register does not exist in the EPIC register map.
Select the Intended Modbus Endpoint
| Intended target | Address to configure | Port supported by the evidence | Register map |
|---|---|---|---|
| Slave simulator on the same PC as PAC Sim | PC loopback address | 8502 in the working local configuration | Simulator registers |
| Slave simulator accessed from groov EPIC | PC network-interface address | 502 | Simulator registers |
| groov EPIC Modbus server | EPIC address or EPIC-local loopback | 8502 | EPIC registers calculated from its memory map |
Changing only the Control Engine address does not redirect a strategy handle that still contains a 127.x.x.x destination. Change the communication handle to the actual machine hosting the intended slave.
Configure EPIC to Reach the PC Simulator
- Bind the Modbus slave simulator to the PC network-interface address rather than any 127.x.x.x address.
- Configure the simulator to listen on TCP port
502. - Allow inbound TCP port
502through the PC firewall. - Change the PAC Control communication handle from
tcp:127.0.0.26:8502to . - Keep the Modbus/TCP protocol selection and set the slave address to the simulator Unit ID. The supplied configuration uses Unit ID
30.
Use port 8502 when the intended slave is the EPIC Modbus server. Using that port for the PC simulator is possible in the local configuration shown, but it obscures whether the strategy is addressing the simulator or the EPIC server.
Correct Unit ID and Register Addressing
The simulator configuration identifies its Unit ID as 30. Updating the slave-address parameter to 30 changed the reported status from 2 to 0, confirming that Unit ID selection affects the transaction. A zero status alone does not confirm that the requested values and destination table are correct.
If the actual target is the EPIC Modbus server, use the Modbus Calculator available under groov Manage I/O tools. Select the applicable EPIC memory-mapped item, use the calculator-provided Unit ID, and convert its displayed Modbus address to a register number as follows:
Modbus register = Modbus address + 1
PAC Sim registers, simulator registers, and EPIC registers are not interchangeable. Do not reuse a working simulator register number against EPIC without recalculating its mapping. Status 2 identifies an illegal data address; it does not mean that the requested return-value count is inherently wrong.
Verify the Corrected Transaction
- Confirm that the handle contains the PC network-interface address and port
502when EPIC must reach the PC simulator. - Confirm that the simulator is bound to that interface, is configured for Unit ID
30, and is permitted through the PC firewall. - Run
O22Modbus03ReadHoldingRegistersAsIntand checkn03AsIntStatus. A remaining value of2directs attention to the selected register map and address conversion. - If the status is
0but no expected data appears, compare the requested holding-register location with the simulator configuration and inspect the strategy’s destination values. Do not treat status zero as proof that the selected register contains the intended data. - If EPIC itself is the target, reconnect on port
8502and verify both the calculator-derived Unit ID and the address-plus-one register conversion.
FAQ
Why does 127.0.0.26 work in PAC Sim but not on groov EPIC?
PAC Sim and the slave simulator share the PC loopback stack. On groov EPIC, 127.0.0.26 refers back to the EPIC, so configure the PC network-interface address instead.
Which Modbus TCP port should groov EPIC use for a PC simulator?
Configure the simulator and strategy for TCP port 502, then allow inbound TCP 502 through the PC firewall. Use port 8502 when connecting to the EPIC Modbus server described in the evidence.
What does Modbus status 2 mean in O22Modbus03ReadHoldingRegistersAsInt?
Status 2 means “illegal data address.” Verify that the request uses the target device’s register map; for an EPIC calculator address, the Modbus register is the displayed address plus 1.