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.

Logic Control Instructions<br />

6.3 JL Jump to Labels<br />

Format<br />

Description<br />

Status word<br />

Example<br />

JL <br />

Address Description<br />

Symbolic name of jump destination.<br />

JL (jump via jump to list) enables multiple jumps to be programmed.<br />

The jump target list, with a maximum of 255 entries, begins on the next line after the<br />

JL instruction and ends on the line before the jump label referenced in the JL<br />

address. Each jump destination consists of one JU instruction. The number of jump<br />

destinations (0 to 255) is taken from ACCU 1-L-L.<br />

The JL instruction jumps to one of the JU instructions as long as the contents of the<br />

ACCU is smaller than the number of jump destinations between the JL instruction<br />

and the jump label. The first JU instruction is jumped to if ACCU 1-L-L=0. The<br />

second JU instruction is jumped to if ACCU 1-L-L=1, etc. The JL instruction jumps to<br />

the first instruction after the last JU instruction in the destination list if the number of<br />

jump destinations is too large.<br />

The jump destination list must consist of JU instructions which precede the jump<br />

label referenced in the address of the JL instruction. Any other instruction within the<br />

jump list is illegal.<br />

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

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

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

L MB0 //Load jump destination number into ACCU 1-L-L.<br />

JL LSTX //Jump destination if ACCU 1-L-L > 3.<br />

JU SEG0 //Jump destination if ACCU 1-L-L = 0.<br />

JU SEG1 //Jump destination if ACCU 1-L-L = 1.<br />

JU COMM //Jump destination if ACCU 1-L-L = 2.<br />

JU SEG3 //Jump destination if ACCU 1-L-L = 3.<br />

LSTX: JU COMM<br />

SEG0: * //Permitted instruction<br />

*<br />

JU COMM<br />

SEG1: * //Permitted instruction<br />

*<br />

JU COMM<br />

SEG3: * //Permitted instruction.<br />

*<br />

JU COMM<br />

COMM: *<br />

*<br />

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

6-4 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!