Hello Guest it is April 28, 2024, 06:25:27 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - HimyKabibble

821
General Mach Discussion / Re: Using The Knee For Tool Length Comp....
« on: December 17, 2009, 01:54:25 AM »
Unless I'm missing something, the following two trivial macros are all that's required to make this work - four whole lines of code.  In simulation, it seems to work fine.  I'll try it on the machine tomorrow AM.


''
'   Bogus G43 Macro
'
'   Usage:
'       M143 P<OffsetNumber>
''

''========================================================================================
ToolParam_ZOffset =     2
''========================================================================================

''========================================================================================
''   Start of Macro Code
''========================================================================================

' Get the offset number to use
ToolOffsetNum = Param1()
' Lookup the offset
ToolOffset = GetToolParam(ToolOffsetNum, ToolParam_ZOffset)
' Apply it
Code "G0 A" & 0 - ToolOffset




''
'   Bogus G49 Macro
'
'   Usage:
'       M149
''

''========================================================================================
''   Start of Macro Code
''========================================================================================

Code "G0 A0.000"



Regards,
Ray L.

822
General Mach Discussion / Using The Knee For Tool Length Comp....
« on: December 17, 2009, 01:11:53 AM »
    Today I finished the new wiring for the quill, and got limits working, so I now have a quill drive and a knee drive.  Tomorrow I want to implement the tool length comp using the knee.  Mach3 v3 doesn't really suport this, as G43/G49 are processed internally.  So, here's what makes sense to me as a temporary kludge until Mach3 v4 is ready:

Setup:
    1) Load tool table with length offsets - reference tool is longest tool of entire set, with length set to 0.000".  All other tools will have negative offsets.
    2) Setup fixture as follows:
          Load and select reference tool
          Set quill (Z axis) a reasonable distance down from top of travel (rapid/safeZ height + some pad at a minimum)
          Raise knee (A axis) until top of workpiece almost touches reference tool tip, and Zero A work offset DRO
          Lower quill to touch-off on workpiece and set Z work offset DRO

Usage:
    1) Use M143 in place of G43, M149 in place of G49, to enable/disable tool length offsets
    2) M143 will move knee up to current tool length offset.  i.e. - if tool length offset is -1.234", knee will move up to A1.234.
    3) M149 will move knee down to A0.000"

    Do you guys see any problems with this?  I can't see any reason this won't work, and it's dead-simple to implement.

Regards,
Ray L.

823
Nice looking conversion, I guess the hardest part will be making a nice looking cover. Clear Poly Carb so you can see it working maybe.

Graham


Graham,

    Yup, it'll be either plastic (Plexi/Lexan) or just sheet metal.  Each has it's good points and bad points.  I'm kinda leaning towards 1/8" Plexi, since I'm already setup to do Plexi vacuum forming.

Regards,
Ray L.

824
Nice job, Ray. Much better than powering the rack and pinion drive which I have seen many tmes.

I'm noticing the seals on the ballscrew. What ball screw did you use?

Steve,

The screw is a 30mm, 5mm pitch from homeshopcnc.com.  It's *very* nice.  Smooth, quiet, zero backlash.  I'm seeing well under 0.001" total backlash at the tool, and virtually all of that comes from flexing of the quill itself.

Regards,
Ray L.

825
General Mach Discussion / Re: Tool probe macro
« on: December 15, 2009, 10:17:09 PM »
Well, Still not working.
Newly formatted computer, faster than the previous one, latest lockdown version of Mach. I changed the sleep value from 10 to 30. About every third time it will stop short of the probe, sometimes only about .100", sometimes several inches.
Any ideas?

Mark

Sounds like you have noise on the PROBE input.  Try putting a 100 ohm pullup resistor to +5V on the PROBE pin.

Regards,
Ray L.

826
General Mach Discussion / Re: A Simple VB Macro Pre-Processor
« on: December 14, 2009, 12:38:39 PM »
Below is the latest version of the pre-processor, along with a directory full of sample macros (my new probing macros).  See the README file for installation and operation instructions.

I expect to be fully supporting nesting of pre-processor macros later today.

Regards,
Ray L.

827
General Mach Discussion / Re: A Simple VB Macro Pre-Processor
« on: December 14, 2009, 11:28:54 AM »
Here is a better example of the power of this.  Below are some actual files from my suite of probing macros:

Common.def is my "common" include file which defines a whole lot of useful constants that most of my macros require
Probing.def is my probing include file, which defines all the constants associated with probing
Example1.m3m is the actual source code file for one of my probing macros
M666.m1s is the executable Mach3 macro file that the pre-processor creates from the above files 

Note that, using the pre-processor, I only had to write the 2 lines of code in Example1.m3m, rather than the 15 lines of code required for the actual macro to work in Mach3.  And, since those 2 lines are invoking pre-tested pre-processor macros, it is pretty much guaranteed to work first time.

Regards,
Ray L.

828
General Mach Discussion / A Simple VB Macro Pre-Processor
« on: December 13, 2009, 08:11:32 PM »
I suspect anyone who is used to programming in any modern language feels the same way I do about writing VB macros for Mach3 - It's about as much fun as a root canal with no anesthesia!  To make my own life easier until Mach3 v4 comes along, I tossed together a VERY rudimentary pre-processor for my VB scripts, that gives me the ability to use "include" files, and very rudimentary text macros.  This not only cuts down on the amount of typing I need to do, and greatly reduces the number of errors, but lets me follow at least a few of the more basic rules of good programming practice, like NOT using hard-coded numbers for things like OEM codes.  I can instead use meaningful names, which makes the code MUCH easier to write, read, and maintain.  These can be defined in a single place, and used in many places, so they're easy to change if necessary.

If others have any interest in using this (with NO guarantees of any support whatsoever....), I can pretty easily clean it up enough to make it easily usable.  It is written in Perl, which does require installing ActiveState Perl, which is a free download from www.activestate.com, and a total no-brainer to install.

Below is a trivial example of what it does.  First, the macro code as I actually write it:

''
'   X Axis Plus Edge Finder Macro
''

#filename M910.m1s
#include "Common.def"
#include "Probing.def"

''========================================================================================
''   Start of Macro Code
''========================================================================================

        ' Set the macro busy flag
        #IncrementMacroBusyFlag

        ' Call the primitive edge finder macro
        Code EdgeFindMacro & " P" & XAxis & " Q" & Plus
        
        ' Wait until it's done
        #WaitUntilSubMacrosDone

        ' Clear the macro busy flag
       #DecrementMacroBusyFlag

 
Here is the code that comes out of the pre-processor, ready to run in Mach3:

''========================================================================================
'  Created From: Mid_XPlusEdgeFind.m3m
'  Includes:
'       Common.def
'       Probing.def
''========================================================================================

''========================================================================================
''    Included Definitions:
''========================================================================================
Busy =                               1             ' Busy, for waiting for macros to complete
EdgeFindMacro =           "M900"     ' Edge finder - requires MacroParameter1DRO & MacroParameter2DRO
MacroBusySemaphoreDRO =  1108       ' Busy flag, used by macros.  Must be zeroed by top-level macros
Plus =                                1             ' Symbol for argument passing
XAxis =                              0             ' Symbol for argument passing
''========================================================================================

''
'   X Axis Plus Edge Finder Macro
''

'#filename M910.m1s
' #include "Common.def"
' #include "Probing.def"

''========================================================================================
''   Start of Macro Code
''========================================================================================

        ' Set the macro busy flag
        ' Macro:         #IncrementMacroBusyFlag
        BusyFlag = GetUserDRO(MacroBusySemaphoreDRO)
        SetUserDRO(MacroBusySemaphoreDRO, BusyFlag + 1)
        Sleep 100
        ' End Macro: #IncrementMacroBusyFlag

        ' Call the primitive edge finder macro
   Code EdgeFindMacro & " P" & XAxis & " Q" & Plus
        
        ' Wait until it's done
        ' Macro:         #WaitUntilSubMacrosDone
        ' Wait until it's done
        While GetUserDRO(MacroBusySemaphoreDRO) > BusyFlag
            Sleep 100
        Wend
        ' End Macro: #WaitUntilSubMacrosDone

        ' Clear the macro busy flag
        ' Macro:    #DecrementMacroBusyFlag
        BusyFlag = GetUserDRO(MacroBusySemaphoreDRO)
        SetUserDRO(MacroBusySemaphoreDRO, BusyFlag - 1)
        Sleep 100
        ' End Macro: #DecrementMacroBusyFlag

 
Notice that DRO, LED, macro numbers are pulled in from the included files (Common.def and Probing.def), so they don't need to be re-defined in every macro.  Simple text macros, like the DecrementMacroBusyFlag macro let you easily re-use small sections of tested code.

So, any interest?

829
General Mach Discussion / Re: A Simple But Useful Probing Trick
« on: December 13, 2009, 11:10:47 AM »
Ray,
just get the probing working like a charm. I have a probe that has been collecting dust for a long time
and one of these days would like to try it out without breaking it !
RICH

Rich,

Well, I've decided rigid probes and Mach3 are a bad combination. 99.9% of the time it works great, but every once in a while, Mach3 does something weird, and breaks the probe.  I've broken 3 over the last 6-9 months.  I've got a design for an unbreakable probe, unlike any I've seen, much simpler than the typical ones with the three contact pins and ball bearings.  I'll be building that sometime in the next few weeks, and will post pictures when I do.  It should be just as accurate as a rigid probe, but unbreakable.

Regards,
Ray L.

830
I got the oddball bolts I needed to put the top of the mill back together, so I have a working mill again!  I'll be doing the first test cuts with the new quill drive tomorrow.  I did some probing tests today, and it seemed to work flawlessly, getting +/-0.0001" repeatability!

Regards,
Ray L.