Results 1 to 3 of 3

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

  1. #1
    Registered
    Join Date
    Jul 2005
    Location
    U.S.A.
    Posts
    10
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Jan 2005
    Location
    USA
    Posts
    277
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0
    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, 08:18 AM
  2. Goto Z's button... also the @#$%#$% wizard...
    By InspirationTool in forum Mach Mill
    Replies: 2
    Last Post: 04-01-2007, 10:54 PM
  3. System variables
    By jorgehrr in forum G-Code Programing
    Replies: 8
    Last Post: 02-18-2007, 08:26 PM
  4. G65 local variables help
    By FanukRC in forum G-Code Programing
    Replies: 7
    Last Post: 07-25-2006, 07:00 PM
  5. Common?to Most Surfers
    By Bear in forum Fadal
    Replies: 1
    Last Post: 01-22-2006, 03:13 AM

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.