2/19/2014 11:57 AM | |
Joined: 9/23/2005 Last visit: 5/20/2024 Posts: 4325 Rating: (1426)
|
Hi, Here there are some tips and tricks related to MODBUS RTU communication with S7-1500: References: Manual: http://support.automation.siemens.com/WW/view/en/59057093 Complete sample program: http://support.automation.siemens.com/BR/view/en/68202723 Requirements: To establish a MODBUS RTU communication it is necessary a High Feature Comunication Module, (not Basic ) HW configuration: Device View, Communication Module properties, Port Configuration, Protocol: set to MODBUS Programming: Blocks needed: As master: Modbus_Comm_Load / Modbus_Master As slave: Modbus_Comm_Load / Modbus_Slave Call: call both block unconditionally REQ: Modbus_Comm_Load: use first scan bit Modbus_Master: should be set (0->1) every time you need to execute a job. My tip: use a 1s clock for the first tests, it slow enough to be observed by eye. When functional, you can change it for a faster clock (e.g. 100ms). Modbus_Comm_Load parameters: e.g. follow the online help. MB_DB: should be connected to the variable MB_DB from the instance DB of the blocks Mode: Mode is not an external parameter but else an internal FB variable. It should be set to the operation mode (see online help; e.g. RS232=0, 485=4) before the call the Modbus_Comm_Load. Other communication parameters: MODBUS RTU uses 1 startbits, 8 databits, 1 Stopbit (up to now, not configurable). Here there is a very simple non tested sample program (the complete version is related above). AttachmentC:\Users\z0008iwv\Documents\Bluetooth Exchange Folder\S7-1500 Modubs RTU.zip (4258 Downloads) |
Last edited by: Pegaia at: 2/20/2014 11:14 AMLast edited by: Pegaia at: 2/19/2014 12:00 PMDenilson Pegaia |
|
This contribution was helpful to8 thankful Users |
2/19/2014 5:56 PM | |
Posts: 784 Rating: (52) |
Hello Pegaia, Thank you very much. Best regards......... |
This contribution was helpful to1 thankful Users |
2/20/2014 10:59 AM | |
Joined: 9/23/2005 Last visit: 5/20/2024 Posts: 4325 Rating: (1426) |
Hi you are wellcome. it is a pleasure to help. |
Denilson Pegaia |
|
7/31/2014 11:01 AM | |
Joined: 9/1/2005 Last visit: 5/14/2024 Posts: 4101 Rating: (194) |
|
My Forum is the place to personalize your profile, |
|
8/27/2015 3:56 PM | |
Joined: 9/3/2014 Last visit: 3/13/2019 Posts: 4772 Rating: (123) |
New question published by Raj Iyer is split to a separate thread with the subject Moving Master_Modbus FB 775 to another project. Best regards |
8/18/2016 7:20 PM | |
Posts: 2 Rating: (0) |
|
11/8/2016 7:50 PM | |
Joined: 8/21/2014 Last visit: 5/17/2024 Posts: 956 Rating: (13) |
New question published by thuan_hpc is split to a separate thread with the subject S7-1500 with temperature controller by485: communication error. Best regards |
My Forum is the place to personalize your profile, |
|
1/7/2017 11:55 AM | |
Joined: 9/1/2005 Last visit: 5/14/2024 Posts: 4101 Rating: (194) |
New question published by Emz is split to a separate thread with the subject communicating S7-1500 with Danfoss EKC. Best regards |
My Forum is the place to personalize your profile, |
|
2/21/2017 1:33 PM | |
Joined: 9/3/2014 Last visit: 3/13/2019 Posts: 4772 Rating: (123) |
New question published by Peter_Apstar is split to a separate thread with the subject Where do I find the parameters IB_Start / IB_Count / OB_Start / and OB_Count?. Best regards |
7/11/2019 10:02 AM | |
Joined: 10/18/2012 Last visit: 5/9/2024 Posts: 7 Rating: (3) |
Hi, Sample program:http://support.automation.siemens.com/BR/view/en/68202723 for Modbus Master, uses data type "Data_for_Master" inside DB778 (Comm_Data) for every defined modbus slave that master talks to. Scenario: Master talks to 3 slaves.
For above comms, you need to define 6 "Master_Comm" arrays in DB778. As the buffer array size is fixed for all "Master_Comm[X]" instances in DB778 as per defined data type "Data_for_Master", how big to you make the buffer array in said data type? Also, how do you use buffer data in PLC program as the symbolic name is only buffer[1], buffer[2] etc? Is it possible to use static structured DB with user defined symbolic data names as per third party modbus manuals in place of the buffer arrays? Thanks Richard |
Last edited by: RichyR32GTR at: 07/11/2019 10:06:00 |
|
10/14/2019 11:13 PM | |
Joined: 10/16/2017 Last visit: 4/24/2023 Posts: 1 Rating: (0) |
Hello Denilson. It is posible download this program in an older version, v15 or v14? |
8/26/2020 2:32 PM | |
Joined: 6/1/2018 Last visit: 4/13/2024 Posts: 10 Rating: (0) |
i had same problem and your answer was very usefull thank you so much............. |
10/11/2021 3:23 AM | |
Joined: 9/26/2011 Last visit: 2/5/2023 Posts: 10 Rating: (1) |
Upgraded to V16
AttachmentS7-1500 Modubs RTU_V13_SP1_V16.zip (292 Downloads) |
This contribution was helpful to1 thankful Users |
10/11/2021 3:27 AM | |
Joined: 9/26/2011 Last visit: 2/5/2023 Posts: 10 Rating: (1) |
Version upgraded to V16 AttachmentS7-1500 Modubs RTU_V13_SP1_V16.zip (308 Downloads) |
Follow us on