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.

Accumulator Instructions<br />

14.11 +AR1 Add ACCU 1 to Address Register 1<br />

Format<br />

Description<br />

Status word<br />

Example 1<br />

+AR1<br />

+AR1 <br />

Parameter Data Type Description<br />

Pointer constant Address added to AR1<br />

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

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

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

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

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

status bits.<br />

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

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

+AR1 : 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 into ACCU 1-L<br />

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

Example 2<br />

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

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

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

14-10 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!