beautypg.com

Module technique, 2 module technique – HEIDENHAIN TNC 306 Technical Manual User Manual

Page 303

background image


3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-13

2.1.2 Module technique

It is good practice to make the maintenance of the PLC-programs easier by creating the program
with the most transparent structure possible. This can be best achieved by dividing the PLC-program
into individual Modules (structured programming).

Only the most important PLC-functions should be programmed in the main routine.

Individual PLC-functions such as M-function evaluation are programmed in their own Modules.

0

L M2719

1

SN M2719

;Activate the strobes for word processing

2

L M2497

3

SN M2497

;Activate the edge evaluation

4

L M2496

5

SN M2496

;Activate transfer of decoded M-codes
;(M1900 to M1999)

.

.

.

.

.

.

20

L M1936

;M-Function M36

21

A M2045

;Change-signal for M-function

22

AN M2618

;Gap control already active?

23

CMT 36

;Gap control

.

.

.

.

.

.

.

.

.

95

EM

;End main program

122

LBL 101

;Acknowledgment for M function

.

.

.

.

.

.

125

EM

.

.

.

.

.

.

.

.

.

151

LBL 36

;Gap control

152

CM 361

;Eroding ON

153

CM 101

Acknowledgment for M functions

154

EM

.

.

.

.

.

.

.

.

.

.

220

LBL 361

;Eroding ON

.

.

.

.

.

.

.225

EM

.

.

.

.

.

.

Error conditions in the machine should be interrogated in the PLC-program and a plain language error
message should be displayed on the screen. See Chapter "Machine integration", Section "Display
and operation" and Chapter "PLC-programming", Section "Modules".

This manual is related to the following products: