![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Jul 2018
Location: South Dakota
Posts: 133
|
Logix 5000 Tasks, Programs, Routines
Since I've started with PLCs all of the routines have always been under the "MainProgram" folder. Would love to organize things further into sub-systems, but not sure of the implications for functionality, etc.
For instance, let's say I have 4 sets of 3 pumps that operate independently, but controlled by the same PLC. Typically, we'd have a routine for "Pump_Set_1", "Pump_Set_2", etc. all under the MainProgram folder. Instead, what if I make 4 programs, one for each set of pumps, and add those programs to the task's program schedule? Would there be any real difference? The programmer in me says it shouldn't matter, but my experience with AB tells me it might. Any insights are much appreciated. TIA |
![]() |
![]() |
#2 |
Member
|
No essentially, the only time it would really make a difference is the order you call them in but even then it would not make any difference unless you are relying on things like timed interrupts. AB is a bit different as I believe that the update of the I/O is asynchronous which means inputs & outputs can be updated during the scan of the program where many others only update real I/O before or after program scan, but with the exception of requiring high speed I/O update then it will not make any difference.
|
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Dec 2010
Location: Harrisonburg, VA
Posts: 506
|
Only caveat I can think of is if any of the programs need to know what's going on in any of the other programs. If they do, you'll have to use global controller-scoped tags for the interface. Other stuff can be kept local to each program.
|
![]() |
![]() |
#4 |
Lifetime Supporting Member
|
You can just use public parameters.
|
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Dec 2010
Location: Harrisonburg, VA
Posts: 506
|
|
![]() |
![]() |
#6 |
Member
![]() ![]() Join Date: Jul 2018
Location: South Dakota
Posts: 133
|
All of our tags are always global scope.
|
![]() |
![]() |
#7 |
Member
|
I think it is a very good idea. That is sort of the intention with Programs. I would sometimes refer to them like folders. Create a folder for a piece of equipment and put all the logic and tags you need for that equipment all in one place neatly separated from the other equipment.
A benefit to Program scoped tags would be that you could create a tag called Start (for example). That Start tag would be unique to that program. I know not everyone likes aliases, but you could alias that tag to the actual digital input tag used to start that equipment. When you move to a different program, that Start tag doesn't exist. You could actually create a new tag in the other program and also call it Start, but alias it to a different digital input. So when you have similar/identical pieces of equipment you could actually copy that entire program and paste it as a whole new program and then just update the aliases with the proper inputs and outputs for the other piece of equipment. As for making that information available to other programs, you could always create a controller scoped alias to the particular tags you want visible to the other programs. Newer versions have parameters which are sort of like program scoped tags, but you can make them visible to other programs. It's a nice feature but sort of convoluted at first. But, even if you don't use Program scoped tags and stick with Controller tags, Programs are still a really good idea. Like some of the comments here, we almost exclusively use Controller tags. OG
__________________
I despise when people take random quotes and ascribe them to me - Julius Caesar |
![]() |
![]() |
#8 | |
Member
![]() ![]() Join Date: Jul 2018
Location: South Dakota
Posts: 133
|
Quote:
EDIT: looks like that's the case: http://www.plctalk.net/qanda/showthread.php?t=78378 |
|
![]() |
![]() |
#9 |
Member
|
Correct. Unscheduled programs are not scanned.
OG
__________________
I despise when people take random quotes and ascribe them to me - Julius Caesar |
![]() |
![]() |
#10 |
Member
![]() ![]() Join Date: Jul 2018
Location: South Dakota
Posts: 133
|
|
![]() |
![]() |
#11 |
Lifetime Supporting Member
|
|
![]() |
![]() |
#12 |
Member
![]() ![]() Join Date: Nov 2016
Location: Fields of corn
Posts: 2,364
|
|
![]() |
![]() |
#13 | ||
Lifetime Supporting Member
|
Quote:
Quote:
|
||
![]() |
![]() |
#14 | ||
Member
![]() ![]() Join Date: Nov 2016
Location: Fields of corn
Posts: 2,364
|
Quote:
As I remember, there's a limit on number of programs... a pump seems too small of an oject to take up a program. That was my comment. As for segregation, it's pretty good. Quote:
Thus increasing dead code and confusion. |
||
![]() |
![]() |
#15 |
Member
|
Program limit has bumped up twice over the years.
There really isn't much overhead involved in using a program. But there is some certainly. Not all that much different than creating a subroutine. OG
__________________
I despise when people take random quotes and ascribe them to me - Julius Caesar Last edited by Operaghost; March 20th, 2023 at 12:18 PM. |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Studio 5000 View Designer with 5000 Studio Logix Emulate | hbenkaab.takeda | LIVE PLC Questions And Answers | 3 | July 22nd, 2020 09:30 AM |
RS Logix 5000-Exporting/Importing Routines to another RS Logix 5000 Program | Baker in Virginia | LIVE PLC Questions And Answers | 8 | September 27th, 2019 02:27 PM |
Studio 5000 V24 crashes when using Save As and when Exporting routines or programs | kpElec | LIVE PLC Questions And Answers | 9 | May 20th, 2019 12:15 PM |
Is RS Linx still on and loaded with the RS Logix 5000 CD ? | Rob S. | LIVE PLC Questions And Answers | 5 | October 21st, 2014 04:24 PM |
RSLogix 5000 Routines | gizmo | LIVE PLC Questions And Answers | 4 | January 6th, 2004 01:52 PM |