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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.10 JO Jump if OV = 1<br />

Format<br />

Description<br />

Status word<br />

Example<br />

JO <br />

Address Description<br />

Symbolic name of jump destination.<br />

Logic Control Instructions<br />

If status bit OV is 1, JO interrupts the linear program scan and jumps<br />

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

jump destination is specified by a jump label. Both forward and backward jumps are<br />

possible. Jumps may be executed only within a block, that is, the jump instruction<br />

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

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

or +32767 words of program code. The actual maximum number of statements you<br />

can jump over depends on the mix of the statements used in your program (one-,<br />

two-, or three word statements). In a combined math instruction, check for overflow<br />

after each separate math instruction to ensure that each intermediate result is within<br />

the permissible range, or use instruction JOS.<br />

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

writes: - - - - - - - - -<br />

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

L MW10<br />

L 3<br />

*I //Multiply contents of MW10 by "3".<br />

JO OVER //Jump if result exceeds maximum range (OV=1).<br />

T MW10 //Program scan continues here if jump is not executed.<br />

A M 4.0<br />

R M 4.0<br />

JU NEXT<br />

OVER: AN M 4.0 //Program scan resumes here after jump to jump label OVER.<br />

S M 4.0<br />

NEXT: NOP 0 //Program scan resumes here after jump to jump label NEXT.<br />

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

A5E00706960-01 6-11

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

Saved successfully!

Ooh no, something went wrong!