585,741 active members*
5,016 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    1542

    modify drill macros

    I'm having a brain fart on what should be an incredibly simple code modification. I'm real good at writing my own code from scratch, but always get stuck modifying existing logic.

    On all the drill macros, I want to change the end point of the Z location depending on codes G98 and G99. If G98 is issued the macro should end with the Z position the same as when the macro began. If G99 is issued, the macro should end with the Z position at the R point level. This is the way my fanuc machine does it.

    So, I changed G98 and G99 to just change the value of a variable, \998.

    Here's the [[G81]] macro in my cbk: (I want to change all the drill macros the same)

    [[G81]]
    ' G81
    ISTHERE Z;\400;\401
    IF\400>0THEN\776=\401
    DECELSTOP
    RAPID x;y;r
    GO x;y;\776
    DECELSTOP
    RAPID x;y;r


    I'm thinking all I need to add is the line "READOUT3 \997" to the first line, and the command "IF \998=1 THEN RAPID ;;\997" to the last line. But, I'm missing something. The machine is slamming into my limit switch.

    Any suggestions?

    <Special note to Camsoft guys, my pop3 email server is blocking you as spam and/or virus>

    Karl

  2. #2
    Join Date
    Mar 2004
    Posts
    1542
    correction, I'll also need to change the line
    RAPID x,y,r

    to RAPID x;y
    RAPID ;;R

    Don't want machine to angle down to point. Move over x and y, then straight down to r level.

    Karl

  3. #3
    Join Date
    Apr 2003
    Posts
    332
    Hello Karl,

    We had sent you some instructions and examples a couple of days ago. One of the others here also sent it to your wife's e-mail address. The one with the under-score in hopes that it would get through. Maybe it's there or look the Spam or Delete Folder.

    Can you send us an e-mail that we can reply to that is set not to block or provide us with your fax number?

    Tech Support
    CamSoft Corp.
    (951) 674-8100
    [email protected]
    www.cnccontrols.com
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •