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.

14.12 +AR2 Add ACCU 1 to Address Register 2<br />

Format<br />

Description<br />

Status word<br />

Example 1<br />

+AR2<br />

+AR2 <br />

Parameter Data Type Description<br />

Pointer constant Address added to AR2<br />

Accumulator Instructions<br />

+AR2 (add to AR2) adds an offset specified either in the instructionor in ACCU 1-L to<br />

the contents of AR. The integer (16 bit) is initially expanded to 2 bits with its correct<br />

sign and then added to the least significant 24 bits of AR2 (part of the relative<br />

address in AR2). The part of the area ID in AR2 (bits 24, 25, and 26) remains<br />

unchanged. The instruction is executed without regard to, and without affecting, the<br />

status bits.<br />

+AR2: The integer (16 bit) to be added to the contents of AR2 is specified by the<br />

value in ACCU 1-L. Values from -32768 to +32767 are permissible.<br />

+AR2 : The offset to be added is specified by the <br />

address.<br />

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

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

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

L +300 //Load the value in ACCU 1-L.<br />

+AR1 //Add ACCU 1-L (integer, 16 bit) to AR2.<br />

Example 2<br />

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

+AR1 P#300.0 //Add the offset 30.0 to AR2.<br />

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

A5E00706960-01 14-11

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

Saved successfully!

Ooh no, something went wrong!