beautypg.com

HEIDENHAIN TNC 306 Technical Manual User Manual

Page 396

background image


7-106

TNC 416/TNC 406/TNC 306

Commands

3/2000

Example of the use of the SUBM command:
Dependent on Input I10 the subprogram with the Label LBL 300 is handed over to the NC for
processing. In addition, the execution of the subprogram is checked in the main program with the
RPLY command and canceled with the CAN command in conjunction with Input I11.

Line

Instruction

Program Comments:

1

L

I10

;Interrogate state of Input I10

2

JPF

100

;Dependent on Input I10 skip
;Call Module

3

RPLY

B 128

;Interrogate status of the Submit program

4

<>

K+0

;Submit program already transferred to
;the NC for processing ?

5

JPT

100

;If program already transferred to the NC,
;renewed program call skipped

6

SUBM

300

;Call up Submit program

7

=

B 128

;Store Identifier in Byte 128

8

LBL 100

;Jump address

9

L

I 11

;Interrogate state of Input I11

10

JPF

110

;Dependent on Input I11, skip the deletion
;of the Submit program

11

CAN

B 128

;Interrupt execution of the Submit program
;or remove program from the queue

12

LBL 110

;Jump address

;Continuation

;Main program

;

XX

EM

;End main program

XX

LBL

300

;Begin Submit program (is added as with Modules

XX

;at the end of the main program)

XX

;

XX

;

XX

EM

;End Submit program

In this case, the contents of the Submit program could, for example, be a display in the PLC
window, which can be done via a fixed PLC Module.

This manual is related to the following products: