Program files in RSLogix 5000 are very similar to Program files in RSLogix 5 and RSLogix 500. Once you create a program, you must then configure the main routine and optionally the fault routine.
- Could have many subroutines and at least one main routine.
- Could have a fault routine
- Optional Fault routine for each program that will be executed if an error occurs during the execution of the program.
- There could be 32 programs in every task.
- Programs can only appear once in the controller organizer and cannot be shared by multiple tasks.
Every program in RSLogix 5000 has its own program tags. All tags created in Program tags have a scope within the program itself. These tags are seen as local tags. Two programs cannot share the same tag. If for any reason you want to share tags between programs then those tags should be created in the Controller tags section.
Since no tags could be shared between programs then the same tag could be created in more than one program. This means that programs could be copied and reused more easily since we don't need to worry about tag conflicts between programs.
Routines in RSLogix 5000 are the executable code for a project in a controller.
- A routine is similar to a program file or subroutine in a PLC or SLC processor.
- Each program must have a main routine.
- The main routine is the only routine executed from the program. To access the other routines in the same program then we have to use a logic such as JSR to call the routines.
- You can have as many routines per program as the controller memory allows.
- Any fault within a routine will trigger the Program Fault routine.