Preparing the programs for your application – Rockwell Automation 1785-LTx,D17856.2.1 Classic PLC-5 Programmable Controllers Users Manual User Manual

Page 74

Advertising
background image

Planning Your System Programs

Chapter 6

6-3

Application Example for SFCs

For typical SFC applications, an SFC program controls the order of events
in your process by issuing commands. A command, such as

fwdcyr_cmd

to move a conveyor forward, is simply a data table storage bit (for example
B3:0/7) that you set up in the SFC. You then program the logic for

fwdcyr_cmd

in a separate ladder program to control the actual outputs to

move the conveyor.

You can have only one main program file, which is either an SFC or a
ladder-logic program. You enter the programs into your computer using the
SFC or ladder editor. For more information on entering SFCs or ladder
logic, see your programming software documentation set.

Programming Considerations for SFCs

Use the information in Table 6.B for SFC rules for special programming.

Table 6.B

SFC Rules for Special Programming Considerations

If you have:

Use these rules:

To jump within the SFC

Use a GOTO statement and label.

A step that needs to be run in

multiple places within the SFC

Repeat the step where needed or use a global subroutine that gets called

from multiple steps.

A step that can be ignored based on

logic conditions

Create two selection branches, one with and one without the step; or

place the step in a subroutine; or combine the step with another step that

is segregated by an MCR zone.

An SFC branch structure within

another branch structure (nesting)

Nest the branch structures. The software supports as many levels of

nested branches as you can store based on processor memory.

A miniĆSFC (compressed steps)

within the main SFC

Create an SFC macro. A macro begins a with a step; the transition for the

ending step follows the macro.

To reset the logic in an SFC program Set the SFR instruction to reset the chart.
To disable an MCP

Set the disable bit on the Processor Configuration screen.

See your programming software documentation for further information on any of the techniques listed in this table.

This section uses a drill-machine application example. Information on the
program entry phase is in the programming software documentation set.

You can use only one main program; but you can still apply some of
the steps by incorporating them into your main SFC and supporting
ladder programs.

Preparing the Programs

for Your Application

Advertising