(PowerLogic PM8000)Modbus RTU to TCP/IP by Serial to ethernet device (USR-W610) remotely by VPN device (Flexy 205))

Hi all.
I need help with some application, I have a POWERLOGIC PM8000 with this setup:
-Protocol: Modbus RTU
-Baud Rate: 115200
-Unit ID: 1
-RTS Delay: 0.01
-Rx Timeout: 2
-Serial port: 8N2
-RS485 Bias: ON.
I connect this device by RS485 to a Serial to ethernet device, the model is an USR-W610 and the setup is:
-AP Mode
-Data transfer mode: Modbus TCP <=> Modbus RTU
-Baudrate: 115200
-Serial port: 8N2
Note: This device can make a TCP server, the server setup is:
-Mode: Server
-Protocol: TCP
-Port: 502
-TCP Connections: 24
-IP LAN: 192.168.2.58
And the VPN device (Flexy 205) is the modbus master, the setup is:
-Modbus TCP port: 502
-Slave Address(Unit ID): 1
-IP Address: 192.168.2.58
-Poll Rate: 2000 ms
This is all the setup that I made, but isn't work, I don't know what is happening, the error says that is an error frame, I did a registers reading from modbus with a modbus sim (CASModbusScanner) and the message is this:

[15:54:34] <= Response: 01 03 02 00 4B F8 44 00 00 00 00 06 01 03 02 00 4B F8 45 00 00 00 00 06 01 03 02 00 4B F8 46 00 00 00 00 06 01 03 02 00 4B F8 47 00 00 00 00 06 01 03 02 00 4B F8 44 11 00 00 00 03 01 84 01
[15:54:33] => Poll: 01 04 02 69 00 01
[15:53:09] <= Response: 01 03 02 00 4B F8 39 00 00 00 00 06 01 03 02 00 4B F8 3A 00 00 00 00 06 01 03 02 00 4B F8 3B 00 00 00 00 06 01 03 02 00 4B F8 3C 00 00 00 00 06 01 03 02 00 4B F8 3D 00 00 00 00 06 01 03 02 00 4B F8 3E 00 00 00 00 06 01 03 02 00 4B F8 3F 00 00 00 00 06 01 03 02 00 4B F8 40 00 00 00 00 06 01 03 02 00 4B F8 41 00 00 00 00 06 01 03 02 00 4B F8 42 00 00 00 00 06 01 03 02 00 4B F8 43 00 00 00 00 06 01 03 02 00 4B F8
[15:53:09] => Poll: 01 03 02 69 00 01
[15:49:48] <= Response: 01 03 02 00 4B F8 2B 00 00 00 00 06 01 03 02 00 4B F8 2C 00 00 00 00 06 01 03 02 00 4B F8 2D 00 00 00 00 06 01 03 02 00 4B F8 2E 00 00 00 00 06 01 03 02 00 4B F8 2F 00 00 00 00 06 01 03 02 00 4B F8 30 00 00 00 00 06 01 03 02 00 4B F8 31 00 00 00 00 06 01 03 02 00 4B F8 32 00 00 00 00 06 01 03 02 00 4B F8 33 00 00 00 00 06 01 03 02 00 4B F8 34 00 00 00 00 06 01 03 02 00 4B F8 35 00 00 00 00 06 01 03 02 00 4B F8 36 00 00 00 00 06 01 03 02 00 4B F8 37 00 00 00 00 06 01 03 02 00 4B F8 44 0F 00 00 00 06 01 03 02 00 4B F8
[15:49:47] => Poll: 01 03 02 69 00 01
[15:45:58] <= Response: 01 03 02 00 4B F8 18 00 00 00 00 06 01 03 02 00 4B F8 19 00 00 00 00 06 01 03 02 00 4B F8 1A 00 00 00 00 06 01 03 02 00 4B F8 1B 00 00 00 00 06 01 03 02 00 4B F8 1C 00 00 00 00 06 01 03 02 00 4B F8 1D 00 00 00 00 06 01 03 02 00 4B F8 1E 00 00 00 00 06 01 03 02 00 4B F8 1F 00 00 00 00 06 01 03 02 00 4B F8 20 00 00 00 00 06 01 03 02 00 4B F8 21 00 00 00 00 06 01 03 02 00 4B F8 22 00 00 00 00 06 01 03 02 00 4B F8 23 00 00 00 00 06 01 03 02 00 4B F8 24 00 00 00 00 06 01 03 02 00 4B F8 25 00 00 00 00 06 01 03 02 00 4B F8 26 00 00 00 00 06 01 03 02 00 4B F8 27 00 00 00 00 06 01 03 02 00 4B F8 28 00 00 00 00 06 01 03 02 00 4B F8 29 00 00 00 00 06 01 03 02 00 4B F8 2A 00 00 00 00 06 01 03 02 00 4B F8
[15:45:57] => Poll: 01 03 02 69 00 01
[15:40:43] Recv error: Exception Response:
The device responded but with an error instead of data

0x01 - ILLEGAL FUNCTION

The function code received in the query is not an allowable action for the server (or slave). This may be because the function code is only applicable to newer devices, and was not implemented in the unit selected. It could also indicate that the server (or slave) is in the wrong state to process a request of this type, for example because it is unconfigured and is being asked to return register values.
[15:40:11] <= Response: 01 84 01
[15:40:10] => Poll: 01 04 02 69 00 01
[15:40:10] Connect to TCP 192.168.2.58:502 timeout: 3
[15:38:04] Ready…
[15:38:03] Settings file: [C:\Users\Admin\Documents\CAS Modbus Scanner\Settings.xml]
[15:38:03] Debug file: [C:\Users\Admin\Documents\CAS Modbus Scanner\Debuglog.txt]
[15:38:03] Starting up…
 
You have a complex system that you are trying to troubleshoot. I recommend applying the Divide and Conquer troubleshooting approach by simplifying your system and testing each portion until you narrow down the source of the issue.

Start by verifying Modbus RTU communications with the meter directly by using a computer, USB to RS-485 adapter, and Modbus master software such as CAS Modbus Scanner, ModScan, Simply Modbus, etc. You should also verify you're using the correct RS-485 settings on the meter. Your value for RS485 Bias seems incorrect according to the description from the manual (though this likely will not make any difference). I believe RS485 Bias should be OFF, since the meter is a slave not the master.
1624463455892.png

Additionally, you should verify that you are accessing the correct type of register. From your packet captures, you are trying to access both Holding Registers (function 3) and Input Registers (function 4). The meter does not support Input Registers (function 4) as a slave:
1624463782433.png

After you have successfully verified communication directly to the meter, add the USR-W610 serial to Ethernet converter and verify Modbus TCP communication using the same PC software. After successfully verify this communication, then add the Flexy 205 VPN device to your system and test again.

Before doing any of this, though, you may also want to go take a step back and verify whether it's necessary to have this complex setup. According to the PM8000's User's Manual, the meter natively supports Modbus TCP, so there should be no need for the USR-W610 serial to Ethernet device.
 
Top