Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Poppey_au on February 25, 2017, 05:17:04 AM

Title: How do I home the ATC
Post by: Poppey_au on February 25, 2017, 05:17:04 AM
Hi
How do I home my ATC?
It is an 8 tool ATC for Mach3 Turn.
Activate cylinder is M7
Stepper motor is A
The home switch for A axis motor is set at tool 0.
Title: Re: How do I home the ATC
Post by: Tweakie.CNC on February 25, 2017, 07:43:01 AM
There is more than one way but I would write a VB (Cypress Enable) routine which basically does the following…

Check the home switch and if activated then exit if not then index ATC.
Repeat the operation.

The routine could then be placed in a Macro and called from within Gcode and / or placed in a screen button and executed upon button click.

Tweakie.
Title: Re: How do I home the ATC
Post by: Poppey_au on February 26, 2017, 02:25:06 AM
Thank you Tweakie
Will this work?
'ATC Home

Code("M7")         'Unlock tool changer turret
Sleep(1000)               'Wait to unlock

SingleVerify(3)         'Home A axis, 3 = A axis
 
Sleep(20000)         'Wait for some time

Code("M9")       'Lock tool changer turret
Sleep(1000)               'Allow to lock


Then I put it into the macro folder, but how do I assigne a G code or buttom?
Gaute
Title: Re: How do I home the ATC
Post by: Tweakie.CNC on February 26, 2017, 03:41:42 AM
Hi Gaute,

The code required is Cypress Enable, which is a variation of VB so you need to make some alterations to your proposed code for it to work.
The Mach3 Scripter  (Operator / VB Script Editor) should help you compile suitable code and hopefully it will flag any errors etc.

The following documents may be of assistance to you :

http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf

http://www.machsupport.com/forum/index.php?action=dlattach;topic=9312.0;attach=6986

http://www.machsupport.com/forum/index.php?action=dlattach;topic=11056.0;attach=14194

http://www.machsupport.com/forum/index.php?action=dlattach;topic=11061.0;attach=14193


Tweakie.