RSL5K New Program VS Subroutine?

Duranthas

Lifetime Supporting Member
Join Date
Jul 2008
Location
Southeast Missouri
Posts
132
I'm fairly new to the Controllogix scene and thanks to the wealth of info on this site I am learning rapidly IMO. One area however that I'm uncertain of and haven't had much luck finding through the search feature is the application of JSR VS New Program. I could have sworn that I read once that Subroutines should be avoided and that instead a different program is encouraged. I'm migrating from a PLC5 & SLC so the use of JSR was a handy way to organize however I'm seeing that multiple programs could effectively do the same thing. Is my thinking skewed and multiple subroutines are perfectly acceptable or should I write using multiple programs?

Thanks
 
Use them like this if you controller runs a line with a filler a case packer and a palletizer for example then have a program for each piece of equipment and in each program use subroutines to break up the program like auto /manual mode, hydraulics,HMI controls,Motor startup,alarms,etc

You may want to use different programs if you are doing large batch jobes and use subroutines to break up the steps of the batch in each program.
 
Gotcha. Thanks for the reply. I suppose I should have specified what I'm going to be programming....
I have been tasked with an OEE project *groan* where I will be collecting cycle times, up/down time, faults, and production from quite a few different processors. I'm thinking I'll write a program for each line/machine and use subroutines to split it further between the aforementioned things I will be tracking.

Thanks!
 
Subroutines will have access to all the tags in the program. Program tags are not sharable across programs.

My preference is to keep tags as local as possible rather than make a bunch of global tags so I group things which will share data in subroutines in a common program.

In your case you may want to use different programs so that you can use common tag names. For example in both program for Line_1 and the program for Line_2 you might have a tag named DownTimeCauseCode but the two tags are completely different tags yet the code can be similar.

You might also find it worth your time to learn about AOIs for this particular application.
 
Last edited:
Not to put TOO fine a point on it, but
Tasks schedule Programs
Programs schedule (one) Routine
That routine calls other routines.
 

Similar Topics

Does anyone know if there is a "GOOD" reason why we are not allowed to deleted an unscheduled program online. I can delete it offline (don't know...
Replies
5
Views
1,866
Hi One customer who has quite impressive CLX system, complained me that the battery went down. As OEM is in backrupt, he asked me to download...
Replies
7
Views
2,613
Hey All. Weird Issue today. Never before have I had trouble with this particular PLC in the 3 years its been here. Regularly online with it. I...
Replies
4
Views
1,385
hey all. probably an easy one for you. just downloaded 525 drive firmware v 5.01. As I am sure I have done before. Control flash gives me the...
Replies
7
Views
2,451
I just bought Logix5k for the first time this past week, and downloaded a couple versions. I spoke to Rockwell support and they said that for me...
Replies
12
Views
3,477
Back
Top Bottom