beautypg.com

2 global instruction 7-132, 2 global instruction – HEIDENHAIN TNC 407 (243 020) Technical Manual User Manual

Page 593

background image


7-132

TNC 407/TNC 415/TNC 425

3 Commands

01.98

Example:

USES

PLCMOD1

;module depends on MP4010 from RAM or EPROM

USES

EPRUPG

;

USES

RAMPLC

;

Example of file linking:

PLCMAIN.PLC
;main program
USES

SPINDEL.PLC

USES

TCHANGE.PLC

;code

TCHANGE.PLC

SPINDEL.PLC

;tool change

;spindle control

USES

PLCUPG.PLC

USES

PLCUPG.PLC

;code

;code

PLCUPG.PLC
;general subprograms
;Code

3.19.2 GLOBAL Instruction

Up to 1000 local jump labels can be defined in each of the files linked with USES.
Modules defined in one file must be defined globally before they can be called from another file.
This is done with the GLOBAL instruction at the beginning of the file.
Jump labels can only be defined globally when they are defined as LBL later on in the program (and
not as KFIELD!).

Syntax:

GLOBAL

jump label

;declaration of "jump label" beyond the file boundary

GLOBAL definitions must not be written in the main program. A single jump label cannot be
declared globally by more than one module, however a name that has been declared globally by file
A can be used again locally in file B.
In all, 1000 jump labels can be defined globally by all modules.