586,104 active members*
3,316 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > UCCNC Control Software > Floating head touch off script for UCCNC plasma
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Posts
    1469

    Floating head touch off script for UCCNC plasma

    Any one got an example touch off script for UCCNC?

    Mach3 I could write my own but not so sure about UCCNC.

    Maybe there are some examples somewhere on the forum but I can't find any.

    If I can see one I can muddle through it. Work out what it is doing and modify or start afresh with one of my own. Using it as an example.

  2. #2
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    Here is what I have for Mach3. It is a macro M624 which can be called from gcode

    I know the script works but don't really know how well it fits into a plasma work-flow.

    I have zero experience with CNC plasma at this stage. That will hopefully change very soon.


    Pierce = GetUserDRO(1159) 'get Pierce height from on-screen DRO

    Code "G31 Z-60 F1000" 'probing move
    While IsMoving()
    Wend
    Call SetDro (2, -2) 'set the Z axis DRO to match floating head over run
    Sleep 120 'Pause for DRO to update.
    Code "G1 Z" & Pierce 'move Z up to pierce height
    While IsMoving()
    Wend

  3. #3
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    OK I muddled my way to get this far. Have not tested on machine yet.

    exec.Code("G31 Z -40 F1000"); //probing move
    while(exec.IsMoving()){}
    exec.Callbutton(102); //zero Z DRO
    exec.Wait(50);
    exec.Code("G01 Z 1.5"); //move back to compensate floating head overrun
    while(exec.IsMoving()){}
    exec.Callbutton(102); //zero Z DRO
    exec.Wait(50);
    exec.Code("G01 Z 3"); //move to pierce height


    Haven't worked out how to do the equivalent of "Set DRO" so had to reset Z DRO to zero, then move to a position and then reset Z DRO to zero, as a work around.

    I want to call the pierce height from an on screen DRO or field, but have not figured that out yet. Have to wait for the screen editor anyway.

    Off to the shed to see if it works.

    EDIT: It works.

  4. #4
    Join Date
    Oct 2005
    Posts
    1145

    Re: Floating head touch off script for UCCNC plasma

    to call a DRO value use

    double PierceHeight = AS3.Getfielddouble(xxxx) //xxxx is the dro#

    To set a DRO value use

    Setfield(xxxx , yyyy) // xxxx is teh value and yyyy is teh dro#
    AS3.Validatefield(yyyy) // then you validate teh DRO# that you edited

    This is all explained in the Macro manual.

    You can also modify the Screenset Script to add the needed DRO. That is explained in the Screen Functions Manual.

    (;-) TP

  5. #5
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    This works

    Code:
    exec.Code("G31 Z -40 F1000"); //probing move
    while(exec.IsMoving()){}
    AS3.Setfield(-1.5, 99);
    AS3.Validatefield(99);
    exec.Code("G01 Z 3");  //move to pierce height

    Thanks Terry. You posted while I was in the shed working it out for myself.

    I will now look if I can add a DRO to the screen set

  6. #6
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    This is why I call it muddling my way through it. Same as I was doing years ago with Mach3 scripts.

    I borrowed an unused field (87)

    It does work.

    Code:
    string PierceHeight = AS3.Getfield(87);
    
    exec.Code("G31 Z -40 F1000");
    while(exec.IsMoving()){}
    AS3.Setfield(-1.5, 99);
    AS3.Validatefield(99);
    exec.Code("G01 Z" + PierceHeight );
    EDIT: There is something funny going on. When I post code, bits of it get dropped.

    When I refresh the page it is correct and then a second later parts of it disappear. What's going on?

    Looked at the same page in the browser on my android tablet. All shows OK.

    Both Firefox and Chrome on the PC drop parts of the code which then means it does not make sense. Always the same bits.

  7. #7
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    Out of curiosity I'm posting the code as text to see if it drops bits of it again.


    string PierceHeight = AS3.Getfield(87);

    exec.Code("G31 Z-40 F1000");
    while(exec.IsMoving()){}
    AS3.Setfield(-1.5, 99);
    AS3.Validatefield(99);
    exec.Code("G1 Z" + PierceHeight );

    EDIT: Blowed if I know whats going on. Drops bits. But when I open the post to do this edit, it all shows up as it should in the editor.

    The bits dropped are Z-40 on the second line, and Z" + on the last line.

  8. #8
    Join Date
    Oct 2005
    Posts
    1145

    Re: Floating head touch off script for UCCNC plasma

    This is why I was hoping for UCCNC to have its OWN website and forum. It is very hard to be able to control all teh weirdness that goes on on some of these sites. It is not the first site that does odd stuff to users. I can name a few more that I use.

    (;-) TP

  9. #9
    Join Date
    May 2006
    Posts
    1469

    Re: Floating head touch off script for UCCNC plasma

    Yeah that would be a big plus for UCCNC to have their own forum. If it is going to do as well as I think it will, then it is almost a must have.

    I notice above that "F1000" becomes an add for amazon. Suspect that has something to do with it.

Similar Threads

  1. Floating Z Head
    By tulsaturbo in forum Mach Plasma / Laser
    Replies: 9
    Last Post: 03-18-2021, 11:55 PM
  2. DIY Floating head
    By kxkid in forum CNC Plasma / Oxy Fuel Cutting Machines
    Replies: 2
    Last Post: 08-11-2013, 01:00 PM
  3. floating head
    By lowfronty in forum SheetCam
    Replies: 1
    Last Post: 07-01-2013, 02:18 AM
  4. 2 pole limit switch wiring for floating Z axis touch-n-go.
    By greenjeens in forum Plasma, EDM / Other similar machine Project Log
    Replies: 0
    Last Post: 06-11-2013, 09:21 AM
  5. floating head
    By lowfronty in forum Mach Plasma / Laser
    Replies: 0
    Last Post: 05-14-2013, 02:36 AM

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
  •