Posted 30 Sep 2016 I ran across something in the software i'm working on. and I don't quite understand it. So the program uses a XCALL function to call a Pointer. What i don't understand is what happend to the Y after the call. When I went to see the Pointer it has a set and reset FY0 And FY1. What are they and what are they used for? Share this post Link to post Share on other sites
Posted 3 Oct 2016 What am I doing wrong in this simulation? It goes into error once M1 and M2 are ON.... I don't understand it .. Share this post Link to post Share on other sites
Posted 3 Oct 2016 There should be a FEND instruction between the standard program and the Pointer subroutine. Share this post Link to post Share on other sites
Posted 3 Oct 2016 (edited) You common pointer in the PLC parameters is probably set to 2048. So change the pointer in the program to 2050. IF not then What is the Error? Edited 3 Oct 2016 by Gambit Share this post Link to post Share on other sites
Posted 3 Oct 2016 Change the P1 into P2050 in the XCALL and after the FEND instruction at the begin of the sub routine Share this post Link to post Share on other sites
Posted 3 Oct 2016 Same result. Still goes into Error Share this post Link to post Share on other sites
Posted 3 Oct 2016 I see you also have no RET instrcution at the end of the Sub routine Share this post Link to post Share on other sites
Posted 3 Oct 2016 That was the issue. Now it works. I have just one question now. I have in a different part of the project XCALL P1 Y1 Y2 Does it turn both the Y's ON? (with the same subroutine) Share this post Link to post Share on other sites
Posted 3 Oct 2016 (edited) Edited 3 Oct 2016 by Theuns 1 person likes this Share this post Link to post Share on other sites
Posted 3 Oct 2016 Thank you. HUGE HELP!!!! Couldn't find this explained :D Share this post Link to post Share on other sites
Posted 21 Oct 2016 I have another problem again but this time with EFCALL. So i have two PUI's. P0 and P2049. In P0 i call a pointer called P2050 as in the images. The problem is it goes into error again before I even force X1 to ON. Why is that? i'm trying again to simulate a functionality in my sofware. Share this post Link to post Share on other sites
Posted 21 Oct 2016 Can you show the PLC Diagnostics ? Share this post Link to post Share on other sites
Posted 24 Oct 2016 I don't understand where i went wrong ... Share this post Link to post Share on other sites
Posted 24 Oct 2016 I bet the problem is your program names. Those names look like reserved pointer addresses. You need to learn how to use pointers in the program, it's not done by making program names into pointer names. Share this post Link to post Share on other sites