6/12/2010 12:26 PM | |
Posts: 147 Rating:
|
Hi
Actually, the Step7 help comes up as soon as you click on menu Help -> Contents in SIMATIC Manager. Write "ANY" in the box and press enter. An alternative would be to read Appendix A.3.4.5 in the Programming with STEP 7 V5.4 manual. Hope this helps. |
This contribution was helpful to
1 thankful Users |
6/13/2010 7:18 PM | |
Joined: 3/25/2008 Last visit: 1/28/2022 Posts: 232 Rating:
|
Hello dear colleagues. I have follow the tips you have provided me, but i sill have not completed the task described in the first post, until now i have sucessfully tested FB12/FB13, and also i have builded a FB (FBX) able to transfer a input parameter (of type ANY), to other input parameter (also of type ANY)of another FB (FBY) that is inside of FBX.When i make the same for FB12/FB13 i can not get FB12/FB13 Running, i think they do not run because the Error bit goes to 0 and also the Status paramenter shows 0 always, the Done bit also Stays in 0. In the Attached file thereis FB100 in each PLC, wich is Siemens example FB for use of FB12/Fb13 i have tested with anyproblems,also in the file isFB200, wich is FB200 modified by me to acomplish the task of this post, i call them on OB1. Pleasewould you like to take a loock to FB200 tocheck what i'm doing wrong? I will apreciate anyadvices or tips. Thanks allyou for your help, and have a very nice day AttachmentFb_TestComs.zip (159 Downloads) |
Last edited by: TEBANCH at: 6/13/2010 9:23 PMChanges in FB200 of PLC Slave Keep working! |
|
6/14/2010 12:04 PM | |
Posts: 147 Rating:
|
Hi I noticed that when calling BRCV you are using M0.1 for EN & M0.1 for EN_R too. Maybe you should put 2 different variables there? Hope this helps |
6/15/2010 9:39 AM | |
Posts: 2348 Rating:
|
What error codes it gives? |
6/15/2010 2:22 PM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello TEBANCH you didn't set yourself a beginners task with this, so first of all" good on you" for trying and what you have done so far. The problems in your logic are caused by the fact that an FB uses AR2 to store its multi instance offset (irrespective if you call your FB200 itself as a multiinstance call or not). As such you woudl typically NOT use AR2 in an FB, but if you do you must be very careful and need to save it first, use it and then restore it afterwards before you acccess anyFB variables again. Anyway, attached is a pic which shows two possible solutions for you (done for NW7, the same will need to be done for NW2). Note that Solution 1 is shorter and "nicer" but does access the ANY TEMP variable by address, which meansyou loose the advantage of full symbolic access (e.g. if TEMP variable "AuxIndex" gets shifted to add more TEMPs beforehand, you must manually change the "LW" and "LD" addresses which can get easily overlooked). A solution which uses AR2 would also be possible, butis not worth the effort in my humble opinion. While Ihaven't tested the proposed solutions, they should do the job and I hope this helps. Here are also a few more links which have some more background info on the AR2 subject for you (there's also plenty of forum related discussions on this): Which operations overwrite the content of ACCU or registers in STEP 7? How do you parameterize blocks, which have "ANY"-type or "Pointer" type parameters? In the case of a function, how is the address of the ANY pointer for the elementary IN, OUT and IN-OUT parameters loaded into the address register AR1? |
Cheers |
|
This contribution was helpful to
3 thankful Users |
Follow us on