Hello Guest it is December 07, 2019, 11:07:39 AM

Author Topic: Creating a Probe File  (Read 6108 times)

0 Members and 1 Guest are viewing this topic.

Re: Creating a Probe File
« Reply #10 on: May 19, 2014, 02:36:59 PM »
you dont have to script a thing I just did it to create a text file of the probed points
I'm looking at it for a future point cloud scanning routine.

that's what the probing routine was all Gcode, then I ran it as a regular program. Do believe that the button script can call the gcode file, load it, run it and move the machine to where you want to be left at and then have it set the DRO's to whatever you programmed in the code for it to be. So on a hole it might be centered 1" above the face of the part (X0Y0Z1) all done with variables.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #11 on: May 19, 2014, 03:48:13 PM »
I use it like this:
first you have to create a reg variable name and know the path
then fill it with something

    local Xval = mc.mcAxisGetPos(inst,0);
    WriteReg("iRegs0/Xvalue", Xval);

then go get it with something like this

    local hXval = mc.mcRegGetHandle(inst, "iRegs0/Xvalue");
    local Xval = mc.mcRegGetValue(hXval);

so you would have to pass the trip points into a register then read the register



I am still lost Was THE ABOVE QUOTE  part of what you did to make it all work ??  


Something needs to OPEN the SavedPoints file (M40 #4000 =0) , ( AND it ALWAYS opens in a specific Directory, C:\\Mach4Hobby\\Points Files )

YOU need to see IF the probe tripped (#*********x = 0/1) to continue or error(#3000 = x , Probe reached Endpoint)

Something needs to write the Trip points to file (Mxx?) on demand
   OR automatically write to file on trip.  (For Example #4000 = 0 /Auto OFF   #4000 = 1 /Auto ON)

Something needs to CLOSE the SavedPoints file (M41)
« Last Edit: May 19, 2014, 03:58:41 PM by BR549 »

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #12 on: May 19, 2014, 04:07:11 PM »
I forgot to add that Mach4 must update the #5061-5064 vars on trip.
Re: Creating a Probe File
« Reply #13 on: May 19, 2014, 04:24:23 PM »
 ???
have no idea what your referring too
here is a snippet of the probing code
you sure your not sniffin flux?  :-X
that code you posted has to do with reading and writing to registers.
that's what I used for the wizzard I created
I think I kind of mixed you up when I answered Gerrys question when it really had nothing to do with the probing routine. Sorry

g61
#98 = 50 (rough probe speed)
#97 = 5 (fine probe speed)
g91
g01 z0.0
g31 y-1 f#98
g01 y.1
g31 y-.2 f#97 (Get the -Y Pos)
#102 = #5062
g0 y.1
g31 y2 f#98
g01 y-.1
g31 y.2 f#97 (Get the +Y Pos)
#103 = #5062
#104 = [#102 + [#103-#102]/2]
g90 g0 Y#104

« Last Edit: May 19, 2014, 04:33:22 PM by Ya-Nvr-No »

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #14 on: May 19, 2014, 04:36:08 PM »
NO sniffing but I have been throwing rocks at LUA. The dust must be effecting my PEE BRAIN.   :o


OK but in the example you are not opening, writing to and closing the Points files. From your example I can assume that the Writing to the Trip point registers WORK in mach4 ?

#5061-#5066

When I try to OPEN a points file I get a Call " call name" <nil> error and that normally means there is NO such call AND I do not see that call in the list.

Nor do I see a #var for the trip condition, But I do see a signal call for the trip condition but you cannot use that in Gcode.

Probably best for me to WAIT for a working Mach4 instead OF THE demo(sim) VERSION.

(;-) TP
« Last Edit: May 19, 2014, 04:38:17 PM by BR549 »
Re: Creating a Probe File
« Reply #15 on: May 19, 2014, 04:46:25 PM »
haven't f'd with trying to open a points file as of yet. So can't help ya there.

I don't open a thing just run the code and tell it what to do with the point variables.

I have never gotten the Sim to work when it comes to probing. And I have tried every way that I though might work.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #16 on: May 19, 2014, 05:00:34 PM »
I am dragging out an old Mach3 PC and getting it ready for Darwin.  Hopefully THEN I can set up a manual switch to control the probe function.

I Don't think that probe emulation works in the SIM. Doesn't here.

(;-) TP

Re: Creating a Probe File
« Reply #17 on: May 22, 2014, 03:42:22 PM »
TP/guys/gals you all like to look at data and B---ch, here is a probing routine I wrote for checking a 3" id
It does move to the center using Darwin and a Renishaw/wire modified probe
no ball diameter or other variables are used other than what you find in the tap file.

there are 8 captured variable files used, the columns in the spreadsheet show just what was being saved and used after each (num in the tap file)
BTW: used Nicks program to create the variable files, Thanks Nick, very functional

here is the tap file and spreadsheet of variables

It probed the circle and moved to the center as well as i could tell.
We are missing tons of Fanuc variables to be truly effective but it did work.
And though it can probe I had to run this in single block as there are some issues running in auto.
I added the g4p2 to give me a block/line of code to write the variables to the file.

I put my original 4 axis router (8020 w/Nema 34 steppers) back together to help me create the Probing routines for Darwin/PP driver. :P
Still works fine and took no time to setup with Darwin. Anybody need a router?  ;D

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #18 on: May 22, 2014, 04:15:48 PM »
Looks Good Craig,  You do not need probe tip comp with a center of routine the radius compensated ITSELF from both sides of the hole. YOU would need it IF you were looking for hole diameter as well.  In mach3 we had probe tip comp that worked very well. maybe we will get lucky in Mach4(;-)

 We do need the error codes setup #3000 and LOT more #vars  . ALSO we need the trip point value brought out to a #var. THERE IS a signal call for that(;-).

 Without the error traps it would be easy to mis program the probing length of an axis and cause the center of hole to be offcenter.

Question IF you let the probe run to the END POINT does it write the endpoint values.

You could use the   Last_output_X (#5002) to check against BUT it  outputs Machine Corrds at this point. BUT it does work with the G31 moves just ion Machine coords not work coords.

(;-) TP

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Creating a Probe File
« Reply #19 on: May 22, 2014, 04:20:51 PM »
OK now convert it to a G65 parametric macro so it can be called on demand and programed on the fly.  Can you send the centerpoint or diameter values to the Last Error Line ? good for Operator reference(;-).

Mach4 does have potential (;-)

(;-)TP