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.18 JUO Jump if Unordered<br />

Format<br />

Description<br />

Status word<br />

Example<br />

JUO <br />

Address Description<br />

Symbolic name of jump destination.<br />

Logic Control Instructions<br />

If status bits CC 1 = 1 and CC 0 = 1, JUO 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 />

Status bits CC 1 = 1 and CC 0 = 1 when<br />

• A division by zero occurred<br />

• An illegal instruction was used<br />

• The result of a floating-point comparison is "unordered," that is, when a invalid<br />

format was used.<br />

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

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

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

L MD10<br />

L ID2<br />

/D //Divide contents of MD10 by contents of ID2.<br />

JUO ERRO //Jump if division by zero (that is, ID2 = 0).<br />

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

A M 4.0<br />

R M 4.0<br />

JU NEXT<br />

ERRO: AN M 4.0 //Program scan resumes here after jump to jump label ERRO.<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-19

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

Saved successfully!

Ooh no, something went wrong!