16-4Using Main Control Programs

In this Field

Do the Following

Status File

Program file

Specify the program file numbers for MCPs A-P and the order in which the

S:80-S:127

 

MCPs should be run. This configuration is read before the MCP is executed; if

 

 

you make a change to the configuration screen regarding an MCP, that change

 

 

takes effect on the next execution of the MCP. You can change the MCP

 

 

information on the Controller Configuration screen or through ladder logic.

 

 

If you specify an MCP file that does not exist or is not a ladder-logic program,

 

 

structured-text program, or SFC file, a major fault is logged in the status file. A

 

 

minor fault is also logged if all MCP program files are set to zero.

 

 

You can have the same program file number specified more than once as an

 

 

MCP. For example, you may want a program to execute frequently and have a

 

 

higher priority over other programs.

 

 

If you do not want to use multiple main programs, program an SFC (program

 

 

file 1), ladder-logic program (program file 2), or structured-text program

 

 

(program file 2) and the controller will execute your main program. You do not

 

 

need to make any entries on the Controllerr Configuration screen (the

 

 

controller automatically enters the first configured program file number in the

 

 

first MCP entry).

 

 

 

 

Disable

By setting or resetting the bit in these fields, you tell the controller to skip over

S:79

 

the MCP until the bit is reset. If an MCP program file is inhibited, the controller

 

 

skips the file and goes to the next program file.

 

 

ATTENTION: If you disable an MCP, outputs remain in the state that they

 

 

were in during the last scan (i.e., all actions remain active). Make sure that

 

 

you consider any outputs that might be controlled within that MCP before

 

 

disabling it. Otherwise, injury to personnel or damage to equipment may result.

 

 

Disable an MCP if you temporarily want to hold a machine state, regardless of

 

 

transitions (for example, in machine fault conditions). Disabling an MCP also

 

 

can help improve scan time; if you know you don’t need to run one of your

 

 

MCPs every scan, you can disable it until you need it.

 

 

To set and reset the bits for Main Control Programs A-P, cursor to the

 

 

appropriate field and type 1 to disable (skip) this MCP or 0 to enable (scan) this

 

 

MCP.

 

 

If the disable bit is set for all the MCP program files (which indicates that all

 

 

control programs are to be skipped), a minor fault is logged in the controller

 

 

status file.

 

 

 

 

Skip I/O update

A 1 in this field tells the controller to skip the I/O scan after this MCP. The

S:78

 

default 0 tells the controller to perform the I/O scan after the corresponding

 

 

MCP.

 

 

To specify the I/O bit, cursor to the appropriate field and enter 0 or 1.

 

 

 

 

Publication 1785-UM012D-EN-P - July 2005

Page 256
Image 256
Bradley Smoker PLC-5 user manual This Field Do the Following Status File