Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Automating manufacturing systems with PLCs.2005.pdf
Скачиваний:
261
Добавлен:
23.08.2013
Размер:
5.34 Mб
Скачать

plc function ref - 34.30

SQO - SeQuencer Output

 

 

 

 

A

SQO

 

 

 

 

 

 

 

SEQUENCER OUTPUT

 

 

 

 

 

 

 

 

File

#N7:10

 

 

 

 

 

 

 

 

Mask

FF00

 

 

 

 

Dest

N7:0

 

 

 

 

 

 

 

 

Control

R6:0

 

 

 

 

Length

6

 

 

 

 

Position

0

 

 

 

 

 

 

Description:

When the input goes from false to true the sequencer will output a value

 

from a new position in the sequencer table. After the position has

 

reached the length the sequencer will reset to position 1. Note that the

 

first entry in the sequencer table will only be output the first time the

 

function is un, or if reset has been used.

Status Bits:

EN

Enable - will be true when the input to the function is true

 

DN

Done - will be set when the sequencer is fully loaded

 

ER

Error - will be set when there has been an error

Registers:

none

 

Available on: Micrologix, PLC-5

34.1.10 Program Control

EOT - End Of Transition

 

A

 

 

 

 

EOT

 

 

 

 

 

Description:

 

This function will cause a transition in an SFC. This will be in a program

 

 

file for an SFC step. When ’A’ becomes true the transition will end

 

 

and the SFC will move to the next step and transitions.

Status Bits:

 

none

Registers: none

Available on: PLC-5

plc function ref - 34.31

FOR, NXT, BRK - For, Next, Break

 

 

 

 

A

FOR

 

 

 

 

 

 

 

 

FOR

 

 

 

 

 

 

 

 

 

 

Label Number

0

 

 

 

 

 

 

 

Index

N7:0

 

 

 

Initial Value

0

 

 

 

 

Terminal Value

10

 

 

 

Step Size

2

 

 

 

 

 

 

 

B

 

 

 

 

 

 

 

 

BRK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C

NXT

 

 

 

 

 

NEXT

 

 

 

 

 

 

 

 

 

 

Label Number

0

 

 

 

 

 

 

 

Description:

Status Bits:

Registers:

This instruction will create a loop like traditional programming languages with a start and end value with a step size for each loop. Instructions between the FOR and NXT will be repeated. If the line with the BRK statement becomes true, the NXT command will be ignored.

none

none

Available on: Micrologix, PLC-5

plc function ref - 34.32

JSR/SBR/RET - Jump Subroutine / Subroutine / Return

 

 

 

 

 

 

 

A

 

JSR

 

 

 

 

 

 

 

JUMP TO SUBROUTINE

 

 

 

 

 

Program File

3

 

 

 

 

 

 

Input par

N7:0

 

 

 

Input par

N7:1

 

 

 

Return par

N7:10

 

 

 

Return par

N7:11

 

 

 

Return par

N7:12

 

 

 

 

 

 

 

 

 

 

 

B

 

SBR

 

 

 

 

SUBROUTINE

 

 

 

 

 

 

 

 

Input par

N7:20

 

 

 

Input par

N7:21

 

 

 

 

 

 

 

 

 

 

 

C

 

RET

 

 

 

 

RETURN()

 

 

 

 

 

 

 

 

Return par

N7:22

 

 

 

Return par

N7:23

 

 

 

Return par

N7:24

 

 

 

 

 

Description:

The JSR will jump to another program file and pass a list of arguments

 

that can be a variable length. The first statement in the subroutine pro-

 

gram file should be SBR to retrieve the arguments passed. The sub-

 

routine will end with the RET command that will go back to where the

 

JSR function was encountered. The RET function can return a vari-

 

able number of arguments.

Status Bits:

none

Registers:

none

Available on: Micrologix, PLC-5

plc function ref - 34.33

SFR - Sequential Function chart Reset

 

A

 

SFR

 

 

 

 

 

 

 

SFC RESET

 

 

 

 

 

 

Prog File Number 3

 

 

 

 

 

 

 

Restart Step At

 

Description:

 

 

 

 

 

This function will reset a SFC. In this example when ’A’ goes true the

 

 

SFC main program stored in program file 3 will be examined. All sub

 

 

programs will be examined, and then the SFC will be reset to the ini-

 

 

tial position.

Status Bits:

none

Registers:

none

Available on: PLC-5

UID, UIE - User Interrupt Disable, User Interrupt Enable

A

UID

B

UIE

Description:

Status Bits:

Registers:

This instruction is used to turn of interrupts. If ’A’ is true, then the following ladder logic will be run without interrupts. If ’B’ is true the interrupts will be reenabled. These instructions will only be of concern when using user programmed interrupt functions. These are normally only used when a critical process may be completed within a given time, or when the ladder logic between the UID and UIE conflicts with one of the interrupt programs.

none

none

Available on: PLC-5