Any VB Script Experts Out There?

TomS

Active User
H-M Supporter Gold Member
Joined
May 20, 2013
Messages
1,906
Found the attached XYZ auto zero script on the net. Supposed to auto zero X, Y and Z. I played with some of the settings to get it to work on my machine and it now zeroes the X and Z axis with no problems but I can't get the Y axis to work. My reference is the lower left corner. For the probe I have a 5/32" rod sticking out of a drill chuck. As I said it zeroes the X axis as it should. When that is done it moves in the correct Y axis direction to clear the X axis edge but the X axis does not move to position the rod to probe the Y edge. I've tried inputing code but I know absolutely nothing about VB script language. All I get is a script compiling error message.

Any help getting this resolved is hugely appreciated. Being able to zero all three axis would make setup much easier.

Tom S.
 

Attachments

  • XYZ Auto Tool Zero 01-20-2016.doc
    29 KB · Views: 10
Have you tried Probit? I am not sure how your 5/32" drill rod is setup as a probe or if it would work with Probit. If it does work, I think you will find Probit is a great piece of software with many probing scenarios available in a good UI.
 
Have you tried Probit? I am not sure how your 5/32" drill rod is setup as a probe or if it would work with Probit. If it does work, I think you will find Probit is a great piece of software with many probing scenarios available in a good UI.

I will look at Probit. I'm using a 5/32" rod because it's flexible in case the auto zero routine didn't work out. I didn't want to use something rigid and jam it into my material clamped in my vise. It's not really a probe. When it touches the material is completes the circuit back to the BoB and the axis stops then moves on to the next step.

Thanks,


Tom S.
 
I looked at Probit. It's a Mach3 add-on wizard for a CNC probe, which I don't have. Sure would like to get the XYZ script working.

For clarification here is a picture of my auto Z zero setter. The VB script I have been using for the Z axis allows me to press the Mach3 Auto Tool Zero button. It lowers the tool at a slow rate of feed until it touches the tool setter surface,which closes the circuit back to the BoB, then reverses and moves the tool up a preset distance. The XYZ script is supposed to do the same thing but as I said in my initial post above the Y axis is missing some code.

Tom S.

The tool setter is 2" x 2" x 1" thick. This is the top side that the cutter touches.
20161109_081514_resized.jpg
This is the bottom side that is insulated.
20161109_081557_resized.jpg
 
I spent the better part of an afternoon trying to find VB script that would work the way I described in my original post. Found a couple of videos showing it working but no script. So I came up with a workaround. I modified my Z tool setter as shown in the picture below.

I milled a notch that is 1" by 1". This is a picture of the bottom side. I place the tool setter on the lower left corner of my stock, position my probe (1/2" precision rod mounted in a collet), then start the auto zero program by clicking on the Auto Tool Zero button. The table moves in the X axis until the probe touches the tool setter then reverses and moves .250" in the opposite direction, then moves in the Y axis and does the same thing. The centerline of the probe is now 1.500" from the edge of my stock in the X and Y axis (.500" from edge of tool setter + 1.000" "leg" width). I now have a DRO reference for my XO and YO. At this point the script pauses so I can replace the probe with the end mill I'm going to use. I position the end mill about 3/4" to 1" above the tool setter and restart the script for the Z axis. The tool moves down, touches the tool setter and retracts in the Z+ direction .500". The tool setter is 1.000" thick so the end mill is now 1.500" above the stock. This entire process literally takes less than two minutes.

Tom S.
20170122_154905_resized.jpg
 
Back
Top