691
VB and the development of wizards / Re: Mach3 machine material surface ZERO script
« on: April 11, 2013, 04:14:16 AM »
Andre,
How are you running this code? Is it button code attached to the set tool zero button? I have found it very hard to make this work properly. As an alternative, you could try the following. Copy your code into Notepad; save it as a Mach3 macro, i.e. with the file extension .m1s, in the Macros folder in the Mach3 directory, making sure to avoid the macro numbers up to 100 that are used internally. You could for example save it as M900.m1s which is the filename I used. Now the button script you need to call this is just Code"M900". I used this approach and it works just fine.
I'm not sure you need the "Exit sub" line at the end of your code - this doesn't seem to be a requirement for Cypress Basic.
And just a thought, trying to zero a tool onto a workpiece by eye is very hard as you have found out. Much better is to slow jog onto a feeler gauge until it is just nipped between the tool and the material. But probing is even better!
I've now got scripts on all the tool setting buttons that call probing macros in this way for setting tool height and also X and Y references, and they work fine.
John.
How are you running this code? Is it button code attached to the set tool zero button? I have found it very hard to make this work properly. As an alternative, you could try the following. Copy your code into Notepad; save it as a Mach3 macro, i.e. with the file extension .m1s, in the Macros folder in the Mach3 directory, making sure to avoid the macro numbers up to 100 that are used internally. You could for example save it as M900.m1s which is the filename I used. Now the button script you need to call this is just Code"M900". I used this approach and it works just fine.
I'm not sure you need the "Exit sub" line at the end of your code - this doesn't seem to be a requirement for Cypress Basic.
And just a thought, trying to zero a tool onto a workpiece by eye is very hard as you have found out. Much better is to slow jog onto a feeler gauge until it is just nipped between the tool and the material. But probing is even better!
I've now got scripts on all the tool setting buttons that call probing macros in this way for setting tool height and also X and Y references, and they work fine.
John.