586,080 active members*
3,572 visitors online*
Register for free
Login
Page 10 of 21 8910111220
Results 181 to 200 of 417
  1. #181
    Join Date
    Jan 2008
    Posts
    932
    I suppose those are possibilities, but what is the difference in length of tools used by most people in milling one part? For me, not a huge difference, perhaps an inch. And I can't imagine starting with a shorter tool before a longer tool (in all the stuff I do).

    Either way would work, it would just be a matter of preferred work flow.

  2. #182
    Join Date
    Mar 2003
    Posts
    35538
    I've decided to go with a user defined clearance height for retracts. to prevent crashing at the top of the Z, when the tool is set to Z zero, the clearance height is compared to the actual Z travel (based on the Z home switch position), and the user is given the option of using a lower clearance, just below the switch, or aborting altogether.

    With MikeF's beta testing help, I've made a lot of changes to this code, mostly in error checking.

    I've added code to check the probe prior to the fixed plate probe as well. If there was a probe error, the reference height could be set wrong.

    Since I'm using the second macro in my M6 end macro, there are a few additional concerns.
    One is that if you exit the M6end macro (due to an error), Mach3 assumes the toolchange is done, and will proceed to start cutting with Z being zeroed. According to Brian, the only way to get around this is to put Mach3 into E-Stop. The good thing, is that the E-Stop will occur during a toolchange, so fixing the error, and doing a run from here should be pretty easy.

    I also discovered that I needed to turn on the spindle before resuming cutting. Since not all use Mach3 to control spindle on/off, I added a user option to specify if they are using manual control. If Mach3 controls the spindle, it will turn it on and resume cutting. If not, a window will open telling the user to start the spindle, and will wait for the user to click OK to resume cutting.

    To use my version, you need to add additional DRO's and LED's, and probably at least one more button. If anyone wants the code, I'll post it here, but they haven't been thoroughly tested yet. If we find that everything's working correctly, then my new screen incorporating them should be available very soon.
    Attached Thumbnails Attached Thumbnails 2010V12tc.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)

  3. #183
    Join Date
    Feb 2005
    Posts
    487
    Hey Gerry, nice looking probe setup screen, did you do your screen in machscreen?
    very nice looking, I would love to have a copy of screen and code!! I like your layout as well, very clean.

    scott
    Commercial Mach3: Screens, Wizards, Plugins, Brains,PLCs, Macros, ATC's, machine design/build, retrofit, EMC2, Prototyping. http://sites.google.com/site/volunteerfablab/

  4. #184
    Join Date
    Mar 2003
    Posts
    35538
    Scott, it's done in Screen4. Graphics done mostly with Visual Studio Express 2010's Form Designer, and Photoshop.

    I'm going to be selling it, but here's the code I used.
    Attached Files Attached Files
    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. #185
    Join Date
    Mar 2003
    Posts
    35538
    Here it is in operation.

    [nomedia="http://www.youtube.com/watch?v=7np99wSr9c8"]YouTube - Mach3 2010 Auto-Zero[/nomedia]
    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)

  6. #186
    Join Date
    Oct 2006
    Posts
    259
    Hi Gerry,
    When do you anticipate offering this nice screen of yours ?

  7. #187
    Join Date
    Mar 2003
    Posts
    35538
    two weeks, but it's a moving target.

    There are a few bugs in the M6End macro I posted.

    1) It will turn on the spindle, even with no g-code loaded. I fixed that last night.
    2) It could move into the Z limit under obscure conditions. Fixed, but the fix leaves a bit to be desired. Hopefully, I'll get that fixed tonight.
    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)

  8. #188
    Join Date
    Feb 2009
    Posts
    2143
    Do you have an e-mail contact list when it is ready?

  9. #189
    Join Date
    Mar 2003
    Posts
    35538
    No, but if you PM me, I'll let you know.
    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)

  10. #190
    Join Date
    Feb 2009
    Posts
    2143
    Quote Originally Posted by ger21 View Post
    No, but if you PM me, I'll let you know.
    You've been PM'd... Thanks!

  11. #191
    Join Date
    Jul 2009
    Posts
    272
    Nice work Gerry.
    I have been meaning to update some code in my screen set and release installer.
    It seams that I can catch up with orders, I am blessed in that respect.
    Sorry guys I hope to still have it for download this year.

    Merry Christmas to all.


  12. #192
    Join Date
    Feb 2005
    Posts
    487
    Tex,

    when you ready, I can put it all in a MSI installer for you....

    scott
    Commercial Mach3: Screens, Wizards, Plugins, Brains,PLCs, Macros, ATC's, machine design/build, retrofit, EMC2, Prototyping. http://sites.google.com/site/volunteerfablab/

  13. #193
    Join Date
    Jul 2009
    Posts
    272
    Quote Originally Posted by PoppaBear10 View Post
    ok, here it is again, I fixed the ==, and changed the - value first probe, and second probe to positive numbers since his, math formula makes it a negative.
    also commented out the "Option Explicit", since I did not data type the Dim vars...... so, it runs now..... sorry about the inconvienance.

    here it is:

    Sub Main() 'made it a sub, so you can return on "show stopper" errors

    'UPDATED TOOL CHANGE ZERO SETUP SCRIPT
    'Option Explicit
    'Written by Big-Tex November 29 2010
    'Modified by Poppa Bear, added Greolt's and Arbo's changes 08Dec2010

    Dim xjobcoord, yjobcoord, zjobcoord, xmachcoord, ymachcoord, zmachcoord
    Dim ZNew, ZPlate, Zplatetomaterial,PlateOffset, ZMaterialmachcoord, Zplatejobcoord
    Dim xprobeloc, yprobeloc,xtoprobe, ytoprobe
    Dim FirstProbeDist, FirstRetractDist, SecProbeDist
    Dim CurrentFeed
    Dim CurrentAbsInc

    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
    CurrentFeed = GetOemDro(818) 'get current feed rate
    PlateOffset = GetUserDRO(1151) 'get plate offset DRO
    Zplatetomaterial = GetUserDRO(1102) 'get calculated material offset from somewhere else?
    CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state


    '//////// the block below will set all your reusable vars depending on Inch or mm.
    '//////// this sets the vars so you only need ONE large block of probing code.

    If GetOEMLED(801) Then 'ON = English Measure INCH
    FirstProbeDist = 6.0 'first probe travel
    FirstRetractDist = 0.1 'first probe retract travel
    SecProbeDist = 0.25 'second probe travel
    FirstProbeFeed = 12 'First Probe Feed Speed
    SecondProbeFeed = 2 'Second Probe Feed Speed
    Else 'OFF = Metric Measure MM
    FirstProbeDist = 150.0 'first probe travel
    FirstRetractDist = 3.0 'first probe retract travel
    SecProbeDist = 6.0 'second probe travel
    FirstProbeFeed = 300 'First Probe Feed Speed
    SecondProbeFeed = 50 'Second Probe Feed Speed
    End If

    '//////// Error Condition checking code

    If GetOemLED(16)<>0 Then 'Checks for machine coordinates
    Code "(Please change to working coordinates)"
    Exit Sub 'ERROR! exit the macro
    End If

    If GetOemLED(825)<>0 Then
    Code "(Z-Plate Grounded Check connection and try again)"
    Exit Sub 'ERROR! exit the macro
    End If

    '//////// Start Probing Code, Probe In -Z direction.
    '//////// The vars will be Inch or Metric from above if/else statment

    Code "G0 X" & xtoprobe & " Y" & ytoprobe 'move to fixed plate location
    Code "F" & FirstProbeFeed 'slow down feedrate to 12 ipm, or 300 mmpm
    Zplate = (GetDro(2) - FirstProbeDist) 'probe move to z - 6", or 150mm
    Code "G90 G31Z" & Zplate 'FIRST Probe Operation!
    While IsMoving()
    Wend
    Zplate = GetVar(2002) 'read the touch point
    Code "G1 Z" & (Zplate + FirstRetractDist) 'retract above hit point +0.1" or +3mm
    While IsMoving()
    Wend
    Code "F" & SecondProbeFeed 'slow down feedrate to 2 ipm, or 50 mmpm
    Zplate = (GetDro(2)- SecProbeDist) 'probe move to current z - 0.25", or -6.0mm
    Code "G90 G31Z" & Zplate 'SECOND Probe Operation!
    While IsMoving()
    Wend
    Call SetDRO(2,Zplatetomaterial) 'this sets Z DRO to calculated material offset
    Sleep(250) 'pause for Dro to update.
    'ZNew = PlateOffset + 2.6315 'calc retract
    'Code "G0 Z" &ZNew 'put the Z retract height you want here
    Code "G53 G0 Z" & SecProbeDist
    While IsMoving () 'wait for probe move to finish retracting
    Wend
    Code "G0 X" & xjobcoord & "Y" & yjobcoord 'returns to the previous X Y job location
    While IsMoving()
    Wend
    Code "F" & CurrentFeed 'returns to prior feed rate

    If GetOEMLED(801) Then 'ON = English Measure INCH
    Code "(Z axis is now zeroed in English Units)" 'puts this message in the status bar
    Else 'OFF = Metric Measure MM
    Code "(Z axis is now zeroed in Metric Units)" 'puts this message in the status bar
    End If

    If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
    Code "G91"
    End If

    Code DoButton(0) 'Cycle Start

    End Sub
    Scott
    This script works with one problem
    If error condition exists such as grounding issue or machine coords
    Error message does not display it displays only message to start cycle.

  14. #194
    Join Date
    Feb 2005
    Posts
    487
    Hey Big Tex,

    I am not getting that, it works here, let me show you what I am doing, and you tell me what I am missing. (note, I dont have a probe system hooked up so I am doing the "Probe signal" via brains).

    I put the Macro into the VB script window, to test the mach coor. stop/exit error func. I push the "Machine Coordinates" button which turns on the "Machine Coordinate" in use LED.

    Then I go back to the VB test window, and push the run script button, as soon as it gets to the Machine coor. LED being "On". It then exits the macro, and the message in the status bar, appears as it should.

    For the "Probing", I had to do some dancing around, I put an ON/OFF button on my test page, that turns on/off ULED 1200.

    I then made a simple brain, rung is: ULED 1200->NoOp->Probe Input
    so, when ULED 1200 turns on, this turns on the "Probe Input", and when it is off, the probe input goes off.

    So, I turn on the ULED 1200, and again then run the VB script again, it faults again and gives the correct message, and exits.

    So, I make sure that I had the Input signal enabled for "Digitize, or Probing" signal in.

    Scott
    Commercial Mach3: Screens, Wizards, Plugins, Brains,PLCs, Macros, ATC's, machine design/build, retrofit, EMC2, Prototyping. http://sites.google.com/site/volunteerfablab/

  15. #195
    Join Date
    Jul 2009
    Posts
    272
    Did you load g-code? And then started script?

    Just to make it clear here is my M6start


    tool = GetSelectedTool()
    SetCurrentTool( tool )

    TCX=GetOEMDRO(1200)
    TCY=GetOEMDRO(1201)
    TCZ=GetOEMDRO(1202)

    Code "G53 G0 Z" & TCZ
    While IsMoving()
    Wend

    Code "G53 G0 X" & TCX & " Y" & TCY
    While IsMoving()
    Wend

  16. #196
    Join Date
    Mar 2003
    Posts
    35538
    Scott, an easier way to test might be to set up the digitize input pin and just emulate it with a keyboard key. Press the key and the probe LED lights up.

    That's how I'm testing the code in my screenset.
    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. #197
    Join Date
    Feb 2005
    Posts
    487
    Hey Ger,

    Unfortunatly, you can't do it that way, while running a "step through" debug of the code in the VB Window, i.e. if you set lets say Key "w" to be the one you use to emulate the digitize input, and your stepping through your code in the VB script window, what happens is, when you get to your break point in where you want to watch the code section, and you press the "w" you get a whole line of "wwwwwwwwwwwww" in the code window......... it is easy to do it like you say, and I am aware of that, but since I want to watch the code as I step through, without some key text being added from the :Hot Key, that is the reason I used the Brian to "activate" the digitize input...

    always, got to do crazy a$$ed workarounds, don't I?

    Big Tex:

    As far as I can see here, the probing code faults out, as it should, when it should, if those conditions are met. If the code see's those conditions, it drops compleatly out of the macro (exits the sub). If you not seeing the macro drop out, when your running, in those error conditions, then for what ever reason the code isn't seeing those two OEM LEDs at the time it runs though......

    YOU MAY have to do another work around.... since in a way, you may be running multiple macro treads...... that may be part of the issue.....

    Try this for "Poops and Grins".......

    Make a Brain, called fault Brain.
    here are the rungs:

    Input(OEM LED machine coor.) ->NoOp->ULED1200
    Input(OEM LED Digitize)->NoOp->ULED1201

    once you save it, remember to reload it, and enable it, then hit the view, to see if you see the ULEDs 1200 and 1201 coming on, with those conditions....

    Then, in your probing macro, change the Error condtions for each type to the ULED that represents that type, that is controlled via the Brian. I.e. be doing an IF GetUserLED(1200) and on the next if/then, watch 1201.

    then retest, the Brain runs in a seprate thread, and is not subject to the "Quirks" of the VB interpreter, and VB threading "Issues" that crop up here and there.

    scott
    Commercial Mach3: Screens, Wizards, Plugins, Brains,PLCs, Macros, ATC's, machine design/build, retrofit, EMC2, Prototyping. http://sites.google.com/site/volunteerfablab/

  18. #198
    Join Date
    Jul 2009
    Posts
    272
    Scott
    Yes if conditions are met macro does drop out.
    But it does not display needed message indicated in lines quoted below.

    Code "(Please change to working coordinates)"

    nor

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

    instead message is displayed to press start cycle.

    Can you verify this?

  19. #199
    Join Date
    Mar 2003
    Posts
    35538
    Where are you calling the macro from? If it's in the M6 Start somewhere, you're message is getting overwritten immediately by the M6 telling you to press cycle start.

    Try using
    msgbox "Please change to working coordinates"
    instead. This should wait for you to press OK before proceeding.

    But if you're in the M6, there's no way to stop it except to put Mach3 into E-Stop.
    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)

  20. #200
    Join Date
    Jul 2009
    Posts
    272

    Smile

    Ok ladies I will work it out and come up with new ver. installer.

    As so far my work was and will be free to community.
    From now I am accepting donations for further development and testing any help is appreciated.

    Also there will be link within installation that will take user directly to my paypal account in case anyone wants to thank me for my work.
    Thank you for your support in developing better cnc experiance.
    Scan my avatar with smart pnone ...... http://www.big-tex.tk/

Page 10 of 21 8910111220

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
  •