584,874 active members*
5,473 visitors online*
Register for free
Login
Page 1 of 4 123
Results 1 to 20 of 65

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    634

    UCCNC Macro sharing

    I thought I'd start a thread where we can share our macros. I'll start by sharing the macros I made.

    USE AT YOUR OWN RISK!!!!

    First combo are M31 and M6 for auto tool length measuring after a manual tool change. When running a part, you use a mobile Z-touch plate and a fixed touch plate. M31 will probe down at the current location, then retract and move over to the fixed plate and probe. It then calculates the difference between Zzero and the fixed plate and stores that value in the C-axis DRO for later use by the M6 macro. Z-zero is set to the same value for offsets G54 to G59.

    The M31 macro also supports a "material offset" which can add or subtract an amount from Z zero. If this is non-zero when you call the macro, a message box will come up to remind you that it is non-zero.

    The M6 macro stops the spindle and then moves to a tool change location. Once you're done changing tools, hit return or click ok and the machine will move to the fixed plate, probe down and set a new Z-zero for all offsets.

    You must customize the macro by entering the coordinates of your tool change position, fixed plate position, Z-setting plate thickness etc. etc.

    Remember, USE AT YOUR OWN RISK!!!!

    I'd ask that if you make any improvements or modifications that you please post back to this thread so that everyone can benefit.
    Attached Files Attached Files
    -Andy B.
    http://www.birkonium.com CNC for Luthiers and Industry http://banduramaker.blogspot.com

  2. #2
    Join Date
    Dec 2010
    Posts
    634

    Re: UCCNC Macro sharing

    This Macro is a simple Z-zero probe. Machine probes down and sets z-zero for all offsets. I named it M200 and it can be accessed by pressing the P1 button and the default screen.
    Attached Files Attached Files
    -Andy B.
    http://www.birkonium.com CNC for Luthiers and Industry http://banduramaker.blogspot.com

  3. #3
    Join Date
    Nov 2006
    Posts
    40

    Re: UCCNC Macro sharing

    Thanks for these Andy, I've just bought a copy of the software and recently e-mailed Balazs regarding more hotkeys to run macros such as homing, probing, start cycle etc. He said there will be 48 in the next version of UCCNC.
    Mark

  4. #4
    Join Date
    Jun 2014
    Posts
    777

    Re: UCCNC Macro sharing

    Quote Originally Posted by BanduraMaker View Post
    This Macro is a simple Z-zero probe. Machine probes down and sets z-zero for all offsets. I named it M200 and it can be accessed by pressing the P1 button and the default screen.
    Hi andy, i thought id start by trying the m200 macro. My z travel down is negative, however without modification the m200 macro is sending the z upwards on first move. Cant figure out why.

    Corrected: I was over writting the default macro but not in the profile folder lol.

    I got it running but im getting an odd behavior, It probes down to the plate and it stops around 0.5mm off the plate and then starts flicking between very small up and down motions repeatedly except the dro's continue to drop at coarse feed rate (no up moves are registering in dro). I tried starting with lower z values well within maxium z probe distance. same result, i also monitored diagnostics tabs and at no time does the probe or input pin led light activate. Manually shorting circuit it works fine.

    any ideas?

    Cheers

    Update: If i lift the z and run macro, then instead of having clip on the bit short on the plate, it runs perfectly. So its receiving a skip signal before it actually touches the plate and uccnc stops plunge, retracts by a half a mm or so then continues probe, seems like the skip signal is not large enough to register in uccnc so dros continue to drop but the uc400 registers it and is acting on it??. Just tried putting a resistor in series, no effect.

  5. #5
    Join Date
    May 2015
    Posts
    1

    Re: UCCNC Macro sharing

    @BanduraMaker
    Very interesting macros..
    Where do you find reference documentation for this (and other similar) line of code?

    exec.mainform.sumoffsetcontrol1.G59.newCcinput

    Michele

  6. #6
    Join Date
    Dec 2010
    Posts
    634

    Re: UCCNC Macro sharing

    I didn't find them actually, I emailed Balazs from UCCNC and told him what I needed to do, he gave me the line of code to do it. There's a couple variations on setting offsets so there may have been some back and forth.
    -Andy B.
    http://www.birkonium.com CNC for Luthiers and Industry http://banduramaker.blogspot.com

  7. #7
    Join Date
    Mar 2014
    Posts
    735

    Re: UCCNC Macro sharing

    I implemented BanduraMaker's auto tool length measuring macro a few months ago and after some minor customizations for my machine and a few emails to Andy I got it to work. And it works great! makes using the machine much easier. Thanks Andy!

  8. #8
    Join Date
    Aug 2006
    Posts
    143

    Re: UCCNC Macro sharing

    Has anyone here migrated from Mach3 to UCCNC? I have a number of custom macros I want to convert from VB to C#. I'm not well versed in either but I thought that it would be nice to see if anyone else is converting.

    Thanks
    Derek

  9. #9
    Join Date
    Dec 2010
    Posts
    634

    Re: UCCNC Macro sharing

    Yes, I converted from Mach 3 to UCCNC. The macros I posted were the main ones I was using in Mach 3
    -Andy B.
    http://www.birkonium.com CNC for Luthiers and Industry http://banduramaker.blogspot.com

  10. #10
    Join Date
    Aug 2006
    Posts
    143

    Re: UCCNC Macro sharing

    Actually your name just poped up on the mach forum. I'm trying to get some momentum for people switching from Mach to UCCNC under the theory that the more users the more development

    Gerry said you converted the macros from his 2010 screen set. Have you modified the UCCNC screens for the probing routines that are in the 2010 screen set?

  11. #11
    Join Date
    Jul 2015
    Posts
    34

    Re: UCCNC Macro sharing

    I was just on the Mach Forum and would like to convert to UCCNC but need Gerry's 2010 screenset conversion. Can you post the files?

  12. #12
    Join Date
    Feb 2008
    Posts
    1

    Re: UCCNC Macro sharing

    Looks like the macros are in the first 2 posts above.
    Also, a link to how to change/select different screen sets.
    I'm liking the looks of the UCCNC and might just try one myself.
    Thanks,
    Kar

  13. #13
    Join Date
    Jun 2007
    Posts
    27

    Re: UCCNC Macro sharing

    hi, is there a way to change the value of a variable like #500
    in a gcode within a macro file?

    something like this:
    #500 = exec.GetZpos();

    thamks
    Cahit

  14. #14
    Join Date
    Jun 2007
    Posts
    27

    Re: UCCNC Macro sharing

    i got a mail from Balazs, he's solution was:

    exec.ivars[500] = exec.GetZpos();

    Thanks Balazs!!!!

  15. #15

    Re: UCCNC Macro sharing

    I need help with the mobile/fixed probe setup. I only find x,y coords in m31 part for fixed probe location. Mine is 250 mm above work area. I made it work by setting retraction to this value, but that has to be edited every time. I need a way to add a z in machine to send the second half of the m31 macro for fixed location. How do I provide that

  16. #16
    Join Date
    Oct 2005
    Posts
    1145

    Re: UCCNC Macro sharing

    I am sure there may be several ways but this come to mind as one way. I am very new to UCcnc and C# scripting (;-)

    exec.Code("#500 =" + exec.GetZpos() )

    (;-) TP

  17. #17
    Join Date
    Apr 2014
    Posts
    215

    Re: UCCNC Macro sharing

    Part / Material Test Fit Macro, ported from Mach3

    (Note... new to uccnc, seems to work fine on my machine, usual disclaimers apply).

    Thought I'd have a go at trying to progress uccnc & the community + learn c# a little with respect to uccnc (hence the comments... ) , give a man a fish, eat for a day, teach him how to fish & he'll sit & drink beer all day by the side of the river

    Rob

    edit: added a beep at each of the extent points (you can comment it out if it annoys you)

    Code:
    /*  M1020
        Part Extents Macro to test material fit
    
        ported from Mach3 to C# for uccnc, thanks to BR549/Vmax549/TP for the original macro
        25/06/2016 - robertspark
    
        NOTE: Set your feedrate and Dwell Time according to you machine parameters / units / requirements.
    */
    
    double FR = 1000; // sets Feedrate
    double DT = 3000; // Sets Dwell Time (mSec, 3000 = 3 sec)
    
    string XMax = AS3.Getfield(888); // 888  Diagnostics_maxX
    string XMin = AS3.Getfield(885); // 885  Diagnostics_minX
    string YMax = AS3.Getfield(889); // 889  Diagnostics_maxY
    string YMin = AS3.Getfield(886); // 886  Diagnostics_minY
    
            DialogResult result;
    
            result = MessageBox.Show("Is Your Z HEIGHT Safe To Travel?", "check!!!" , MessageBoxButtons.YesNo);
            
           if (result == System.Windows.Forms.DialogResult.Yes)
            {
    
                exec.Code("G92 X0 Y0 Z0"); // Zero the DRO's
                exec.Code("G01 X" + XMin + " Y" + YMin + " F" + FR); // Move to Minimum X & Y Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
                exec.Code("G04 P" + DT);
                exec.Code("G01 Y" + YMax); // Move to Maximum Y Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
                exec.Code("G04 P" + DT);
                exec.Code("G01 X" + XMax); // Move to Maximum X Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
                exec.Code("G04 P" + DT);
                exec.Code("G01 Y" + YMin); // Move to Minimum Y Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
                exec.Code("G04 P" + DT);
                exec.Code("G01 X" + XMin); // Move to Minimum X Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
                exec.Code("G04 P" + DT);
                exec.Code("G01 X0 Y0"); // Move to 0,0 X & Y Coordinates
                while(exec.IsMoving()){}
                exec.Wait(200);
                Console.Beep();
                
            }
        
           if (result == System.Windows.Forms.DialogResult.No)
            {
    
                MessageBox.Show("Move Z To A Safe Position And Restart");
    
            }

  18. #18
    Join Date
    Nov 2006
    Posts
    40

    Re: UCCNC Macro sharing

    Seems to work fine on mine too..Thanks Robert.
    Mark

  19. #19
    Join Date
    Oct 2005
    Posts
    1145

    Re: UCCNC Macro sharing

    Robert DO you need the trick to be able to dry run the outside profile as well ?? The trick is to be able to JUMP TO a line in the Gcode FROM the macro (;-)

    Note : Well actually it is a 2 part trick. I use SheetCam to add in 2 lines of code to the file in order for it to work correctly. YOU could do that manually as it is ONLY 2 lines of Gcode to add to each file. Easy peasy if you did not use Scam.

    (;-) TP

  20. #20
    Join Date
    Apr 2014
    Posts
    215

    Re: UCCNC Macro sharing

    TP,

    Yes, the outside dry run sounds like an interesting one. I'm guessing you add in a marker so that you can tell the macro to jump to the marker, and run from there?

    I do use sheetcam (and a number of your plugins too (well they are loaded), can't thank you enough for the stuff I've learned), hence adding in the beep I thought may be a handy feature (as I didn't think sounds / button options were listed anywhere they may help someone else with ideas).

    At the moment there seems to be G68/G69 missing which would allow you to dry run the outer edge or extents and then rotate the part, I did send an email to Balazs to ask that it can be added to the wish list (Les at sheetcam has a good method of voting for wish list items, at least you can gauge interest & priority and not satisfying the few then [which Art may have done when M3 was getting started]).

    Manuals / example macros would be helpful too (I've used the 2 vb script / cypress manuals for M3 extensively, along with the DRO, buttons pdf manual).

    OT, is there a manual on the screen edit side, as I know where the button is, but can't seem to get back to the "run" screen to edit it

    Rob

Page 1 of 4 123

Similar Threads

  1. UCCNC owners and support thread
    By shorton in forum UCCNC Control Software
    Replies: 144
    Last Post: 08-25-2017, 12:07 AM
  2. Getting Started with UCCNC Software
    By BanduraMaker in forum UCCNC Control Software
    Replies: 5
    Last Post: 02-08-2015, 07:06 PM
  3. UCCNC software released for sales
    By dubble in forum News Announcements
    Replies: 0
    Last Post: 08-05-2014, 11:25 AM
  4. UCCNC software release
    By dubble in forum News Announcements
    Replies: 0
    Last Post: 06-13-2014, 02:24 PM
  5. Sharing a tool offset verification macro
    By dpuch in forum Parametric Programing
    Replies: 0
    Last Post: 08-02-2010, 09:46 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
  •