sensing program zero - Page 2


Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: sensing program zero

  1. #21
    Member Fastest1's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4415
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    Charlie, I hope you are still monitoring this ;-) Should I delete the second probe in my user variables? Or is there harm in having both listed but no values on the second one?
    I have copied and pasted all of the gcodes and macros I have seen here but nothing works as a center finder. I wonder if there are user variables that I am not filling in properly? In regards to the files for different probing routines, are these only kept as a gcode or is there a way to install them as routines or selections from the FC pages?
    Quote Originally Posted by charliex View Post
    add it like this


    A lazy man does it twice.


  2. #22
    Member Fastest1's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4415
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    Is this the center finding routine?
    If so when I run it, there is a dialog box at the end of the process that shows 2 different decimals.
    They appear to be the amounts of correction needed in the X and then Y axis to be at dead center.
    Can anyone verify this?
    Quote Originally Posted by charliex View Post
    Code:
    N100 GLOBAL REAL #XC #YC #ZC
    N102 GLOBAL REAL #PX #PY #PX1 #PY1 #PX2 #PY2 #CX #CY #RAD #STEP
    N103 GLOBAL REAL #DXDY
    N103 GLOBAL REAL #DXDY1
    
    N104 (Switch to imperial)
    N106 G20
    
    N108 (switch to the touch probe, set your tool as needed)
    N110 M06 T100
    
    N112 (Go to Program X0Y0)
    N114 G01Y0X0F5
    
    N116 G31 X-1 I7 S1 E0 F1
    
    N118 G01 X#Program.X/2 Y0 F5
    
    N122 (search Y axis to -1 at feed rate of 1 input line 7)
    N124 G31 Y-1 I7 S1 E0 F1
    
    N126 (First point is Program.X.Program.Y)
    N128 #PX = #Program.X
    N130 #PY = #Program.Y
    
    (N131 M00 #PX & " " & #PY
    
    N132 (Step back slightly to take probe off surface)
    N133 G01 X#Program.X/3 Y#Program.Y/2 F5
    
    N138 (search Y axis to 2 at feed rate of 1 input line 7)
    N140 G31 Y.5 I7 S1 E0 F1
    
    N142 (Second point is Program.X.Program.Y)
    N144 #PX1 = #Program.X
    N146 #PY1 = #Program.Y
    
    (N147 M00 #PX1 & " " & #PY1
    
    N149 G01 X#PX/3 Y#Program.Y/3 F5
    
    N154 (search X axis to 2 at feed rate of 1 input line 7)
    N156 G31 X2 I7 S1 E0 F1
    
    N158 (Third point is Program.X.Program.Y)
    N160 #PX2 = #Program.X
    N162 #PY2 = #Program.Y
    
    (N163 M00 #PX2 & " " & #PY2
    
    N164 (Go to Program X0Y0)
    N166 G01Y0X0F5
    
    IF [#PX1 - #PX] = 0 THEN 
    #PX1  = #PX1 + 0.0001
    ENDIF
    
    IF [#PX2 - #PX1] = 0 THEN 
    #PX2  = #PX2 + 0.0001
    ENDIF
    
    IF [#PY1 - #PY] = 0 THEN 
    #PY1  = #PY1 + 0.0001
    ENDIF
    
    IF [#PY2 - #PY1] = 0 THEN 
    #PY2  = #PY2 + 0.0001
    ENDIF
    
    
    #DXDY = [#PY1 - #PY] / [#PX1 - #PX]
    
    N174 #DXDY1=[[#PY2]-[#PY1]]/[[#PX2]-[#PX1]]
    
    (M00 #DXDY & " " & #DXDY1
    
    IF [#DXDY1 + #DXDY] = 0 THEN
    M00 "Either lines are on same coord or too small area"
    ENDIF
    
    N176 #CX=[[[#DXDY]*[#DXDY1]]*[[#PY]-[#PY2]]+[[#DXDY1]*[[#PX]+[#PX1]]]-[[#DXDY]*[[#PX1]+[#PX2]]]]/[[2.]*[[#DXDY1]-[#DXDY]]]
    N178 #CY=[[-1.]/[#DXDY]]*[[#CX]-[[#PX]+[#PX1]]/[2.]]+[[#PY]+[#PY1]]/[2.]
    
    (N180 #RAD=[SQRT[[[[#PX1]-[#CX]]*[[#PX1]-[#CX]]]+[[[#PY1]-[#CY]]*[[#PY1]-[#CY]]]]]*[2.]
    
    N182 M00 #CX & " " & " " & #CY & " " & #RAD
    N183 M00 #PX & " " & #PY & "; " & #PX1 & " " & #PY1 & "; " & #PX2 & " " & #PY2
    
    N184 M00


    A lazy man does it twice.


  3. #23
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    253
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    yep its shows the difference

    you can store both variables at once, mine looks like this





  4. #24
    Member Fastest1's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4415
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    Thanks so much for the reply! In my case the Y seems to take a - number using the recommendation. I wonder if my Y is backwards?

    A lazy man does it twice.


  5. #25
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    253
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    or mine is



  6. #26
    Member Fastest1's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4415
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    As long as the center is found. Thanks again.

    A lazy man does it twice.


  7. #27
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    253
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    Quote Originally Posted by Fastest1 View Post
    As long as the center is found. Thanks again.


    yep no worries, i've been using this script for a while now.. . working on an upgrade to one my other flashcut add ons at the moment too. hopefully i get somewhere with it this weekend.not sure how many FC people there are out there



  8. #28
    Member Fastest1's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4415
    Downloads
    0
    Uploads
    0

    Default Re: sensing program zero

    Quote Originally Posted by charliex View Post
    yep no worries, i've been using this script for a while now.. . working on an upgrade to one my other flashcut add ons at the moment too. hopefully i get somewhere with it this weekend.not sure how many FC people there are out there
    I know nothing about making the scripts or even how to install them other than loading GCode.
    Mach was a little different and I could find screens and options, FC not so much ;-)
    I would enjoy your sharing the one you are working on.
    Also in the center finding one mentioned just above.
    Why doesnt the measured error automatically correct in the DRO’s (if accepted)?
    I just write them down or take a pic and enter the dimensions manually.
    Am I missing a technique?
    It seems I cant get any actions from the PC til I close that dialog box.



    Sent from my iPhone using Tapatalk Pro

    A lazy man does it twice.


Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

sensing program zero

sensing program zero