7/5/2014 6:15 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear All, I would like to take this opportunity and provide you with the fruits of my software development on Modbus RTU Master Communication function blocks over the past years. The function blocks are running on S7-300, S7-400 and S7-400H CPU’s and do not require any additional hardware dongle to be purchased and inserted into the communication processor module. I tried to develop these function blocks from a user perspective in order to make its use as easy as possible for the programmer. Multiple requests to more than one slave connected to the communication processor in a daisy-chain/multi-drop network can be configured within no time. The following SIMATIC S7 communication processors are supported:
GENERAL INFORMATION & SUPPORT For installation, connection and interface configuration of your communication processor module kindly follow its respective documentation. I also advise you to take some time and go through the general information about Modbus provided by our forum member smiffy. Especially if you are a beginner in Modbus, seek for support or just want to learn more about it. This software driver is running on several plants in the oil and gas industrysince many years without any known issues. In case you face any problem with the provided function blocks place a comment here in the forum and I will try to give you support. Additionally I would appreciate if users who have already successfully implemented the communication driver into their project will support me in that. I hope tomake your life a bit easier with this development.
With Best Regards NEW ! LINKFOR MODBUS RTU SLAVE DRIVER MODBUS RTU MASTER DRIVER DOWNLOAD (ATTACHMENTS) The attached program files need to be retrieved within the SIMATIC Manager. Currently there is only one manualfor theCP340version but the others are all working in the same way just with different function blocks. MBMA340.PDF - Manual for Modbus RTU Master for CP340 MBMA340.ZIP -Example projectfor Modbus RTU Master driver for CP340 MBMA341.ZIP -Libraryfor the Modbus RTU Master driver for CP341 MBMA441.ZIP -Libraryfor the Modbus RTU Master driver for CP441-X MANUAL MBMA340 AttachmentMBMA340.pdf (6464 Downloads) |
Last edited by: TIBI68 at: 9/16/2014 11:52 AMLast edited by: TIBI68 at: 7/6/2014 10:41 AMMBMA441.ZIP download added Last edited by: TIBI68 at: 7/5/2014 6:28 PMLast edited by: TIBI68 at: 7/5/2014 6:26 PMGive us your feedback and show us your respect! |
|
This contribution was helpful to79 thankful Users
|
7/5/2014 6:17 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
MBMA340
AttachmentMBMA340.zip (4336 Downloads) |
Give us your feedback and show us your respect! |
|
This contribution was helpful to19 thankful Users |
7/5/2014 6:18 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
MBMA341
AttachmentMBMA341.zip (4857 Downloads) |
Last edited by: TIBI68 at: 7/6/2014 10:36 AMStatus W#16#EEEE removed Give us your feedback and show us your respect! |
|
This contribution was helpful to26 thankful Users |
7/5/2014 6:18 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
MBMA441 AttachmentMBMA441.zip (2592 Downloads) |
Last edited by: TIBI68 at: 7/6/2014 10:37 AMDownload file added Give us your feedback and show us your respect! |
|
This contribution was helpful to11 thankful Users |
7/7/2014 10:27 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear Pero51 ,
The MBMA340.ZIP file is a project example showing how all functions work. The MBMA340 function block executes allMBMAREQfunctions sequencially.Writing a single register on trigger is not implemented.Could be maybe inlater version.
The LINK parameter has no function itself but is required for the data exchange between the two blocks. RegardingDONE and ERROR outputs: Isfor indication when the data is completly received or transferred. You just simply call the MBMAREQ blocks one after the other in your program. Is also described this way in the manual.
A trigger was neverplannedwhile, tobe honest, I never required it.Maybe there are some applications where a trigger functionwould be nice, but whatthen you will need to handle transmission failures manually (i.e. resending the requests). A cyclic executiondoes not giveyou that trouble. In case you wantto execute the requests only every x-Seconds you can place the MBMA340 block in an interrupt OB. Thanks for your valuable input and ideas. I will keep it for further developments. Best Regards. |
Give us your feedback and show us your respect! |
|
7/8/2014 7:56 AM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Pero51 ,
The MBMA340 does not call the MBMAREQ function block. The MBMAREQ blocks writesits requestsinto the instance of the MBMA340block if there is no other request already running.
The MBMAREQ block writes the complete modbus request message, except the CRC, and the S7ADDR into the instance of MBMA340. The MBMA340calculate the CRC, sends the complete modbus frame with P_SEND and waits for a reply with P_RCV.Pending on the telegram received it transfer the received data into the S7ADDR andwrites theSTATUS, DONE and ERROR outputs.
The user needs a wayto define somehowthe modbus requestsand I believethis is the easiest, esspecially for beginners.
The MBMAREQ needs its unique instance data block. The LINK needs to be the same, otherwise the MBMAREQ is not able to transferhis request data into the instance of MBMA340. This LINK parameter is the only way the two blocks can communicate with eachother. They need to be same! Most users skip reading manuals.I spent alot of time making itand it is worth reading it. Best Regards. |
Give us your feedback and show us your respect! |
|
This contribution was helpful to1 thankful Users |
Follow us on