7/4/2020 6:26 PM | |
Joined: 4/28/2015 Last visit: 2/9/2025 Posts: 10805 Rating:
|
Hello, sry add some next pictures. You can see that only one S7 connection is created. In my test I set first 4 bytes send to Server from defined memory buffer (look to pointer). All steps I did manually step by step. Hope this can better describe now how to set that S7 connection. My luck that I had still some old modules and CPs from Ebay AttachmentS7_BSEND_BRCV.zip (326 Downloads) |
With best regards... |
|
This contribution was helpful to
1 thankful Users |
7/6/2020 5:21 AM | |
Joined: 10/7/2005 Last visit: 2/18/2025 Posts: 3036 Rating:
|
Hi Aboozar your logic will probably work fine on a physical S7-300 system. As Duris_I suggested, PLCSIM is indeed the problem as it behaves like an S7-400. While you can simulate communication between two PLCSIM Instances, you must in that case change your program and use SFB12/13 instead of FB12/13 (and change the program back to FB12/13 usage when you want to run it in the real S7-300's). Have a look at THIS FAQ too for more on this. |
Cheers |
|
This contribution was helpful to
1 thankful Users |
7/8/2020 9:48 PM | |
Joined: 10/3/2010 Last visit: 4/21/2024 Posts: 18 Rating:
|
Dear Duris_I and fritz, Comparing all of what happened and having everything OK, I had almost got to the point that PLCSIM was the case. Now, I am not in a situation to check SFB instead of FB (lack of SIMATIC Manager) but I just posted to thank the invaluable support. I'll recheck and reply this specific point later. For now, out of curiosity, I want to know 1) If the same happens if I use Profibus? I have this idea in mind that Profibus support in PLCSIM is more complete and I can connect two CPUs directly together. What's your idea? 2) According to the following post (8/10/2009 5:35 PM), do you (Mr. fritz) meant this idea? I wish I could know why Siemens made this difference between 300 and 400 CPUs in the first place. |
Last edited by: Aboozar at: 07/08/2020 21:52:35 |
|
7/9/2020 5:27 AM | |
Joined: 10/7/2005 Last visit: 2/18/2025 Posts: 3036 Rating:
|
Makes no difference. BSEND/BRCV (or GET/PUT or USEND/URCV) are S7 communication blocks and they - as well as PLCSIM - couldn't care less if the physical medium is PROFIBUS or ETHERNET.
Only Siemens can answer that one, but the differences between 300's and 400's are real. To note in this case is also that a 300 does NOT have dedicated communication bus on the backplane and uses 16 Bytes of I/O's for the data exchange between the CPU and any CP. This is also the reason why you need to use FB12/13 from the "SIMATIC_NET_CP->CP 300 "library when you use a CP (which internally do NOT use SFB12/13) OR from the "Standard library->Communication blocks" when you use the CPU's onboard port (in which case FB12/13 do internally do use SFB12/13). If you want to test it in PLCSIM though, you use SFB12/13 directly in your program as mentioned before. For what it is worth, you are not the first to encounter this and THIS and THIS forum entries have also more on this. |
Last edited by: fritz at: 07/09/2020 05:28:48Cheers |
|
This contribution was helpful to
1 thankful Users |
7/9/2020 9:22 AM | |
Joined: 4/28/2015 Last visit: 2/9/2025 Posts: 10805 Rating:
|
Hello, from my opinion I try everytime to avoid use PLCSim, especially with communication services. For best results I work with real HW. My ese of PLCSim is very rare and only maybe with some piece of code tests. Reason is simple, on real HW I see also reaction of system, possible timeouts and faults due program code flow in 'real time'. Simply my recommendation is basically omit use of PLCSim. If some same communication services are also capable on another medium and protocol (Profibus) is depended to HW used on both sides, this isn'r strictly same everytime. I recommend this perfect document where all is described: CPU-CPU communication with S7 controllers |
Last edited by: Duris_I at: 07/09/2020 09:26:20Last edited by: Jen_Moderator at: 07/09/2020 09:48:51Optimized link. With best regards... |
|
7/13/2020 7:22 AM | |
Joined: 10/3/2010 Last visit: 4/21/2024 Posts: 18 Rating:
|
The answers were really useful. I managed to make it work under PLCSIM with the aid of SFBs. A screenshot and the source code itself is provided for the people who may have the same problem and want to have a fast test. AttachmentPLCSIM PN connection OK(from DB201 of one to DB200 of partner and vice versa).zip (323 Downloads) |
Last edited by: Aboozar at: 07/13/2020 09:10:03 |
|
This contribution was helpful to
2 thankful Users |
Follow us on