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
473
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,985
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,181
I am very new to Modbus and the industry, so forgive me if I am missing something obvious. I have known Modbus register addresses coming from a...
Replies
7
Views
199
Does anyone know of an AOI using the user ASCII protocol select on the L6x controllers that will talk Modbus RTU using RS-485? Thanks, Trevor...
Replies
1
Views
117
Back
Top Bottom