586,884 active members*
3,905 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2013
    Posts
    45

    Torch Height Offset Confusion?

    Tom,

    I am trying to offset the Z axis on a plasma table to find the material. I am doing something wrong and need some assistance. I am using KMCNC version 4.33cc. My test G code looks like this.

    Code:
    G17 G20 G90 
    G00 X1.0 Y1.0
    M100          
    G91 G00 Z.1
    (Start Torch)
    (Move X & Y)
    (Stop Torch)
    M101
    This is the c program for the M100 and I am using Exec/Wait in the Tool Setup. The torch is spring loaded and hits a switch when it runs into the material.

    Code:
    #include "KMotionDef.h"
    
    #define TS 19 			//Tool Sensor Input
    
    //Program to send Z axis down and find top of material
    main()
    {
    Jog(2,-50000);			         //Down speed and direction
    while(!ReadBit(TS));
    Jog(2,0);			                 //Stop at material
    while(!CheckDone(2));
    Jog(2,30000);			         //Reverse off of switch
    while(ReadBit(TS));
    Jog(2,0);			                 //Stop off switch
    while(!CheckDone(2));  
    MoveRelAtVel(2,900,5000);  	 //Retract length to top of material
    while(!CheckDone(2));
    }
    The problem is when the M100 completes the Z axis DRO goes to Zero on the machine coords. This is a problem when returning the Z to the "home" position. I wrote a c program to reference the Z (M101) but it holds the last value from when the M101 was executed. So if I end the cut at Z.1 the Z DRO shows a .1 when the M101 completes.

    Here is the M101 c program.

    Code:
    #include "KMotionDef.h"
    #include "Init_Burn Table.c"
    
    main()
    {
        int SaveZLimits,ZSWN,ZSWP,LZ;  //place to save limit switch settings
    	
        // disable the limits (first save how they were set) 
        SaveZLimits = ch2->LimitSwitchOptions;
        ZSWN = ch2->SoftLimitNeg;
        ZSWP = ch2->SoftLimitPos;
        ch2->LimitSwitchOptions = 0;
        ch2->SoftLimitNeg = -1000000;
        ch2->SoftLimitPos = 1000000;
     
        // Home Z 
        Jog(2,60000);             
        while(ReadBit(Limit_Z));
        Jog(2,0);				
        while(!CheckDone(2)) ;
        Jog(2,-15000);
        while (!ReadBit(Limit_Z));
        Jog(2,0);
        while (!CheckDone(2)) ;
        MoveRelAtVel(2,-3000,30000);
        while (!CheckDone(2)) ;
        Zero(2);				                
        ch2->LimitSwitchOptions = SaveZLimits;  // restore limit settings
        ch2->SoftLimitNeg = ZSWN;
        ch2->SoftLimitPos = ZSWP;
     }
    Thanks

  2. #2
    Join Date
    May 2006
    Posts
    4047

    Re: Torch Height Offset Confusion?

    Hi Epiphany,

    I don't really follow that entirely, but with any C Program like this that moves any axes use the Exec/wait/sync option. Otherwise the Interpreter will be out-of-sync and a discontinuous motion may result in a position loss.

    HTH
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Nov 2013
    Posts
    45

    Re: Torch Height Offset Confusion?

    Tom,

    That did it. I was not using the sync option and that caused the problem. Now when the M100 completes my machine coords remain unchanged.

    Cheers

Similar Threads

  1. How to set zero for torch height
    By kxkid in forum CNC Plasma / Oxy Fuel Cutting Machines
    Replies: 15
    Last Post: 08-10-2013, 01:41 PM
  2. Torch Height ?
    By rtsplace in forum Hypertherm Plasma
    Replies: 5
    Last Post: 04-03-2011, 09:09 PM
  3. VMC Fixture Offset Confusion
    By rdoty in forum Fadal
    Replies: 8
    Last Post: 08-20-2009, 11:29 PM
  4. OSP-U10L tool offset confusion
    By brokenrinker in forum Okuma
    Replies: 9
    Last Post: 04-10-2009, 04:22 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
  •