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.

Load and Transfer Instructions<br />

9.8 LAR2 Load Address Register 2 with Double<br />

Integer (32-Bit Pointer)<br />

Format<br />

Description<br />

Status word<br />

LAR2 <br />

Address Data type Memory area Source address<br />

DWORD<br />

pointer constant<br />

D, M, L 0...65532<br />

LAR2 loads address register AR2 with the contents of the addressed double<br />

word or a pointer constant. ACCU 1 and ACCU 2 remain unchanged. The<br />

instruction is executed without regard to, and without affecting, the status bits.<br />

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

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

Example: Direct addresses<br />

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

LAR2 DBD 20 //Load AR2 with the pointer in data double word DBD20.<br />

LAR2 DID 30 //Load AR2 with the pointer in instance data double word DID30.<br />

LAR2 LD 180 //Load AR2 with the pointer in local data double word LD180.<br />

LAR2 MD 24 //Load AR2 with the pointer in memory double word MD24.<br />

Example: Pointer constant<br />

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

LAR2 P#M100.0 //Load AR2 with a 32-bit pointer constant.<br />

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

9-8 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!