26.10.2012 Views

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Logic Control Instructions<br />

6.1 Overview of Logic Control Instructions<br />

Description<br />

You can use the Jump instructions to control the flow of logic, enabling your program<br />

to interrupt its linear flow to resume scanning at a different point. You can use the<br />

LOOP instruction to call a program segment multiple times.<br />

The address of a Jump or Loop instruction is a label. A jump label may be as many<br />

as four characters, and the first character must be a letter. Jumps labels are followed<br />

with a mandatory colon ":" and must precede the program statement in a line.<br />

Note<br />

Please note for S7– 300 CPU programs that the jump destination always (not for<br />

318– 2) forms the beginning of a Boolean logic string in the case of jump<br />

instructions. The jump destination must not be included in the logic string.<br />

You can use the following jump instructions to interrupt the normal flow of your<br />

program unconditionally:<br />

• JU Jump Unconditional<br />

• JL Jump to Labels<br />

The following jump instructions interrupt the flow of logic in your program based on<br />

the result of logic operation (RLO) produced by the previous instruction statement:<br />

• JC Jump if RLO = 1<br />

• JCN Jump if RLO = 0<br />

• JCB Jump if RLO = 1 with BR<br />

• JNB Jump if RLO = 0 with BR<br />

The following jump instructions interrupt the flow of logic in your program based on<br />

the signal state of a bit in the status word:<br />

• JBI Jump if BR = 1<br />

• JNBI Jump if BR = 0<br />

• JO Jump if OV = 1<br />

• JOS Jump if OS = 1<br />

<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />

A5E00706960-01 6-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!