![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GOTO Z button | TMaster | Mach Mill | 10 | 05-30-2009 08:18 AM |
| Goto Z's button... also the @#$%#$% wizard... | InspirationTool | Mach Mill | 2 | 04-01-2007 10:54 PM |
| System variables | jorgehrr | G-Code Programing | 8 | 02-18-2007 08:26 PM |
| G65 local variables help | FanukRC | G-Code Programing | 7 | 07-25-2006 07:00 PM |
| Common?to Most Surfers | Bear | Fadal | 1 | 01-22-2006 03:13 AM |