Upload: Transfer a copy of a project file from a controller to a computer over a network:
Uploading transfers the file in the controller into the temporary memory (RAM) of the computer.
To create a permanent copy, the file must be saved to the hard drive of the computer.
Standard documentation, such as rung comments and operand descriptions, is not uploaded. To access this type of documentation, a matching file must be found in the computer. This does not apply to structured text comments.
Download: Transfer a copy of a project file from a computer to a controller over a network:
A controller can only contain one project file at a time. Downloading overwrites the current roject file in the controller.
When you download a project file into a controller, all information except standard documentation is loaded into the controller:
Online: Viewing or editing a project file that is active in the controller:
Offline: Viewing or editing a copy of a project file that is in the computer only.
A communications path is required to upload, download, or go online.
A project is organized using these components:
Task: A mechanism for scheduling and executing programs.
Program: A group of related routines and data.
Routine: A section of code (ladder logic, function block diagram, sequential function chart, structured text) written and executed as a group.
Interpreting a Task
Task: A mechanism for scheduling and executing programs:
A continuous task is a task that runs at all times unless it is interrupted by another task:
By default, a continuous task has the lowest priority of any tasks.
When executing, all programs assigned to that task are scanned once from top to bottom.
Upon completion of a single execution scan, a physical output update is triggered and the scan starts again:
A periodic task is executed at a fixed interval:
Each task is assigned an execution rate.
Each task is assigned a priority level. When initiated, a periodic
task will interrupt any lower priority task (other periodic, continuous, or event tasks).
Once triggered, all programs assigned to the periodic task are executed or scanned once from top to bottom.
After this single scan, control is returned to the task that was interrupted.
An event task is a task that performs a certain function only when triggered by a specified event:
Each task is assigned a trigger.
Each task is assigned a priority level. When triggered, the event task interrupts any lower priority tasks (other event, continuous, or periodic tasks).
Once initiated, all programs assigned to the event task are executed or scanned once from top to bottom.
Upon completion, control returns to the task that was interrupted, at the point in which it was interrupted:
The following icon in the Controller Organizer indicates that the task has been prevented from executing by a user option or instruction:
Interpreting a Program
Program: A group of related routines and data. Each program contains:
Its own program-scoped tags collection
Routines of executable code
A program has the following characteristics:
Up to 32 programs can be supported per task.
Programs within a task execute in sequence from first scheduled to last scheduled.
Program-scoped tags contain data that is used exclusively by the routines within an individual program:
Can have the same name in more than one program
Allows programming code to be copied and reused
Programs can be scheduled in specific tasks or left unscheduled. Programs that are “unscheduled” do not execute:
Original equipment manufacturers may create one project and then schedule or unschedule a program depending on the equipment’s required functionality.
Maintenance or field service technicians may create troubleshooting programs that are left unscheduled until needed to test a project.
Interpreting a Routine
A routine is a section of code written and executed as a group.
A routine can be assigned as one of the following types:
Main Routine: A routine that executes automatically when the controller triggers the associated task and program:
– Can be of any type
– Is marked with a 1 in the Controller Organizer
Subroutine: A routine that is called by another routine:
– Is called by a JSR (Jump to Subroutine) instruction in the main routine or another subroutine (conditioned or unconditioned)
– Returns to the other routine when complete or if a condition is met
Fault Routine: A routine that is configured to execute when the controller finds an instruction-execution fault within any routines in the associated program:
– Is marked with a yellow triangle in the Controller Organizer The main routine is always listed first, followed by a fault routine (if any), and then all subroutines in alphabetical order: