Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: npalen on December 01, 2017, 12:05:56 PM

Title: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 01, 2017, 12:05:56 PM
Mach3 has the digitizing plugin which will probe a grid and create a point cloud file as many of you probably know.
I'm wondering if there is a similar digitizing routine "out there" that does the same except after tripping the probe it will simply raise a few thou and then move to the next point on the grid and repeat the process.
This is opposed to returning to Z0 after each hit which wastes a lot of time especially if the item being probed has a lot of depth.
Would anyone know where I might find such a digitizing plugin? 
I think that ShotBot has it but it's proprietary. 
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: garyhlucas on December 01, 2017, 12:51:35 PM
How would mach 3 know that the next horizontal move won’t be a crash into a higher surface?
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 01, 2017, 03:41:08 PM
The next higher surface would trip the probe immediately when contacting.  The the X axis would raise a preset amount and then attempt to move laterally again. This would repeat until X moved a preset amount without tripping the probe and then the scenario repeats. 
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 01, 2017, 03:57:15 PM
https://www.youtube.com/watch?v=XjFp0wgvox0

An example
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 01, 2017, 04:02:01 PM
https://www.youtube.com/watch?v=kAHTxzzz91A

Mach3 probing routine with its wasted motion.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: ger21 on December 01, 2017, 06:21:17 PM
In Mach3, load the Digitizing Wizard.
Try this.
Go to Operator > Edit Button Script, and click the "Create and Load G-code" Button. TheMach3 script editor should open, with the Wizard code.

Find these two lines:

code " G31 Z" & Min
code " G0 Z" & Safe

and replace them with

code " G31 Z" & Min
code " G91"
code " G0 Z0.005"
code " G90"

In the Script Editor, go to File > Save, and close the editor.
The modified wizard should now lift the probe .005" after each probe move. Adjust the value as needed (Z0.005)

Test carefully, as I haven't checked to see if this works.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 01, 2017, 11:09:52 PM
Many thanks, Gerry!  Will work on this and see what we come up with.  I'm very excited as have been looking for this for several years now.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: ger21 on December 02, 2017, 06:29:51 AM
It probably should be like this:

code " G31 Z" & Min
While IsMoving()
Wend
code " G91"
code " G0 Z0.005"
While IsMoving()
Wend
code " G90"
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 02, 2017, 02:19:42 PM
That seemed to work!!!!
Now after running it once I'm unable to get a new probing routine program to load over into Mach3.
Any thoughts on how I can fix that?
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 07, 2017, 06:10:37 PM
I downloaded a new copy of Mach3 to get the digitizing plug-in to work again. 
Would still like to modify the script to allow the retract for only a short distance before the probe moves to the next "hit".  This would make a great difference in the time it takes to digitize a large object such as an archtop guitar plate.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: ger21 on December 07, 2017, 10:29:00 PM
Are you talking about the plugin, or the wizard?
Didn't the code I posted fix the wizard?

From memory, I seem to recall that the plugin was broken, and was never fixed.?
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 07, 2017, 10:58:12 PM
I'm talking about the digitizing wizard. 
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 07, 2017, 10:59:57 PM
The code you posted fixed the wizard and I was able to run one sequence to prove it.  Then, on a second try, it would not post over to Mach3.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 08, 2017, 05:01:13 PM
Would sure like to get it working.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: ger21 on December 08, 2017, 07:01:17 PM
I don't know why it doesn't work more than once.
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 08, 2017, 07:45:23 PM
Yes, it seems strange that it won't post over to Mach3 after one run.  Must be something in the code that needs a reset?
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 10, 2017, 12:25:14 PM
This is what I get when trying to debug the modified file:
Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: ger21 on December 10, 2017, 12:30:39 PM
you're missing a " after

code " G0 Z0.25

It should be

code "G0 Z0.25"

Title: Re: Digitizing Point Cloud Or "Bed of Nails" type
Post by: npalen on December 10, 2017, 08:48:25 PM
I did get that corrected but am unable to get the digitizer to post any code to mach3.  Can you try it there on your end to see if it will work for you?
Thanks for your help.