
adccommunitymod (AutomationDirect) asked a question.
C0105 RETURN error
Created Date: November 25,2009
Created By: so2r
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I 've got a subroutine that gives me a single C0105 error if I leave out the RETURN (Unconditional) statement as the last rung, however, if I put a RETURN in the last rung, I get two C0105 errors which repeat the same error twice. How could that happen? I can't find a combination that fixes that situation
Created Date: November 25,2009
Created by: bcarlton
Do a screenshot of the suspect area and the errors and attach it. Or zip and attach your project.
Created Date: November 25,2009
Created by: so2r
RETURN error file
I don't know why I am having trouble with PrntScrn on this computer but I had to attach my program rather than a print screen. Thanks for taking time to look at this.
In the subroutine "4SQR SW Indicator ", I get two C0105 RETURN errors even though you can see that I have a RETURN rung in there. A little background; the original program built for a non-analog CPU, runs perfectly on the new analog CPU (C0-02DR-D). When I add three new lines at the end of the MAIN PROGRAM (which utilize the analog inputs), I get these C0105 RETURN errors. Without those last three lines, the program runs fine.
I am not a professional PLC programmer. This is just a hobby project I'm working on so I'm sure there is something very simple I have not learned yet which causes this to bomb, but I'll be darned if I can find it. ;-)
Thanks for any suggestions,
Bob
Created Date: November 25,2009
Created by: OpZed
In those last 3 lines of code you are CALLing two subroutine programs which do not exist in the project. Fix that up and try again.
Created Date: November 25,2009
Created by: so2r
Wow, how stupid of me. Thanks, it runs perfectly now. I sure wish I knew what I was doing and could see the obvious errors like that.
Have a great Thanksgiving!!
Bob
Created Date: November 25,2009
Created by: OpZed
In Subroutine "4SQR NW Indicator " Rung 1 should be a SET not OUT.
Created Date: November 25,2009
Created by: so2r
Thanks!
I appreciate the proof reading!
I 've got things running now by using my new 3 lines of analog code and then pasting the non-analog ~130 lines in after it. The reverse order didn't work and may be a bug according to Hector at AutomationDirect.
Have a great Thanksgiving!
Created Date: November 25,2009
Created by: so2r
I 've got a subroutine that gives me a single C0105 error if I leave out the RETURN (Unconditional) statement as the last rung, however, if I put a RETURN in the last rung, I get two C0105 errors which repeat the same error twice.
How could that happen? I can't find a combination that fixes that situation