Diagnose the ClassNotFoundException
The Java application fails with java.lang.ClassNotFoundException: de.re.easymodbus.modbusclient.ModbusClient. This confirms that the Ewon Java runtime cannot locate that class at execution time. Adding the external JAR in the builder or unpacking it into /bin did not make the class available, so do not treat either action as a verified deployment method.
Use the Ewon Modbus Data Path
Configure the Ewon Modbus IO server to exchange data with the local Modbus TCP device, map the required values to Ewon tags, and access those tags from Java through the Ewon interface. The reported installation verified this architecture for both reading and writing Modbus TCP data.
| Layer | Responsibility | Evidence-supported interface |
|---|---|---|
| Modbus IO server | Communicate with the local Modbus TCP device | Ewon configuration |
| Ewon tags | Expose mapped Modbus values | Tag database |
| Java application | Read mapped values |
com.ewon.ewonitf.IOManager.readtagAsX function family |
Configure and Verify Register Access
- Configure the Modbus IO server for the target local device.
- Create Ewon tags for the Modbus values that the application must access.
- Confirm that the tags update from the device before testing Java code. This separates Modbus configuration faults from Java API faults.
- Read each mapped tag through the appropriate member of the
com.ewon.ewonitf.IOManager.readtagAsXfamily. The evidence does not provide a complete method signature, so select the exact typed function from the installed Ewon Java API documentation. - Verify the Java result against the corresponding Ewon tag value and device register.
Account for Tag-Mapping Limits
The reported limitation is that Ewon value tags do not address the extended Modbus address space. String handling is also unsuitable for this case: a string-type Modbus value tag does not provide a way to define the string length, so the Ewon cannot determine where the string ends.
If the PLC string resides in the extended address space, the tag-based method cannot satisfy that requirement as described. A proposed alternative is to use the Flexy as a VPN tunnel, connect directly from Java to the PLC, read holding registers, assemble the string, and write the completed value to a MEM tag. The evidence presents this as an attempted design, not a verified implementation, and supplies no validated Java library or syntax for it.
FAQ
How do I read Modbus TCP registers from Java on an Ewon?
Configure the Ewon Modbus IO server, map the registers to Ewon tags, and read those tags with the appropriate com.ewon.ewonitf.IOManager.readtagAsX function.
Why does Ewon Java report ClassNotFoundException for ModbusClient?
The runtime cannot locate de.re.easymodbus.modbusclient.ModbusClient. Adding the JAR in the builder and unpacking it into /bin did not resolve the reported deployment.
Can Ewon Modbus tags read strings from extended addresses?
Not in the reported case. Ewon value tags do not support the extended Modbus address space, and the string tag configuration does not expose a length needed to delimit the PLC string.