Studio5000 Compact Logix Structure

How would you all approach a system with:
1 robot
2 machines
in/out conveyor

The way I normally approach this is have all tags at the Controller scope:

Continuous task
-Main program
--Main routine (includes JSR instructions to subroutines)
--Input buffer routine
--Cell routine (such as doors, status light, etc.)
--Robot routine
--machine1 routine
--machine2 routine
--conveyor routine
--Output buffer routine
(where all routines contain all relevant logic such as alarms, logic, etc.)

Not sure if the 'standard' way would be something like below with as many tags in the Local scope and making use of parameters:

Continuous task
-Main program
--Main routine (any global things like 1s timer, etc.)
-Cell program
--Door routine
--Status light routine
-Robot program
--Input buffer routine
--Alarm routine
--Logic routines
--Output buffer routine
-Machine1 program
--Input buffer routine
--Alarm routine
--Logic routines
--Output buffer routine
-Machine2 program
--Input buffer routine
--Alarm routine
--Logic routines
--Output buffer routine
-Conveyor program
--Input buffer routine
--Alarm routine
--Logic routines
--Output buffer routine
 
I have two "template" structures. The first has five programs: IO Mapping, Housekeeping, Control, Alarming and Visualization. Within each program there is a main routine that calls all the other subroutines. I use this template for standalone, relatively simple machines.

Then I have a "process" template. It looks very much like your second example with programs for each area, and more or less the same routine structure.

For my money, I'll always have a standalone I/O mapping program. I will map each I/O type and chassis in it's own routine, but I want all of my I/O mapped in the same place, not spread out throughout the program. It's so much easier to see at a glance where you have spare I/O available if you know that every I/O point on each card is listed in the same routine, as opposed to having to cross reference to see if the input that's not shown here is shown in some other routine, and whether or not it's used or spare.
 
I used to buffer my IO sectionally like that, but now I just use one routine in the normal program, and one in the safety, to buffer all of the IO as it is laid out physically. Every point is accounted for, on every rack, whether used or not. Makes it a lot easier when adding/removing/changing things around later.


For current ControlLogix things (L8x) I don't even use a continuous task anymore, just make everything periodic.
 

Similar Topics

Hello, I've recently created a simple AOI in my program which converts from one UDT to a string. It's basically just converting DINT to STRING and...
9
Replies
630
Views
Hello everyone, I’m not looking for a full lesson—I’m currently enrolled in a modular PLC training course and may be getting a bit ahead of...
2
Replies
356
Views
Hi, I've ran into an an issue with some calibration of the analog input on a 1794-1F2XOF2I/A. I can calibrate it fine and it reads correctly but...
9
Replies
602
Views
Is there a way to get Studio5000 to Run on Lookout? Long story short, we have 28 SLC 5/05 PLC's we want to change out to CompactLogix. But are...
4
Replies
397
Views
In studio 5000, is there a way to mass import tag values? I understand how to import the tag itself but can't find a way to mass import data to...
10
Replies
945
Views
Top