AOI within an AOI

As cool as it is, recursion is caught by the compiler and not allowed in Studio/RSlogix 5K when it comes to AOIs or UDTs. A JSR call to "itself" is allowed but I haven't tried it without a way to "break" the call cycle. I would expect no less that a major fault.

I want to test it - but what if you JSR Routine_A, then have Routine_A JSR Routine_B, which in turn then has a JSR Routine_A. Similar for AOI_1 calling AOI_2, which calls AOI_1.

Would RSL/St5K catch that?
 
have Routine_A JSR Routine_B, which in turn then has a JSR Routine_A.

The compiler allows this; another form of recursion that could end disastrously.

Similar for AOI_1 calling AOI_2, which calls AOI_1.

The compiler caught this. I started with two aoi(s), aoi_A, aoi_B, with no local tags. I added a local tag in aoi_a of instance aoi_B. It was fine with that. I then tried to add an instance of aoi_B as a local tag in aoi_B. It caught it and indicated "recursion is not allowed".

I tried yet another level with aoi_c and it also caught that. aoi_A with an instance of aoi_B that had an instance of aoi_C. Attempting to add an instance of aoi_A to aoi_C tripper the same compiler fault.
 

Similar Topics

Hi, all! I have a 1768-L45 CompactLogix PLC with a couple of 4-20 temperature transmitters connected to it. I have the temperature scaling...
Replies
6
Views
444
Hi. Can anyone help me out with this one? This something that I am just having hard time figuring out. I understand and can also follow the run...
Replies
7
Views
2,979
There was a bit of discussion on this in another thread (@Maintenance Man - Going from 500 to 5000). Instead of continuing to hijack the thread...
Replies
17
Views
8,154
Hi Hope you all are doing well. Iam working on a project with some AOI. I also hate no online edits... lol. My problem occurs when I use a UDT...
Replies
1
Views
39
Hi everyone, i have an issue with saving a changed value in an AOI, I am using L84E, Everytime i try to save my work to SD card, the program lost...
Replies
1
Views
53
Back
Top Bottom