1/3/2017 10:59 AM | |
Joined: 1/3/2009 Last visit: 6/30/2022 Posts: 161 Rating:
|
Hi all, my system uses ET 200SP as decentral peripherie and S7-400H as the CPU. I have ET 200SP PtP CM (6ES7 137-6AA00-0BA0) installed, to be used as Modbus slave interface (RS485 2W). As far as I understand from the (very confusing) online documentation, I have to use, in my user program, the following blocks: FB611 (Send_Config) V1.0 FB640 (Modbus_Comm_Load) V1.0 that can be downloaded from Here. So I have placed them in my block folder (remember, I must use Step 7 V5.5 since I am on S7-400H) but now I have several questions: 1. When should the FB640 called? I guess only once, or upon request if communication parameters must be changed during runtime (eg. from an HMI), setting the REQ input to 1, then reset it to 0 2. How to assign the PORT parameter to FB640? E.g my CM has address 572 in HW configuration, shall I enter W#16#23C? 3. How to assign the BAUD parameter to FB640? The documentation shows a code (6 for 9600bps, 7 for 19200 and so on) while someone in this forum says it has to be explicit like L#19200). Please shed some light on this topic 4. While compiling my blocks, I get an error on FB642 "Modbus Slave", requiring UDT 612. Where can I find this UDT? I am attaching a printout of my OB1 and OB100 so that you can comment and suggest improvements AttachmentOB1-100.zip (967 Downloads) |
Last edited by: ste_angioni at: 1/3/2017 11:01:09 AMChanged attachments Stefano Angioni |
|
1/3/2017 1:03 PM | |
Joined: 2/27/2014 Last visit: 2/18/2025 Posts: 689 Rating:
|
Hello, Have look in attached project backup. I haven't test full functionality of H with Modbus RTU but test it and let us know the result. AttachmentModbus_1.zip (1123 Downloads) |
With Best Regards, |
|
This contribution was helpful to
2 thankful Users |
2/28/2017 3:26 PM | |
Joined: 1/3/2009 Last visit: 6/30/2022 Posts: 161 Rating:
|
Hi all, everything worked fine except: - if I remove and reinsert the module, or if I power cycle the ET 200SP chassis, the communication does not restart automatically. The only way I have found to make it restart is to STOP/RUN the CPU. - if i set the initialization parameter of the modbus slave FB, the communication stops and I have to STOP/RUN the CPU any hint? Thank you. Edit: attached S7 project (communication part only) AttachmentS7400H_ET_200SP_CM_PTP.zip (1159 Downloads) |
Last edited by: ste_angioni at: 2/28/2017 4:01:06 PMStefano Angioni |
|
12/1/2021 10:34 AM | |
Joined: 8/14/2011 Last visit: 1/28/2025 Posts: 12 Rating:
|
@DJ_1Thank you very much. It worked like charm. This is what I did, "Copied all the blocks available in the Library program that I have downloaded for CM ptp module (Modbus RTU V1.3) to my Newly created program. Then configured the port(PI Address of CM card), mode , line_pre, baud for Modbus_com_load. Then defined slave addr, data addr, data length, data_ptr. And it worked well. If your configuration is ok then you will see the CM cards TX is on(or blinks) even without a slave device. If you see Area length access error for FB641 or FB640, this is due to blocks/udts are missing. Modbus RTU communication will not work if you have those error." Thank you again. |
Last edited by: aegis at: 12/01/2021 10:36:40MRK |
|
This contribution was helpful to
1 thankful Users |
10/3/2023 8:39 AM | |
Joined: 6/15/2016 Last visit: 12/6/2024 Posts: 12 Rating:
|
Hi friend, Can you please share the working backup. Thanks, Zakir Sayed |
Follow us on