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.

Logic Control Instructions<br />

6.5 JCN Jump if RLO = 0<br />

Format<br />

Description<br />

Status word<br />

Example<br />

JCN <br />

Address Description<br />

Symbolic name of jump destination.<br />

If the result of logic operation is 0, JCN interrupts the linear program<br />

scan and jumps to a jump destination. The linear program scan resumes at the jump<br />

destination. The jump destination is specified by a jump label. Both forward and<br />

backward jumps are possible. Jumps may be executed only within a block, that is,<br />

the jump instruction and the jump destination must lie within one and the same block.<br />

The jump destination must be unique within this block. The maximum jump distance<br />

is -32768 or +32767 words of program code. The actual maximum number of<br />

statements you can jump over depends on the mix of the statements used in your<br />

program (one-, two-, or three word statements).<br />

If the result of logic operation is 1, the jump is not executed. The program scan<br />

continues with the next statement.<br />

BR CC 1 CC 0 OV OS OR STA RLO /FC<br />

writes: - - - - - 0 1 1 0<br />

<strong>STL</strong> Explanation<br />

A I 1.0<br />

A I 1.2<br />

JCN JOVR //Jump if RLO = 0 to jump label JOVR.<br />

L IW8 //Program scan continues here if jump is not executed.<br />

T MW22<br />

JOVR: A I 2.1 //Program scan resumes here after jump to jump label JOVR.<br />

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

6-6 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!