585,759 active members*
4,238 visitors online*
Register for free
Login
Page 7 of 21 5678917
Results 121 to 140 of 417
  1. #121
    Join Date
    Mar 2003
    Posts
    35538
    maybe I should license the upstairs one too so I can avoid any problems in the future, how many computers can I have Mach on with 1 license.
    You can put it on as many as you want if they're not controlling a machine. If you use your machines for hobby use, you can use 1 license for as many machines as you have.

    But if you're making money with your machines, you need 1 license for each machine.

    As far as what doesn't work in demo mode, there are quite a few things. They used to be on the Wiki, but aren't there any more.

    500 lines of code.
    Run from here doesn't work.

    No threading in Turn.

    Can't remember any more.

    Also, if you don't install the driver, there are some additional issues you may run into.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  2. #122
    Join Date
    Jul 2009
    Posts
    272
    single license will work

  3. #123
    Join Date
    Apr 2006
    Posts
    3498
    Hi big-tex,
    Thank you for such a nice Auto Tool functionality.. I am running Mach3 Lockdown Version R3.042.040.... My Z-axis is set as following:

    When My Z-axis Moves up--->The DRO shows -ve value
    When My Z-axis Goes down --->The DRO shows +ve value

    I know it is against the standard practice but i have some special Gcode postprocessor files that generate Gcodes in this way... So i didn't change the the Active LOw setting in Mach3 as Actve High etc...

    I will request you to kindly help me making the Big-Tex version of Auto Tool zero setter seeing the above scenario and in METRIC unit...
    Your help in this regard is highly appreciated
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  4. #124
    Join Date
    Mar 2003
    Posts
    35538
    Has anyone put the toolchange probe macro in their M6 End macro?

    Doing that should alleviate the need to press the second button after a tool change. But I haven't tested it yet.

    I'm working on a new screen, and I'm incorporating this into it. I need to add tool change position DRO's, so the machine will move to a user defined location to change the tool, then pushing Cycle Start should finish the change by probing for the length, then continuing on.

    Doing some thinking (and testing) while typing this. Seems like I need the initial touch off button, but the second button just calls M6. This allows you to manually do a tool change after the initial touch off, but when running g-code, the tool change and length probe are handled automatically by Mach3.

    I haven't really read this thread that closely, so someone correct me if I'm wrong.



    Big Tex, seems like your installer did some undesirable things to my configuration. Last night, I ran your installer to check out how th macro's worked. This morning, when playing with the spindle rpm slider, I was getting PWM error messages. Seems your installer changed my spindle from step/dir to PWM, even though it was disabled?? It also seems to have enabled the Shuttle Pro plugin, as I got errors from that, since I don't have one?

    Can you confirm these are from your installer? Or did something really strange happen here??
    Attached Thumbnails Attached Thumbnails Tool Change.jpg  
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #125
    Join Date
    Nov 2007
    Posts
    980
    Quote Originally Posted by ger21 View Post
    It also seems to have enabled the Shuttle Pro plugin, as I got errors from that, since I don't have one?

    Can you confirm these are from your installer? Or did something really strange happen here??
    Hi Gerry,

    I've seen this happen when installing other screen sets. I have no idea why but you're not alone here as I do not have the shuttle on my "design" PC, and it always seems to re-enable it when installing "some" screensets.

    I just delete the shuttle plug-in and it goes away, but still not sure how it gets there again to begin with. It may be a default plug-in being installed with this (and certain other) screensets.

    Dave
    Dave
    Dave->..

  6. #126
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by Khalid View Post
    Hi big-tex,
    Thank you for such a nice Auto Tool functionality.. I am running Mach3 Lockdown Version R3.042.040.... My Z-axis is set as following:

    When My Z-axis Moves up--->The DRO shows -ve value
    When My Z-axis Goes down --->The DRO shows +ve value

    I will request you to kindly help me making the Big-Tex version of Auto Tool zero setter seeing the above scenario and in METRIC unit...
    Your help in this regard is highly appreciated
    Khalid, it looks like you just need to probe in the other direction. You should be able to just change a few lines of code. Here's an example. These are in inches, you'd want to change the metric portions as well. There may be other changes need, but I don't have time to look through it thoroughly right now.

    Rem Probe In the z direction

    Code "F10" 'slow down feedrate to 10 ipm
    ZNew = GetDro(2) - 6 'probe move to current z - 6 inches
    Change to ZNew = GetDro(2) + 6

    Code "G31Z" & ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" & ZNew +.1 'move back to hit point in case there was overshoot +.1

    Change to Code "G0 Z" & ZNew -.1


    While IsMoving ()
    Wend
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #127
    Join Date
    Apr 2006
    Posts
    3498
    Thanks Gerry, I will change the values and will show the outcome
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  8. #128
    Join Date
    Mar 2003
    Posts
    35538
    Be aware that they need to be changed in several other places, and in both macros.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  9. #129
    Join Date
    Jul 2009
    Posts
    272
    Quote Originally Posted by ger21 View Post
    Has anyone put the toolchange probe macro in their M6 End macro?





    Big Tex, seems like your installer did some undesirable things to my configuration. Last night, I ran your installer to check out how th macro's worked. This morning, when playing with the spindle rpm slider, I was getting PWM error messages. Seems your installer changed my spindle from step/dir to PWM, even though it was disabled?? It also seems to have enabled the Shuttle Pro plugin, as I got errors from that, since I don't have one?

    Can you confirm these are from your installer? Or did something really strange happen here??
    ger21
    Putting macro in m6start should work I have not tested it it that way since I do not have ATC.

    If you could add command to bottom of script for tool zero to proceed with start after touch off you will have single button operation. Is that doable?
    Cycle start Alt R shortcut dec. val 2131


    Installer does not change anything, it only installs set and jpeg files for graphic portion of screen set.

  10. #130
    Join Date
    Mar 2003
    Posts
    35538
    Did some testing on my design PC.

    Looks like I can have M6 start move to a position to manually change the tool, then put your second macro in the M6 end, which gets executed after hitting cycle start.

    It's gonna take me a few weeks to get it setup to know for sure, but it sure seems like it should work fine, and save a step vs how you're doing it now.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  11. #131
    Join Date
    Jul 2009
    Posts
    272
    What about inserting command to cycle start at the end of macro?

  12. #132
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by Big-tex View Post
    What about inserting command to cycle start at the end of macro?
    You have to stop the spindle to change tools, so you need to click a button to restart it.

    If you set up General Config to "Stop Spindle, Wait for Cycle Start", then you only need to click Cycle Start after you change the tool.

    This seems to be the best way to me. Almost fully automatic. It moves the machine to where you want to change the tool, stops while you change it, and, after you hit cycle start, it re-zero's, and starts cutting.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  13. #133
    Join Date
    Apr 2006
    Posts
    3498
    Its working fine for me Now Thanks Gerry and the Big-Tex.. This is for Metric Mode and special case of my Z-axis.. Please don't use unless your Z-axis Up and Down movement behave like my Z-axis......


    Rem This is for my MDF Machine for Milling
    Rem VBScript To probe In the z axis For G21 Only.. first Run the Gcode With G21 Then try Auto tool
    Rem My X,Y & Zaxis dirlowActive= High (Green) And steplowActive=High (green)
    Rem This Auto Tool Zero is For my inverted Z-axis Z-moves up= -ve , Zmoves down= +Ve


    If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
    Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
    Else
    Code "G4 P1" 'Pause 1 seconds to give time to position probe plate
    PlateOffset = GetUserDRO(1151) 'Get plate offset DRO
    CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
    Code "F100" 'slow down feedrate to 4 ipm

    Rem Probe in the z direction
    ZNew = GetDro(2) + 50 'probe move to current z - 2 inches
    Code "G31Z" &ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
    While IsMoving ()
    Wend

    If PlateOffset <> 0 Then
    Call SetDro (2, -1*PlateOffset) 'set the Z axis DRO to plate thickness
    Code "G4 P0.25" 'Pause for Dro to update.
    ZNew = -1*PlateOffset - 5
    Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code "(Z axis is now zeroed)" 'puts this message in the status bar
    End If

    Code "F" &CurrentFeed 'Returns to prior feed rate
    End If
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  14. #134
    Join Date
    Jul 2009
    Posts
    272
    ger21

    i want to retain functionality of cycle start and do not wish to change m6end

    what will execute command to start cycle that can be added to bottom of script
    code 2131
    does not work

  15. #135
    Join Date
    Mar 2003
    Posts
    35538
    You're not changing cycle start at all. It still works normally.

    What happens, is that when Mach3 sees an M6 T2, it runs the M6 start macro, then waits for you to hit cycle start. When you hit cycle start, it runs M6 end.
    You set it up this way in general config.
    Attached Thumbnails Attached Thumbnails M6end.jpg  
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  16. #136
    Join Date
    Mar 2003
    Posts
    35538
    Cycle start should be DoOEMButton (1000)
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  17. #137
    Join Date
    Jul 2009
    Posts
    272
    I will test that see how I like it.

  18. #138
    Join Date
    Jul 2009
    Posts
    272
    Quote Originally Posted by ger21 View Post
    You're not changing cycle start at all. It still works normally.

    What happens, is that when Mach3 sees an M6 T2, it runs the M6 start macro, then waits for you to hit cycle start. When you hit cycle start, it runs M6 end.
    You set it up this way in general config.
    I guess there is more than one way to skin the cat.

  19. #139
    Join Date
    Jul 2009
    Posts
    272
    DoOEMButton (1000)

    does not work, it appears as bug reported on mach 3 forum

  20. #140
    Join Date
    Jul 2009
    Posts
    272
    ger21

    I have came across problem with my scripts and calc retract
    so I changed em to Code("G53G0Z-0.5") it is safer routine just in case something is in the way.
    It was rare situation but I felt like it needed changing. I will change metric section as well and post new version for download installer version.

    INITIAL ZERO SETUP
    Option Explicit 'Written by Big-Tex November 28 2010
    Dim xjobcoord
    Dim yjobcoord
    Dim xmachcoord
    Dim ymachcoord
    Dim zmachcoord
    Dim xprobeloc
    Dim yprobeloc
    Dim xtoprobe
    Dim ytoprobe
    Dim PlateOffset
    Dim CurrentFeed
    Dim ZNew
    Dim Zplate
    Dim Zrestposition
    Dim ZMaterialmachcoord
    Dim ZPlatejobcoord
    Dim Zplatetomaterial

    xjobcoord = GetDRO(0) 'get current job coordinate for X
    yjobcoord = GetDRO(1) 'get current job coordinate for Y

    xmachcoord = GetOemDRO(83) 'get current machine coordinate for X
    ymachcoord = GetOemDRO(84) 'get current machine coordinate for Y
    zmachcoord = GetOemDRO(85) 'get current machine coordinate for Z

    xprobeloc = GetUserDRO(1100) 'get X machine coordinate location of the touch plate
    yprobeloc = GetUserDRO(1101) 'get Y machine coordinate location of the touch plate

    xtoprobe = xprobeloc-xmachcoord+xjobcoord 'calculate the X move from the current location to the touch plate
    ytoprobe = yprobeloc-ymachcoord+yjobcoord 'calculate the Y move from the current location to the touch plate

    Rem VBScript To probe In the z axis
    If GetOemLED(801) Then 'check if English Units
    If GetOemLed (825) <> 0 Then 'check to see if the probe is already grounded or faulty
    Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
    Else
    Code "G4 P1" 'pause 1 seconds to give time to position probe plate
    PlateOffset = GetUserDRO(1151) 'get plate offset DRO
    CurrentFeed = GetOemDRO(818) 'get the current feedrate to return to later

    Rem Probe In the z direction

    Code "F10" 'slow down feedrate to 10 ipm
    ZNew = GetDro(2) - 6 'probe move to current z - 6 inches
    Code "G31Z" &ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZNew +.1 'move back to hit point incase there was overshoot +.1
    While IsMoving ()
    Wend

    Rem End add lines

    Code "F2" 'slow down feedrate to 2 ipm
    ZNew = GetDro(2) - .25 'probe move to current z - .25 inches
    Code "G31Z" &ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
    While IsMoving ()
    Wend

    If PlateOffset <> 0 Then
    Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
    Code "G4 P0.25" 'pause for Dro to update.
    'ZNew = PlateOffset + 3.6315 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-0.5")
    While IsMoving ()
    Wend

    End If

    End If


    Rem VBScript To probe In the z axis

    If GetOemLed (825) <> 0 Then 'check to see if the probe is already grounded or faulty
    Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
    Else

    Rem Probe In the z direction
    Code "G4 P0.25" 'pause for Dro to update.
    Zrestposition = GetDro(2) 'get the job cooridnate of the Z axis after setting Z
    ZMaterialmachcoord = GetOemDRO(85)-ZNew 'get current machine coordinate for Z & calc the top of the material for use later
    Code "G4 P1" 'pause for Dro to update
    Code "G0X" &xtoprobe &"Y" &Ytoprobe 'rapid to the location of the plate

    Rem Start Add lines To speed this up

    Code "F10" 'slow down feedrate to 10 ipm
    ZPlate = GetDro(2) - 6 'probe move to current z - 6 inches
    Code "G31Z" &ZPlate
    While IsMoving() 'wait for probe move to finish
    Wend

    ZPlate = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZPlate +.1 'move back to hit point incase there was overshoot+.1
    While IsMoving ()
    Wend

    Rem End add lines

    Code "F2" 'slow down feedrate to 2 ipm
    ZPlate = GetDro(2) - .25 'probe move to current z - .25 inches
    Code "G31Z" &ZPlate
    While IsMoving() 'wait for probe move to finish
    Wend

    ZPlate = GetVar(2002) 'read the touch point
    Code "G1 Z" &ZPlate 'move back to hit point incase there was overshoot
    While IsMoving ()
    Wend

    Zplatetomaterial = GetDRO(2) 'record the current coordinate of the bottom of the tool and plate
    Call SetUserDRO(1102,Zplatetomaterial) 'this sets a user DRO to the value of the top of material to top of plate
    Code "G4 P0.25" 'pause for Dro to update.

    'ZNew = PlateOffset + 3.6315 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-0.5")
    While IsMoving () 'wait for probe move to finish retracting
    Wend

    Code "G0X" & xjobcoord & "Y" & yjobcoord'returns to the previus X Y job location
    While IsMoving()
    Wend

    Code "F" &CurrentFeed 'returns to prior feed rate
    Code "G4 P0.25" 'pause for Dro to update
    Code "(Material Offset is Now Calculated in English Units)"'puts this message in the status bar

    End If
    Else 'this portion of script is for Metric Native Units
    If GetOemLed (825) <> 0 Then 'check to see if the probe is already grounded or faulty
    Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
    Else
    Code "G4 P1" 'pause 1 seconds to give time to position probe plate
    PlateOffset = GetUserDRO(1151) 'get plate offset DRO
    CurrentFeed = GetOemDRO(818) 'get the current feedrate to return to later

    Rem Probe In the z direction

    Code "F300" 'slow down feedrate to 300 mmpm
    ZNew = GetDro(2) - 150 'probe move to current z - 150 mm
    Code "G31Z" &ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZNew + 3 'move back to hit point incase there was overshoot + 3
    While IsMoving ()
    Wend

    Rem End add lines

    Code "F50" 'slow down feedrate to 50 mmpm
    ZNew = GetDro(2) - 6 'probe move to current z - 6 mm
    Code "G31Z" &ZNew
    While IsMoving() 'wait for probe move to finish
    Wend

    ZNew = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
    While IsMoving ()
    Wend

    If PlateOffset <> 0 Then
    Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
    Code "G4 P0.25" 'pause for Dro to update.
    'ZNew = PlateOffset + 50 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-20")
    While IsMoving ()
    Wend

    End If

    End If


    Rem VBScript To probe In the z axis

    If GetOemLed (825) <> 0 Then 'check to see if the probe is already grounded or faulty
    Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
    Else

    Rem Probe In the z direction
    Code "G4 P0.25" 'pause for Dro to update.
    Zrestposition = GetDro(2) 'get the job cooridnate of the Z axis after setting Z
    ZMaterialmachcoord = GetOemDRO(85)-ZNew 'get current machine coordinate for Z & calc the top of the material for use later
    Code "G4 P1" 'pause for Dro to update
    Code "G0X" &xtoprobe &"Y" &Ytoprobe 'rapid to the location of the plate

    Rem Start Add lines To speed this up

    Code "F300" 'slow down feedrate to 300 mmpm
    ZPlate = GetDro(2) - 150 'probe move to current z - 150 mm
    Code "G31Z" &ZPlate
    While IsMoving() 'wait for probe move to finish
    Wend

    ZPlate = GetVar(2002) 'read the touch point
    Code "G0 Z" &ZPlate + 3 'move back to hit point incase there was overshoot+3
    While IsMoving ()
    Wend

    Rem End add lines

    Code "F50" 'slow down feedrate to 50 mmpm
    ZPlate = GetDro(2) - 6 'probe move to current z - 6 mm
    Code "G31Z" &ZPlate
    While IsMoving() 'wait for probe move to finish
    Wend

    ZPlate = GetVar(2002) 'read the touch point
    Code "G1 Z" &ZPlate 'move back to hit point incase there was overshoot
    While IsMoving ()
    Wend

    Zplatetomaterial = GetDRO(2) 'record the current coordinate of the bottom of the tool and plate
    Call SetUserDRO(1102,Zplatetomaterial) 'this sets a user DRO to the value of the top of material to top of plate
    Code "G4 P0.25" 'Pause for Dro to update.
    'ZNew = PlateOffset + 50 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-20")
    While IsMoving () 'wait for probe move to finish retracting
    Wend

    Code "G0X" & xjobcoord & "Y" & yjobcoord'returns to the previus X Y job location
    While IsMoving()
    Wend

    Code "F" &CurrentFeed 'returns to prior feed rate
    Code "G4 P0.25" 'pause for Dro to update
    Code "(Material Offset is Now Calculated in Metric Units)"'puts this message in the status bar
    Code "F200"
    Sleep 100


    End If
    End If


    TOOL CHANGE ZERO SETUP

    Option Explicit 'Written by Big-Tex November 28 2010
    Dim xjobcoord
    Dim yjobcoord
    Dim zjobcoord
    Dim xmachcoord
    Dim ymachcoord
    Dim zmachcoord
    Dim xprobeloc
    Dim yprobeloc
    Dim CurrentFeed
    Dim ZNew
    Dim ZPlate
    Dim Zplatetomaterial
    Dim PlateOffset
    Dim ZMaterialmachcoord
    Dim Zplatejobcoord
    Dim xtoprobe
    Dim ytoprobe

    xjobcoord = GetDRO(0) 'get current job coordinate for X
    yjobcoord = GetDRO(1) 'get current job coordinate for Y
    zjobcoord = GetDRO(2) 'get current job coordinate for Z

    xmachcoord = GetOemDRO(83) 'get current machine coordinate for X
    ymachcoord = GetOemDRO(84) 'get current machine coordinate for y
    zmachcoord = GetOemDRO(85) 'get current machine coordinate for z

    xprobeloc = GetUserDRO(1100) 'get x machine coord of fixed plate
    yprobeloc = GetUserDRO(1101) 'get y machine coord of fixed plate

    xtoprobe = xprobeloc-xmachcoord+xjobcoord 'calc x move to fixed probe
    ytoprobe = yprobeloc-ymachcoord+yjobcoord 'calc y move to fixed probe

    Rem Move To fixed In Plate location

    If GetOemLed(801) Then 'check if Native Units are English
    If GetOemLED(825)<>0 Then

    code "(Z-Plate Grounded Check connection and try again)"
    Else

    Rem Probe In Z direction

    Code "G4 P0.25" 'pause for Dro to update.
    CurrentFeed = GetOemDRO(818) 'get the current feedrate to return to later
    PlateOffset = GetUserDRO(1151) 'get plate offset DRO
    Code "G0X" &xtoprobe &"Y"& ytoprobe 'move to fixed plate location

    Rem Start Add lines To speed up

    Code "F12" 'slow down feedrate to 10 ipm
    Zplate = GetDro(2)-6 'probe move to current z - 6 inches
    Code "G31Z" &Zplate
    While IsMoving()
    Wend

    Zplate = GetVar(2002) 'read the touch point
    Code "G1 Z" &Zplate+.1 'move back to hit point incase there was overshoot +.1 inches
    While IsMoving()
    Wend

    Rem End of add lines

    Code "F2" 'slow down feedrate to 2 ipm
    Zplate = GetDro(2)-.25 'probe move to current z - .25 inches
    Code "G31Z" &Zplate
    While IsMoving()
    Wend

    Zplatetomaterial = GetUserDRO(1102) 'get calculated material offset
    Code "G4 P0.25" 'pause for Dro to update.
    Call SetDRO(2,Zplatetomaterial) 'this sets Z DRO to calculated material offset
    Code "G4 P0.25" 'pause for Dro to update.

    'ZNew = PlateOffset + 2.6315 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-0.5")
    While IsMoving () 'wait for probe move to finish retracting
    Wend

    Code "G0X" & xjobcoord &"Y" & yjobcoord 'returns to the previous X Y job location
    While IsMoving()
    Wend

    Code "F350" '&CurrentFeed 'returns to prior feed rate
    Code "G4 P0.25" 'pause for Dro to update.
    Code "(Z axis is now zeroed in English Units)" 'puts this message in the status bar


    End If
    Else 'this portion of script is for Metric Native Units
    If GetOemLED(825)<>0 Then
    code "(Z-Plate Grounded Check connection and try again)"
    Else

    Rem Probe In Z direction

    Code "G4 P0.25" 'pause for Dro to update.
    CurrentFeed = GetOemDRO(818) 'get the current feedrate to return to later
    PlateOffset = GetUserDRO(1151) 'get plate offset DRO
    Code "G0X" &xtoprobe &"Y"& ytoprobe 'move to fixed plate location

    Rem Start Add lines To speed up

    Code "F300" 'slow down feedrate to 300 mmpm
    Zplate = GetDro(2)- 150 'probe move to current z - 150 mm
    Code "G31Z" &Zplate
    While IsMoving()
    Wend

    Zplate = GetVar(2002) 'read the touch point
    Code "G1 Z" &Zplate+ 3 'move back to hit point incase there was overshoot + 3 mm
    While IsMoving()
    Wend

    Rem End of add lines

    Code "F50" 'slow down feedrate to 50 mmpm
    Zplate = GetDro(2)- 6 'probe move to current z - 6 mm
    Code "G31Z" &Zplate
    While IsMoving()
    Wend

    Zplatetomaterial = GetUserDRO(1102) 'get calculated material offset
    Code "G4 P0.25" 'pause for Dro to update.
    Call SetDRO(2,Zplatetomaterial) 'this sets Z DRO to calculated material offset
    Code "G4 P0.25" 'pause for Dro to update.

    'ZNew = PlateOffset + 50 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code("G53G0Z-20")
    While IsMoving () 'wait for probe move to finish retracting
    Wend

    Code "G0X" & xjobcoord &"Y" & yjobcoord 'returns to the previous X Y job location
    While IsMoving()
    Wend

    Code "F" &CurrentFeed 'returns to prior feed rate
    Code "G4 P0.25" 'pause for Dro to update.
    Code "(Z axis is now zeroed in Metric Units)" 'puts this message in the status bar
    Code "F300"
    Sleep 100


    End If

    End If


    I have left original code so you can see where code was changed. You must remember that this code only operates correctly if you are NOT in machine coordinates.
    Gerry I hope that helps.

Page 7 of 21 5678917

Similar Threads

  1. Replies: 1
    Last Post: 03-04-2014, 01:08 AM
  2. Tool Length Offset Tool Setter
    By CNCneeds in forum News Announcements
    Replies: 0
    Last Post: 01-03-2014, 06:27 PM
  3. Tool Setter Macro for M-V60C and Metrol Setter
    By mitshack in forum Mazak, Mitsubishi, Mazatrol
    Replies: 1
    Last Post: 02-02-2013, 12:08 PM
  4. Okuma Tool Setter Reference Tool
    By lisaclisac in forum Okuma
    Replies: 7
    Last Post: 09-28-2012, 03:21 PM
  5. Tool setter macro for M-V60C and Metrol setter
    By mitshack in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 10-06-2008, 02:38 PM

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
  •