- Posts: 2
- Thank you received: 0
Duplicate active TCP sockets generated by a single `Modbus_TCP_Slave`
3 hours 8 minutes ago #420
by Eduardo
Environment Specs:
) after a cold boot, the main PLC process (
) opens two simultaneous active TCP sockets to the Modbus gateway IP
. Both sockets actively transmit identical Modbus TCP request streams in parallel, causing frame collisions and delays on the underlying RS-485 serial bus.Diagnostic Evidence:1. Socket Inspection ( ss -tnp )
Both
and
continuously fluctuate on both file descriptors (fd=4 and fd=6), proving that both sockets are actively exchanging traffic with the gateway (neither socket is idle or hanging).2. Payload Analysis ( tcpdump )Decoding the Modbus TCP application layer reveals a 1:1 mirror traffic pattern between local ports
and
:
- ProviewR Version: 6.1.5
- OS: Linux (Debian 12 / Linux Mint)
- Node / Bus: Development Node under Bus 999 (
)Code:plc_wicotas_0999_plc
- Modbus Gateway: Exemys EGW1 (Modbus TCP to RS-485 converter, IP
)Code:10.59.1.50:502
- Slave Devices: Micro Motion RFT9739 (Unit ID 1), Micro Motion 1700 MVD (Unit ID 3)
Code:
rt_ini &
Code:
plc_wicotas_0999_plc
Code:
10.59.1.50:502
Code:
ESTAB 0 0 10.59.1.2:60178 10.59.1.50:502 users:(("plc_wicotas_0999_plc",pid=25050,fd=4))
ESTAB 0 24 10.59.1.2:60180 10.59.1.50:502 users:(("plc_wicotas_0999_plc",pid=25050,fd=6))
Code:
Send-Q
Code:
Recv-Q
Code:
60178
Code:
60180
- Port 60178: Transmits
(Read Holding Registers for PDU 246, 258, 244, 1) andCode:FC03(Write Single Coil 3) to Unit ID 1 and Unit ID 3.Code:FC05
- Port 60180: Transmits identical
andCode:FC03request bursts to Unit ID 1 and Unit ID 3 at the exact same intervals.Code:FC05
- There is strictly one Modbus_Master and one Modbus_TCP_Slave object under
.Code:wicoTAS ➔ IO
- A single
(Code:PlcThread) is defined and assigned.Code:Plc1
- Attribute
is set uniformly across allCode:Process = 1 (PLC)objects.Code:Modbus_Module
- A clean build (
+Code:Clean Volume) was performed, but two sockets continue to open automatically on runtime startup.Code:Build Node
- Why does the PLC runtime engine instantiate two independent TCP sockets (
andCode:fd=4) for a singleCode:fd=6object?Code:Modbus_TCP_Slave
- Does ProviewR separate cyclic transactions (
) from triggered transactions (Code:Continuous = YES) into dedicated sockets, or isCode:Continuous = NObeing called twice within the multithreaded framework?Code:io_init()
- What is the recommended configuration to force ProviewR to multiplex all Modbus TCP requests over a single TCP socket descriptor?
Please Log in or Create an account to join the conversation.
2 hours 54 minutes ago #421
by Eduardo
Replied by Eduardo on topic Duplicate active TCP sockets generated by a single `Modbus_TCP_Slave`
Apologies for the formatting issue in the main post!** The forum editor automatically parsed the inline code tags into `Code:` blocks and split some lines, and I am unable to edit the original thread.
To summarize the core environment and issue cleanly:
**PLC Process:** `plc_wicotas_0999_plc` (Bus 999)
**Target Gateway:** Exemys EGW1 (`10.59.1.50:502`)
**Slaves:** Micro Motion RFT9739 (ID 1) & Model 1700 (ID 3)
**Issue:** Executing `rt_ini &` automatically opens two active TCP sockets (`fd=4` and `fd=6`) from the exact same process (`pid=25050`) to `10.59.1.50:502`, sending 1:1 identical Modbus TCP request bursts.
Thank you for your understanding and any guidance on how to resolve this duplicate socket behavior!
To summarize the core environment and issue cleanly:
**PLC Process:** `plc_wicotas_0999_plc` (Bus 999)
**Target Gateway:** Exemys EGW1 (`10.59.1.50:502`)
**Slaves:** Micro Motion RFT9739 (ID 1) & Model 1700 (ID 3)
**Issue:** Executing `rt_ini &` automatically opens two active TCP sockets (`fd=4` and `fd=6`) from the exact same process (`pid=25050`) to `10.59.1.50:502`, sending 1:1 identical Modbus TCP request bursts.
Thank you for your understanding and any guidance on how to resolve this duplicate socket behavior!
Please Log in or Create an account to join the conversation.
Time to create page: 0.829 seconds