Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual

Page 46

Advertising
background image

Memory Organization

Chapter 4

4Ć8

User Program

The second major part of memory is the user program (Figure 4.2). It is divided
into two areas:

main ladder diagram program
subroutine area

The user program area begins at the end of the data table.

Main Program
Purpose: The program is a group of ladder diagram and functional block
instruction used to control an application.

Description: A program is a list of instructions that guides the processor. These
instructions can examine or change the status of bits in the memory of the
processor. The status of these bits determines the operation of output devices.

The program specifies the things you want done in your application and the
conditions that must be met before those things are done. For example, if you
want a solenoid energized when a limit switch is closed, you would specify:

Condition: If limit switch is closed
Action: Energize solenoid

Programming logic differs from relay logic in an important way. Programming
logic is only concerned with whether or not conditions have been met. These
conditions may be open or closed input or output devices. We must have a
continuous or unbroken path of true logic conditions for an action to be taken.
The number of conditions is not important. There can be none, one, or many
conditions preceding an output action.

When the path of conditions is continuous, we say that the rung is true. When
the path of conditions is not continuous, we say the rung is false.

Subroutine Area
Purpose: Used to jump to a defined ladder diagram area. This allows you to
perform ladder diagram subroutines.

Description: The subroutine area is between the main program and the message
store areas. This area acts as the end of program statement for the main
program. It allows storage of small programs that are to be accessed
periodically. Subroutine areas are not scanned unless you program the
processor to jump to this area.

A maximum of eight subroutines can be programmed in the subroutine area.
Each subroutine begins with a label instruction and (when you want to exit to
your main program) ends with a return instruction.

Advertising