JSR in RS 500 / MicroLogix 1400

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
785
I don't have a PLC right now to try it on so I will ask...


Do you need JSRs in a MicroLogix Program for it to run the other subs. I assume so, but LAD 2 doesn't seem special like it isn't a "Main Routine" like in other Vendor's Software.


So will they execute in the order defined? or will only LAD 2 Execute if no JSRs are defined in it. :confused:
 
I'm like 99% sure that LAD3,4, 5,etc would need to be called explicitly. Those can be JSR calls, high speed counter calls, or other things.

I don't know why the "main" is LAD2. I sorta assumed that OS and housekeeping stuff is what AB considered LAD1 (basically behind the scenes stuff).
 
Yes, in the older platforms, out of the box you had ladder 2. (The "Main" routine nomenclature came along with the ControlLogix platform).You will see some really old SLC's and PLC5's with all the logic in ladder 2. Then folks started using subroutines, and added lad 3, 4, 5 etc... You will need JSR's to call them.

Lad 2 is AB's version of OB1 in Step 7.
 
Last edited:
If you get into the old PLC5's there could be more than Ladder 2 set to run automatically in the processor status settings.

On the MCP tab up to 16 ladders could set to run without JSR's.

Capture.JPG
 
No soy diseñador pero si usuario de programas en RsLogix e indistintamente he encontrado rutinas JSR para llamar subrutinas y en otros programas no los diseñan y sin embargo funcionan perfectamente
Estoy frente a un Micrologix 1400 donde estoy programando un HMI e hice programas para verificar y no les pongo JSR y estan funcionando.
No sucede lo mismo con ControLogix donde invariablemente si se usan JSR para llamar las subrutinas.
Me sucedió también con la instrucción NOP que en algunas subrutinas si no la usaba no funcionaban


I am not a designer but if I use programs in RsLogix and indiscriminately I have found JSR routines to call subroutines and in other programs they do not design them and yet they work perfectly
I am facing a Micrologix 1400 where I am programming an HMI and I made programs to verify and I do not put JSR and they are working.
The same does not happen with ControLogix where invariably if JSRs are used to call subroutines.
It also happened to me with the NOP instruction that in some subroutines if I didn't use it they didn't work
 
While using JSRs is the most common way to execute a Subroutine there are others. A Subroutine may be called by a high-speed counter function reaching a terminal count.
 

Similar Topics

I was told that all subroutines should have a RET in them, even if the subroutine runs til the end of the ladder, then the last rung should be a...
Replies
10
Views
6,469
Jsr
We have a motor control JSR with Input and Output parameters, There are 36 motors that are controlled by the same JSR. What or how can I view...
Replies
8
Views
530
I intend to pass a BOOL array to an ST routine (for loop) to count the true bits. (should never have used a Bool array, lesson learned) The ST...
Replies
10
Views
858
Currently, I have a 1769-L36ERM that is being using to control a machine with 15 servos. Due to the nature of the process, the code is very...
Replies
9
Views
1,559
I have this program: ZIP (.rss inside no documentation). PDF (Italian documentation). Allen Bradley SLC5/03 PLC. I want to know how is the...
Replies
8
Views
2,061
Back
Top Bottom