script for probing.

More
12 Feb 2013 14:52 - 12 Feb 2013 20:59 #29932 by revo
script for probing. was created by revo
i have a script for probing with linux cnc. its to scan a surfboards.
i was wondering if someone can help me on how to use it. the guy that made it was supposed to teach me but hes missing in action and i need this to happen soon.
the scan file is located in for boardcad setting (the software to design the boards)

scanner.path = /home/redeyes/emc2/configs/stepper/

here is the script:
g21 
f1000 

(#1=433)       (x start) 
(#2=2366)      (x end) 
#3=20      (nr of segments; 20) 
#4=[[#2-#1]/#3]   (x step) 

#5=-461      (y center) 
#6=10      (nr of points; 10) 
#7=10      (y step) 

#8=400      (z safe) 
#9=10      (z probe) 

#10=0      (current x) 
#11=0      (current y) 
#12=0      (current z) 

#13=0      (previous z) 
#14=0      (step size y) 

#15=-10      (y safe) 
#16=100      (z probe outline) 

#18=1250   (x-value between support / approximately center of board) 



(search for tail and nose) 

g0 z#8 a45 
g0 x#18 y#5 

g38.2 z#9 

o6 while [0 lt #5070] 
   g38.4 x0 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o6 endwhile 

g0 x[#10-10] 
g38.2 x#18 

#1=[#10+5] 
#17=#5063    (start y, used for outline) 

g0 z#8 
g0 x#18 y#5 
g38.2 z#9 

o7 while [0 lt #5070] 
   g38.4 x3500 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o7 endwhile 

g0 x[#10+10] 
g38.2 x#18 

#2=[#10-5] 

#4=[[#2-#1]/#3]   (x step) 


#10=#1 
g0 z#8 
g0 x#1 y#5 

(PROBEOPEN scan.txt) 

g38.2 z#9 

g0 z#8 
g0 x[#10 + 20] 
g38.2 z#9 

o1 while [#10 lt [#2-#4/4]] 

   #10=[#10+#4] 
   g0 z#8 
   g0 x#10 

   g38.2 z#9 

o1 endwhile 

g0 z#8 
g0 x[#10 - 20] 
g38.2 z#9 


(PROBECLOSE) 



g0 z#8 

M2
Last edit: 12 Feb 2013 20:59 by BigJohnT. Reason: insert code tags
The following user(s) said Thank You: m8298

Please Log in or Create an account to join the conversation.

More
12 Feb 2013 21:02 #29946 by BigJohnT
Replied by BigJohnT on topic script for probing.
It seems to be labeled with enough information on how to use it. It doesn't seem to spell out where to position the probe to start so some experimentation might be needed. What part are you not clear on?

John

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 02:16 #29972 by revo
Replied by revo on topic script for probing.
Big J,


i have a surfboard shaping machine, its rig with suction cup, not a table so i never learn how to use it as a cnc.

i only cut surfboards with it so i dont even know how to cut a gcode on a flat piece of table.
i will learn eventually, maybe rig a removable table over the board holding setup.

so that being said, i never played with gcode really other than the board file.
i dont know where do i put the script for the machine to use,

now i imagine the probe will take points, where those points will be save and it what kind of file?

i need a basic, noob explanation on how to:

use the script

and also maybe a quick explanation on how to cut a circle on a cnc :) will start with something simple...

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 08:59 #29994 by BigJohnT
Replied by BigJohnT on topic script for probing.
A probe routine will save the coordinates of each probe to a text file when PROBEOPEN is used and the file is saved when PROBECLOSED is used. You can read the User manual for probing for more details.

The most simple is a straight line... using G1 next is G2 G3 for circles. The manual has some examples of that. I also have a G code tutorial on my web site .

Is this machine running as a CNC now? Do you have a photo of it?

John

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 09:22 #29997 by revo
Replied by revo on topic script for probing.
yes i have photos,
its a cnc that i have built for surfboards and work great but i am now interest to learn different things to do with it.

check it out and let me know what you think.
here is the you tube video link.

one is for hotwiring a surfboard blank and the other one is to shape the board with a router.





the machine on the video is ran with mach3 and smooth stepper but i want to learn to use linuxcnc and i am having hell of a time.

the main reason why ild like to use linuxcnc is to use the probe, the script was writing for linuxcnc and i habe another script to scan existing boards so it would really make my machine for efficient, i just never probe before and being beginner with linuxcnc, the whole thing is much to chew on.

i have been reading lots, all the manual but its so much at once, some outside help is needed at this point.


cheers and let me know your though on the videos!

revo

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 17:49 #30005 by revo
Replied by revo on topic script for probing.
if someone can take time to make this happen for me.
i will pay if it could be an option, please read my post for who is interested to make this hardware work.
the hardware already work with linuxcnc but i dont know how to do it.

here is the scanner used. its a photoelectric sensor.

here is a link on the product
www.ifm.com/products/us/ds/O1D100.htm

here is the machine using it


here is the software
www.boardcad.com (opensource)

i have all the script to make it work, the machine maker gave them to me but hes missing in action, he was supposed to help me setting it up but he probably doesnt have time. he was kind enougn to give me the script.

now here is the info i have on using it but i am way lost.
i need someone to step in. i will pay for time if that can be an option as this is a necessary option for my home made machine.

Taking measurements and typing them in by hand is very
time consuming. Using a CNC machine can both reduce time
and improve the accuracy of the measurements.
To take measurements with a CNC machine it has to be
equipped with a probe. The probe can be either mechanical
or optical, such as a laser probe.
The main difficulty is to setup the machine to measurements
of the board. BoardCAD expects the machine to firstmeasure the bottom of the board along the stringer, outline,
and for three cross sections (1' from tail, center, and 1' from
nose). Currently, no alterations are allowed regarding where
the measurements are taken and how the files are named.
Furthermore, the positions must be stored in separate files
named:
bottom.txt
outline.txt
bottomsection1.txt
bottomsection2.txt
bottomsection3.txt
The board should then be turned and measurements should
be taken along the stringer and for the cross sections. The
positions should again be stored separately in the following
files:
deck.txt
decksection1.txtdecksection2.txt
decksection3.txt
Getting the machine to take those measurements and store
them in the files typically requires some script in the
machine controller. How to write such a script is outside the
scope of this book. Further, the position of the probe must
be configured in order for BoardCAD to transform the
measurements into BoardCAD coordinates. This is done in
the shapebot.properties-file and described in Appendix A.
Once the machine is setup and the measurements have
been taken, creating a model in BoardCAD from those
measurements is very easy. The only thing we have to do is
to create a new scan template and then select "Read
scanned board" in the Scan menu. An example of a scanned
board is shown above.

11.4 Editing a scanned board
It is possible to edit a scanned board in two different ways,
either by editing the measured points and reestimating the
curves, or by directly editing the curves just like any board
model.
The measured points are stored as guide points and can be
edited just like any other guide point using the Guide Point
dialog. This is an effective way to remove outliers, i.e. points
that have large errors in the measurement. Such outliers
can be a result of either problems with the probe or for
example the presence of tail pads or straps on the board
when measurements were taken. In many cases these
points can simply be removed and a the curve can be fitted
again by selecting "Fit curve to guide points" in the Scan
menu.
Editing the guide points and reestimating the curves is also
necessary in order to set the thickness of the tail and nose.

11.5 Finding blank position
The scanner interface can also be used to show the position
of the blank in the machine. This is useful if no blank model
exists and you do not want to do a full scan of the blank.
Again, this functionality is supposed to be used togetherwith a script in the machine controller that finds the tail and
the nose of the boards and take measurements along the
stringer. Those measurements should be stored in a file
named scan.txt. Given that this file exists, the measured
points can be opened and visualized in BoardCAD using
"Open scanned blank position" in the Scan menu. The guide
points can be used when positioning the board before
generating g-code.

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 17:57 #30007 by revo
Replied by revo on topic script for probing.
to make things clear, i just setup linux cnc, i am still learning how to use it .
i dont know hal file and things like that yet.

just to make sur the if someone take this on i need some pretty basic explanation :)


cheers!

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 18:05 - 13 Feb 2013 18:28 #30008 by cncbasher
Replied by cncbasher on topic script for probing.
what scripts and linuxcnc setup files do you have ?
can you post , i'lll see if i can replicate your machine here

also sent you PM
Last edit: 13 Feb 2013 18:28 by cncbasher.

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 18:11 - 13 Feb 2013 20:30 #30010 by revo
Replied by revo on topic script for probing.
sure,

here the script to scan the surfboards (if you want to copy a existing board)
[color=#ff0000]g21 
f1000 

(#1=433)       (x start) 
(#2=2366)      (x end) 
#3=20      (nr of segments; 20) 
#4=[[#2-#1]/#3]   (x step) 

#5=-461      (y center) 
#6=10      (nr of points; 10) 
#7=10      (y step) 

#8=350      (z safe) 
#9=10      (z probe) 

#10=0      (current x) 
#11=0      (current y) 
#12=0      (current z) 

#13=0      (previous z) 
#14=0      (step size y) 

#15=-100   (y safe) 
#16=100      (z probe outline) 

#18=1250   (x-value between support / approximately center of board) 



O100 sub (subroutine find apex for cross section scan) 

   g38.2 z#9 

   o101 while [0 lt #5070] 
      g38.4 y#15 f5000 
      #10=#5061 
      #11=#5062 
      #12=#5063 
      g38.3 z[#12-50] f1000 
   o101 endwhile 

O100 endsub 



(search for tail and nose) 

g0 z#8 a45 
g0 x#18 y#5 

g38.2 z#9 

o6 while [0 lt #5070] 
   g38.4 x0 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o6 endwhile 

g0 x[#10-10] 
g38.2 x#18 

#1=[#10+5] 
#17=#5063    (start y, used for outline) 

g0 z#8 
g0 x#18 y#5 
g38.2 z#9 

o7 while [0 lt #5070] 
   g38.4 x3500 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o7 endwhile 

g0 x[#10+10] 
g38.2 x#18 

#2=[#10-5] 

#4=[[#2-#1]/#3]   (x step) 


#10=#1 
g0 z#8 
g0 x#1 y#5 

(PROBEOPEN bottom_rocker.txt) 

g38.2 z#9 

g0 z#8 
g0 x[#10 + 20] 
g38.2 z#9 

o1 while [#10 lt [#2-#4/4]] 

   #10=[#10+#4] 
   g0 z#8 
   g0 x#10 

   g38.2 z#9 

o1 endwhile 

g0 z#8 
g0 x[#10 - 20] 
g38.2 z#9 


(PROBECLOSE) 



g0 z#8 
g0 x#1 y#15 
g0 z#17 

#10=#1 

(PROBEOPEN outline.txt) 

g38.2 y#5    

g0 y#15 
g0 x[#10 + 20] 
g38.2 y#5 

o2 while [#10 lt [#2-#4/4]] 

   g38.4 z#8   (probe for apex)    
   #17=#5063 

   #10=[#10+#4] 
   g0 y#15 

   o8 if [#5061 GT #18] 
      g0 x#10 z[#17-80] 
   o8 else 
      g0 x#10 z[#17-40] 
   o8 endif 

   g38.2 y#5   (probe for outline) 

o2 endwhile 

g0 y#15 
g0 x[#10 - 20] 
g38.2 y#5 

(PROBECLOSE) 

g0 z#8 
g0 x[#1+304.8] y#5 

M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 

(PROBEOPEN bottomrail1.txt) 
g38.2 z#9 

o23 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o23 endwhile 

o3 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o3 endwhile 

(PROBECLOSE) 

g0 z#8 
g0 x[[#1+#2]/2] y#5 

M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 

(PROBEOPEN bottomrail2.txt) 

g38.2 z#9 

o24 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o24 endwhile 

o4 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o4 endwhile 

(PROBECLOSE) 


g0 z#8 
g0 x[#2-304.8] y#5 

M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 

(PROBEOPEN bottomrail3.txt) 

g38.2 z#9 

o25 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o25 endwhile 

o5 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o5 endwhile 

(PROBECLOSE) 

g0 z#8 


(finished scanning bottom) 
#8=400      (z safe) 
g0 z#8 

g0 x#2 y#5   (place probe over nose) 
M0      (wait for user to turn board) 
g0 x#1 y#5   (place probe over tail) 
M0      (wait for user to place board) 

g0 x#2 y#5   (place probe over nose) 
M1      (optionally wait for fine tuning) 
g0 x#1 y#5   (place probe over tail) 
M1      (optionally wait for fine tuning) 

(scanning deck) 

#10=#1 
g0 z#8 
g0 x#1 y#5 

(PROBEOPEN deck_rocker.txt) 

g38.2 z#9 

g0 z#8 
g0 x[#10 + 20] 
g38.2 z#9 

o11 while [#10 lt [#2-#4/4]] 

   #10=[#10+#4] 
   g0 z#8 
   g0 x#10 

   g38.2 z#9 

o11 endwhile 

g0 z#8 
g0 x[#10 - 20] 
g38.2 z#9 

(PROBECLOSE) 



g0 z#8 
g0 x[#1+304.8] y#5 

M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 

(PROBEOPEN deckrail1.txt) 
g38.2 z#9 

o33 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o33 endwhile 

o13 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o13 endwhile 

(PROBECLOSE) 

g0 z#8 
g0 x[[#1+#2]/2] y#5 
M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 


(PROBEOPEN deckrail2.txt) 

g38.2 z#9 

o34 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o34 endwhile 

o14 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o14 endwhile 

(PROBECLOSE) 


g0 z#8 
g0 x[#2-304.8] y#5 
M1       (wait if user wants to prepare board) 

O100 call 

g0 y[#5062+10] 
g38.2 y#5 

g0 z#8 


#10=#5061 
#11=#5062 
#12=#5063 

#7=[[#11-#5]/#6]   (y step) 


(PROBEOPEN deckrail3.txt) 

g38.2 z#9 

o35 while [ #5062 gt [#11-#7]] 
   g0 z#8 
   g0 y[#5062 - 3] 
   g38.2 z#9 
o35 endwhile 

o15 while [ [#5+#7/2] lt #11] 

   #11=[#11-#7] 
   g0 z#8 
   g0 y#11 

   g38.2 z#9 

o15 endwhile 

(PROBECLOSE) 

g0 z#8 

M2 

[/color]

and here is the script for blanks registration,
to help the machine operator know where the piece of foam is on the machine.
[color=#ff0000]g21 
f1000 

(#1=433)       (x start) 
(#2=2366)      (x end) 
#3=20      (nr of segments; 20) 
#4=[[#2-#1]/#3]   (x step) 

#5=-461      (y center) 
#6=10      (nr of points; 10) 
#7=10      (y step) 

#8=400      (z safe) 
#9=10      (z probe) 

#10=0      (current x) 
#11=0      (current y) 
#12=0      (current z) 

#13=0      (previous z) 
#14=0      (step size y) 

#15=-10      (y safe) 
#16=100      (z probe outline) 

#18=1250   (x-value between support / approximately center of board) 



(search for tail and nose) 

g0 z#8 a45 
g0 x#18 y#5 

g38.2 z#9 

o6 while [0 lt #5070] 
   g38.4 x0 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o6 endwhile 

g0 x[#10-10] 
g38.2 x#18 

#1=[#10+5] 
#17=#5063    (start y, used for outline) 

g0 z#8 
g0 x#18 y#5 
g38.2 z#9 

o7 while [0 lt #5070] 
   g38.4 x3500 f5000 
   #10=#5061 
   #11=#5062 
   #12=#5063 
   g38.3 z[#12-50] f1000 
o7 endwhile 

g0 x[#10+10] 
g38.2 x#18 

#2=[#10-5] 

#4=[[#2-#1]/#3]   (x step) 


#10=#1 
g0 z#8 
g0 x#1 y#5 

(PROBEOPEN scan.txt) 

g38.2 z#9 

g0 z#8 
g0 x[#10 + 20] 
g38.2 z#9 

o1 while [#10 lt [#2-#4/4]] 

   #10=[#10+#4] 
   g0 z#8 
   g0 x#10 

   g38.2 z#9 

o1 endwhile 

g0 z#8 
g0 x[#10 - 20] 
g38.2 z#9 


(PROBECLOSE) 



g0 z#8 

M2 [/color]
Last edit: 13 Feb 2013 20:30 by BigJohnT. Reason: add code tags

Please Log in or Create an account to join the conversation.

More
13 Feb 2013 18:13 #30011 by revo
Replied by revo on topic script for probing.
here is the boardcad manual, there is a bunch of info on how to scan and use the script and were to put the files.

www.boardcad.com/boardcad_book.pdf

Please Log in or Create an account to join the conversation.

Time to create page: 0.313 seconds
Powered by Kunena Forum