Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on March 29, 2021, 03:43:19 PM
-
Couple of general questions concerning Modbus:
1) At present time MRX command is limited to 124 registers to read at a time. Is that limit because of the Modbus protocol or because of how the BRX works?
2) In general, does it take more time to execute the instruction or read all the registers? For example, if I use MRX to read 1 register or 124 registers at a time, is most of the time tied up in the open/close/processing of the instruction or the reading of the registers or does the time taken to complete the instruction primarily depend on how many registers are read at a time. I'm trying to read from very spread out registers in a device. I've got the MRX staged to process every register individually. Some of the registers are adjacent, some are not. The staging works but it's beginning to seriously get bogged down the more address I add to read from. Some of the registers are adjacent (within 124 registers) and I'm trying to determine if I should read fewer bigger blocks of registers to speed up comms.
-
Couple of general questions concerning Modbus:
1) At present time MRX command is limited to 124 registers to read at a time. Is that limit because of the Modbus protocol or because of how the BRX works?
Modbus specification limits. Most devices are not servers with lots of RAM. Think Modbus/RTU devices.
2) In general, does it take more time to execute the instruction or read all the registers? For example, if I use MRX to read 1 register or 124 registers at a time, is most of the time tied up in the open/close/processing of the instruction or the reading of the registers or does the time taken to complete the instruction primarily depend on how many registers are read at a time. I'm trying to read from very spread out registers in a device. I've got the MRX staged to process every register individually. Some of the registers are adjacent, some are not. The staging works but it's beginning to seriously get bogged down the more address I add to read from. Some of the registers are adjacent (within 124 registers) and I'm trying to determine if I should read fewer bigger blocks of registers to speed up comms.
Unless you are using Modbus/RTU over a 1200 baud modem ;), always do as much as you can in one packet. Time on the wire for Modbus/TCP is minimal compared to PLC scan overhead processing. This assumes you have an online slave device. TCP timeouts can be long (60 second default).
-
If I was using one Program to perform reads and one program to perform writes to the same device (MRX in the read Program and MWX is the write Program), should I use separate devices for the MRX and MWX? Would this potentially speed up comms?
-
No. One Modbus Client per Server/Slave device is optimal. Think telephones. Once you connect to a specific slave, do as much talking as you can with that one client device. If you have a second slave, use a second phone i.e. a Second Modbus TCP client device
-
Actually, if the remote server can process more than one request at a time, multiple clients might be faster. A Do-more server can process up to 16 sessions concurrently, so it would be faster there. It is dependent on your device.
-
Are there any issues with having multiple MRX (or MWX) commands using the same device, at the same IP address running continuously at a given interval at the same time ($On).
-
Are there any issues with having multiple MRX (or MWX) commands using the same device, at the same IP address running continuously at a given interval at the same time ($On).
That works great. The instructions just do round robin - once one instruction is done, the next one grabs the device and so on. So they can all be ON.
-
Thanks.
-
Are there any issues with having multiple MRX (or MWX) commands using the same device, at the same IP address running continuously at a given interval at the same time ($On).
That works great. The instructions just do round robin - once one instruction is done, the next one grabs the device and so on. So they can all be ON.
Does this apply to both RTU and TCP, or only TCP modbus devices?
-
Does this apply to both RTU and TCP, or only TCP modbus devices?
Every MxX device works that way. No problem. Built-in Round-robin - all the inter-instruction coordination "just works"