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 bar-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!
 
Last edited:
The system variables are in the EIA programming manual. section 14. It also has description of sending any input signals to a variable which your macro could call. If you can find the signal here is how you can use it.
 

Attachments

  • macrovariables.pdf
    180 KB · Views: 10
Thanks, guys for sending me the manuals. Huge help. However, I still have some issues to figure out.

It seems that the R16001 register is keeping track of the chuck sensors on my machine.
bit6: main chuck open.
bit8: sub chuck open.
bit9: sub chuck closed.

So it would make sense that bit 7 is for main chuck closed but instead I'm getting error 215: Chuck System Malfunction and I don't see any bits change once the sensor goes off. Any idea what the issue could be?
 
You may want or have to adjust your chuck sensors at back near hydraulics. Maybe its not lighting up also?
 
Edited:
Disregard what I said earlier. Obviously, the RB1 bit1 parameter changes the behavior of the R16001 register. So with RB1 bit1 set to zero, it uses a timer instead of the proximity switches. I was hoping I could still monitor the switches somehow but it seems I can't. Please correct me if I'm wrong.

So now I'm back at square one. The problem being that as soon as the chuck tries to clamp on nothing it immediately goes to error 215 so I don't get a chance to monitor the switch. Very annoying.
 
Last edited:








 
Back
Top