06.08.2013 Views

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.11 Stack Operations<br />

It should be noted that with Stack operations all read/write operations on the Data Stack take place<br />

according to the LIFO principle (Last In – First Out).<br />

3.11.1 Load Data onto the Data Stack (PS)PS<br />

Abbreviation for PLC Editor: PS (PUSH)<br />

Logic Byte/Word Double Constant<br />

Execution time [µs] 4.2 5.4/5.0 5.5 4.2<br />

Number of bytes 24 26 22 24<br />

Logic Execution with the PS Command<br />

Operands: M, I, O, T, C<br />

Operation:<br />

With the PS command, data can be buffered. Thus the addressed operand is loaded onto the Data<br />

Stack. Since the Data Stack is organized as 16 bit, a minimum width of one Word must be used in<br />

writing to it. During this the operand value is copied into bit 7 of the current address in the Data<br />

Stack. The free bits of the reserved memory are undefined or unused. In the event of a Stack<br />

overflow, an error message will be issued.<br />

Memory allocation in the Data Stack:<br />

Word Execution with the PS Command<br />

Operands: B, W, D, K<br />

Bit 15 7 0<br />

x x x x x x x x L x x x x x x x<br />

Operation:<br />

With the PS command, data can be buffered. Thus the addressed memory area (B, W, D, K) is<br />

copied into the current address of the Data Stack. With Word execution, two Words are reserved as<br />

standard on the Data Stack per PS command. The operand is extended in the Stack with sign<br />

justification corresponding to the MSB. In the event of a Stack overflow, an error message will be<br />

issued.<br />

Memory allocation in the Data Stack upon saving of:<br />

Bit 31 15 7 0<br />

Byte XXXXXXXXXXXXXXXX XXXXXXXXBBBBBBBB<br />

Word XXXXXXXXXXXXXXXX WWWWWWWWWWWWWWWW<br />

Doubleword D D D D D D D DDDDDDDDD DDDDDDDDDDDDDDDD<br />

Constant KKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKK<br />

8/95 <strong>TNC</strong> <strong>360</strong> 3 Commands 7-89

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

Saved successfully!

Ooh no, something went wrong!