Current Help System: Tutor Translator (View Core Help)

### Program Declaration

The command PROGRAM PrgName[E.WM1, E.WM2] it is translated with a label and the declaration of two element variables in the first valid position of the part program after the initial command:

STARTUP = ALIGNMENT/START,RECALL:, LIST = YES
ALIGNMENT/END

PROGRAM_PrgName = LABEL/
ASSIGN/E.WM1 = TUTORELEMENT (1)
ASSIGN/E.WM2 = TUTORELEMENT (1)

The names MEMORY,E.WM1 and E.WM2 can be replaced by others defined by the Tutor programmer.

Fly length initialization:

if the PC-DMIS part program is in metric mode.

ASSIGN/E.FLYLEN=30

if the PC-DMIS part program is in inch mode.

ASSIGN/E.FLYLEN=1.1811

Text file structure initialization:

ASSIGN/E.F0.PTR = "F0PTR"
ASSIGN/E.F0.NAME = "NONE"
ASSIGN/E.F0.OPEN = "NO"
ASSIGN/E.F1.PTR = "F1PTR"
ASSIGN/E.F1.NAME = "NONE"
ASSIGN/E.F1.OPEN = "NO"
ASSIGN/E.F2.PTR = "F2PTR"
ASSIGN/E.F2.NAME = "NONE"
ASSIGN/E.F2.OPEN = "NO"
ASSIGN/E.F3.PTR = "F3PTR"
ASSIGN/E.F3.NAME = "NONE"
ASSIGN/E.F3.OPEN = "NO"

ASSIGN/E.SELPL=E.ZPLUS

ASSIGN/E.BADMEAS=0
MODE/MANUAL

Every time the SELPL command is translated the value is store in the E.SELPL variable.

To simulate Tutor THEO functionality the TH table is declared and initialized:

ASSIGN/E.TH.X.N = 0

=CALLSUB/THEO_INIT,TutorSub.prg:E.TH,,,

To simulate Tutor Output Format table functionality the E.OFMT table is declared and initialized:

ASSIGN/E.OFMT.ON = 1

=CALLSUB/INIT_FORMAT_TBL,:E.OFMT,,

The command END_PROGRAM is translated with the declaration of the label, the command to print report if PRN command as been translated at least one time and the command to close already open file (if any):

END_PROGRAM= /LABEL

PRINT/REPORT,TO_FILE=OFF,AUTO=0,$
TO_PRINTER=ON,DRAFTMODE=OFF,$
PREVIOUS_RUNS=KEEP_INSTANCES

COMMENT/DOC,NO,=============== Close All files=======

=CALLSUB/TUTOR_CLOSE,TutorSub.PRG: E.OFMT,0,,,

ENDSTAT translates to è

GOTO/END_PROGRAM