What's new
What's new

Mazatrol Nexus - Bar Pull Loop Macro?

Isak Andersson

Aluminum
Joined
Nov 3, 2021
Hello. I'm trying to come up with a macro to automatically move a tool and use it as a stop once the bar is done when doing par-pulling work. I'm thinking if the main spindle chuck sensor reaches its end position, then we know the bar is done and we should position the stop and wait for the operator to load the next bar. The idea is to call this macro as a sub-program at the begging of all bar pull programs. So I'm guessing this is actually three questions in one, maybe more if I missed something.

1. Which system variable(s) keeps track of the chuck sensor(s)? I've looked for a complete list of variables but I couldn't find one. Any idea where to look?
2. How can I activate the currently active Mazatrol work offset in an EIA sub-program? Or maybe I don't need to because it's still active even In the sub-program?
3. How can I activate the tool offsets from tool data in an EIA sub-program?

This is the code I've come up with so far:

(IF THE MAIN SPINDLE CHUCK IS AT THE END POSITION. MOVE STOP)
IF [#****EQ0] GOTO 1 (**** = SYSTEM VARIABLE FOR CHUCK SENSOR?)
M99 (ELSE. BACK TO MAIN MAZATROL PROGRAM)

N1
(SELECT MAIN PROGRAM MAZATROL WORK OFFSET FROM SET-UP DATA IF NECESSARY)
(SELECT TOOL GENERAL OUT 25 D AND LOAD OFFSETS FROM TOOL DATA)
G00 X-2 Z1 (USE TOOL AS STOP FOR BAR)
M5 M202 M206 (OPEN MAIN SPINDLE CHUCK)
M00 (WAIT FOR OPERATOR TO LOAD NEXT BAR)
G00 Z5
M99 (BACK TO MAIN MAZATROL PROGRAM)

Am I on the right track here? If there are any easier solutions then please let me know, of course. Thanks!
 








 
Top