PDA

View Full Version : Manual Tool Change



Kev2960
22-10-2017, 06:51 PM
Hi there, can anyone tell me where to get the script for manual tool change in mach3 to post into the VB editor?
Thanks Kev

m_c
22-10-2017, 07:34 PM
M6start and M6end macros control everything IIRC.

You also need to select the correct option in the main setup screen. I seem to remember top left corner, and gives the option to ignore, or pause on M6. I'd confirm that, however I've not got Mach3 installed on anything convenient just now.

Neale
23-10-2017, 11:49 AM
There are starting-point macros loaded with Mach3 so you should have them already - names as per m_c's post. You can then tweak these to suit your machine. There will be a set of machine-specific folders in c:/Mach3/macros, and I think that each folder gets pre-populated with the standard set of macros. I use a text editor as I'm not sure that you can really call the scripting language BASIC.

Kev2960
23-10-2017, 01:10 PM
Ok thanks for the replyís I think Iíve cracked it just need to tweak it a bit because when I put the next tool in it measures it but the z goes up too high

Neale
23-10-2017, 01:32 PM
Standard M6 macros don't do any tool height measurement. Can you say a bit more about what you are doing? Are you also doing tool height measurement with a touch probe during the tool change? Are you also using a motion controller?

Kev2960
23-10-2017, 01:36 PM
Yes tool measurement as well but havenít got that part done yet. It looked as if it was going to work but no luck so far

Kev2960
24-10-2017, 12:02 AM
No canít get the tool measurement part to work

m_c
24-10-2017, 12:28 AM
Have you searched over on the Mach forums for code?

It's not something I've ever done in Mach 3, but standard macros only run at a 10Hz refresh rate, so if you're relying on the macro to start/stop motion depending on the touchplate/probe input, then it won't work. You have to use the specific probing commands, but I'm not sure how they work where macros are involved.

Ger21
24-10-2017, 04:23 AM
It's not something I've ever done in Mach 3, but standard macros only run at a 10Hz refresh rate, so if you're relying on the macro to start/stop motion depending on the touchplate/probe input, then it won't work.

That info is incorrect. Macros run plenty fast enough, and in fact are used by thousands of people to auto zero there tools. The macro just calls the G31 move, and then retrieves the locations and sets the zero position.

Neale
24-10-2017, 09:22 AM
Indeed, the g31 gcode command causes a probing operation (unless you are using a CSMIO controller which has its own version plus an odd gotcha). Cnczone has plenty of examples if you can wade through a lot of dross to find them. I wrote my own height probing macros based on what I found there; I would be happy to post them but I have modified them to work with a CSMIO so they are not useful for non-CSMIO machines as they stand. I have three in the set - simple tool-height set, set tool height and then touch off fixed plate, touch off fixed plate for second-tool operation. I also have a tweaked first-page of the standard screenset to assign these to buttons.

Or you could contact Gerry/ger21 and buy his reasonably-priced and well-regarded 2010 screenset which has all these functions and more already built in. I wrote my own because I wanted an excuse to play with a bit of macro coding and screenset tweaking, not because they are any better.

Kev2960
24-10-2017, 10:38 AM
Iíve just been on YouTube and there are some interesting vids on there that I probably need to study

m_c
24-10-2017, 11:11 AM
That info is incorrect. Macros run plenty fast enough, and in fact are used by thousands of people to auto zero there tools. The macro just calls the G31 move, and then retrieves the locations and sets the zero position.

It is correct. Mach 3 macro refresh rate is 10Hz. If you need to detect an input pulse less than 100ms, then it cannot be guaranteed that a macro will detect the change, which is why you had to use PLC for many commercial tool changers.

However, as I'm sure you're well aware, when you call G-code from a macro, that is then handled by the main motion engine, so is not restricted by the 10Hz refresh rate. The macro simply stalls until the motion is complete.