586,105 active members*
3,362 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Posts
    10

    Smile Need help with IF ,THEN,AND GOTO USING COMMON VARIABLES.

    Can anyone give me a sample prog.using IF,THEN,AND GOTO as counters
    using common variables.I want to get away from sub-prog's. lots of short runs
    and i think this would save time.only one prog to load,read,etc.

    any help would be greatly appreciated.

    J.B.

  2. #2
    Join Date
    Jan 2005
    Posts
    304

    Samples

    Here are some samples that I use.


    IF[#552EQ666]AND[#547EQ666]GOTO731

    *
    IF[#587NE4100]GOTO500

    *
    IF[#591LT10]GOTO118

    *
    WHILE[#108GT[#109+#110]]DO1
    #108=[#108-#109]

    M98H#502L#111

    END1

    *
    #180=[#571/SIN[90-#570]]
    #180=[[#180*TAN[90/2]]*2](#7/D)
    #181=[[#557/2]/SIN[45]](#5/J)
    #182=[#571*TAN[[90/2]-#570]]
    #183=[#571*TAN[[90/2]+#570]]
    #183=[[#182+#183]/2]
    #184=[#181-#183]
    #183=[#183-#182]

    *
    (milling interpolation)
    G12.1
    G17

    G0U-[[#556-#550]/2]Y[[#557-#550]/2]
    V-[.039-[#550/2]]
    G98G1Z#525+.012F4.
    Y-[[[#557-#550]/2]-[.039-[#550/2]]]
    G3V-[.039-[#550/2]]U[.039-[#550/2]]R[.039-[#550/2]]
    G1U[[#556-#550]-[[.039-[#550/2]]*2]]
    G3U[.039-[#550/2]]V[.039-[#550/2]]R[.039-[#550/2]]
    G1Y[[[#557-#550]/2]-[.039-[#550/2]]]
    G3V[.039-[#550/2]]U-[.039-[#550/2]]R[.039-[#550/2]]
    G1U-[[#556-#550]-[[.039-[#550/2]]*2]]
    G3U-[.039-[#550/2]]V-[.039-[#550/2]]R[.039-[#550/2]]
    G1Y0
    U[[#556-#550]/2]
    G0G40Z-.05

    G13.1

  3. #3
    Join Date
    Jul 2006
    Posts
    65
    Here's a quick Example of a palletizer postioning prog.

    (#616= current row position)
    (#619= total # of rows per pallet)

    O8101(PALLET COLUMN COUNT PROGRAM)
    N2001
    IF[#616GE[#619*2]]GOTO2002
    #623=#616
    #620=#621
    IF[#616GE#619]THEN#623=[#616-#619]
    IF[#616GE#619]THEN#620=#622
    #617=#620-[#623*#618]
    #1132=BCD[#617*10.]
    #616=#616+1.
    M99

    N2002
    #616=0
    M16
    GOTO2001

Similar Threads

  1. GOTO Z button
    By TMaster in forum Mach Mill
    Replies: 10
    Last Post: 05-30-2009, 01:18 PM
  2. Goto Z's button... also the @#$%#$% wizard...
    By InspirationTool in forum Mach Mill
    Replies: 2
    Last Post: 04-02-2007, 03:54 AM
  3. System variables
    By jorgehrr in forum G-Code Programing
    Replies: 8
    Last Post: 02-19-2007, 02:26 AM
  4. G65 local variables help
    By FanukRC in forum G-Code Programing
    Replies: 7
    Last Post: 07-26-2006, 12:00 AM
  5. Common?to Most Surfers
    By Bear in forum Fadal
    Replies: 1
    Last Post: 01-22-2006, 09:13 AM

Posting Permissions

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