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.

Program Control Instructions<br />

10.17 )MCR End MCR<br />

Format<br />

Description<br />

Status word<br />

Example<br />

Important Notes on Using MCR Functions<br />

)MCR<br />

)MCR (end an MCR area) removes an entry from the MCR stack and ends an MCR<br />

area. The last MCR stack location is freed up and set to 1. The instruction MCR(<br />

must always be used in combination with the instruction )MCR. Execution of an<br />

)MCR instruction with the stack empty produces a MCR Stack Fault (MCRF).<br />

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

writes: - - - - - 0 1 - 0<br />

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

MCRA //Activate MCR area.<br />

A I 1.0<br />

MCR( //Save RLO in MCR stack; open MCR area. MCR = "on" when RLO=1 (I 1.0 ="1");<br />

MCR = "off" when RLO=0 (I 1.0 ="0").<br />

A I 4.0<br />

= Q 8.0 //If MCR = "off", then Q 8.0 is set to "0" regardless of I 4.0.<br />

L MW20<br />

T QW10 //If MCR = "off", then "0" is transferred to QW10.<br />

)MCR //End MCR area.<br />

MCRD //Deactivate MCR area.<br />

A I 1.1<br />

= Q 8.1 //These instructions are outside of the MCR area and are not dependent upon<br />

the MCR bit.<br />

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

10-22 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!