5/30/2022 2:09 PM | |
Joined: 3/29/2019 Last visit: 9/21/2022 Posts: 13 Rating: (1) |
Hello all, After browsing the forums for a while, I think I got the basics of Modbus RTU figured out, but there are a few questions in my mind that I could not find an answer. Maybe someone more experienced with this type of communication can enlighten me? In a project with Multiple Modbus RTU slaves where the data is read from the field devices to the PLC, am I correct with the way I configured this kind of communication? I believe I only make one Modbus_COMM_LOAD block that configures the communication module, and then I simply insert X amount of Modbus_Master blocks to match the amount of field devices that I want to read data from? Earlier with Modbus TCP, I managed to make a working sequencer to request data from one server at a time (Link below), and I believe that I can simply use this same method with Modbus RTU? Link to MB TCP solution for sequencing The things that I was wondering, is that which MB_DB out of my seven MB_Masters do I need to use for the Modbus_comm_load block, or does it even matter in this case? Other item was regarding the data block type I use for the Modbus RTU configuration, does it have to be optimized structure or not, or will this matter either? Image of my currently planned setup is attached below. I don't have the hardware available to me yet to test it in the field, but I'll keep this post updated with the results and the solution that I ended up with :) I probably can test it in the near future with an USB / RS485 adapter and a MB testing software |
Last edited by: AleksiPartanen at: 05/30/2022 14:10:24Last edited by: AleksiPartanen at: 05/30/2022 14:12:11 |
|
6/1/2022 11:20 AM | |
Joined: 4/8/2021 Last visit: 5/14/2024 Posts: 638 Rating: (101) |
Hi Aleksi, From my point of view, the approach you are following i think it's ok. However, i would not use a clock mark as input for REQ parameter as it can generates error further. Also, i suggest to call MB_COMM_LOAD only once, either using FIRST_SCAN mark or calling itinside OB100. Have a look at following info also: https://support.industry.siemens.com/cs/ww/en/view/47756141 https://support.industry.siemens.com/cs/ww/en/view/68202723 https://support.industry.siemens.com/cs/ww/en/view/109798671/141881866123 Hope it helps. Br, Cocolino |
Best regards, |
|
Follow us on