beautypg.com

11 program module compute shortest path – HEIDENHAIN TNC 335 Technical Manual User Manual

Page 323

background image


4-226

TNC 360

15 Tool Changer

8/95

15.3.11 Program module COMPUTE SHORTEST PATH

The program determines the direction in which the tool magazine must move in order to reach the
search pocket number by the shortest path.
The path is filed in marker M3042:

M3042 = 0: reverse
M3042 = 1: forward

NOMREG >

Save absolute

value from

ISTREG-NOMREG

difference to

ABSREG

No

Yes

No

Yes

Magazine

forward

Magazine

reverse

ISTREG

Divide number of

mag. pockets by

two and save to

MAGREG

Fetch search

pocket from data

stack to NOMREG

ABSREG >

MAGREG

End

ABSREG <

MAGREG

NOMREG <

ISTREG

No

Yes

No

M3042 = 1

M3042 = 0

Yes