Join us today!
Notifications
Clear all
Strange behaviour between reading MODBUS register task and WIRESHARK period request
Topic starter
Nov 10, 2023 5:52 am
(@juandav)
New Member
Joined: 1 year ago
Hello,
I code a program to read 4 register through Modbus. Here is my code:
PROGRAM ModbusCommunication VAR fbMBReadRegs : FB_MBReadRegs; st_ModbusRead : ST_ModbusRead; END_VAR IF fbMBReadRegs.bBusy = FALSE AND fbMBReadRegs.bError = FALSE THEN fbMBReadRegs( sIPAddr:= '192.168.2.20', nTCPPort:= 1504, nUnitID:= 16#FF, nQuantity:= 4, nMBAddr:= 0, cbLength:= SIZEOF(st_ModbusRead), pDestAddr:= ADR(st_ModbusRead), bExecute:= TRUE, tTimeout:= , bBusy=> , bError=> , nErrId=> , cbRead=> ); ELSE fbMBReadRegs(bExecute := FALSE); END_IF
I configure a task of this program in 100ms. But I note in wireshark that the period of request is around 200ms and not 100ms (MASTER:192.168.2.16 and SLAVE:192.168.2.20).
Could anyone could explain why the period is 200ms?
This topic was modified 1 year ago by juandav
Reply
1 Reply
1 Reply
Reply
Forum Information
- 17 Forums
- 267 Topics
- 942 Posts
- 4 Online
- 722 Members
Our newest member: giordano.ceccarini
Latest Post: Beckhoff Automation at SPS 2024
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed