![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
We have a sl 25 mf-t6 I think, Fanuc control, I want to try some conditional programming, IFs and GOTOs and such I have the prog and op manual here with me but cannot pinpoint this topic, is it in the FANUC book Ileft at work? I think the machine was purchased new in the mid 90's not entirely sure which version FANUC we have , our FANUC book has 16 18 on the cover... Can anyone give me the proper format for IF/GOTO statements ie G0Z.2 X[#100] Z.1 G71U.150 G71P21Q22U.02W.005F.014 N21G0X[#101]Z.05 G01Z-[#107] ?? IF [#102 EQ 0] N22 X[#102] Z-[#107+#108] ?? IF [#103 EQ 0] N22 blah blah blah N22X[#100] IS THIS ON THE RIGHT TRACK?
__________________ I'm just a butcher masquerading as a machinist |
|
#3
| ||||
| ||||
| IF[#102EQ0] GOTO22 EQ is equal to NE not equal to LT less than GT greater than LE less than or equal to GE greater than or equal to If you want to combine conditional statements: - IF[[#102EQ0]AND[#103EQ0]] GOTO22 AND, OR, XOR DP ps if I can find a mathematical approach that eliminates logic/program branching, I do it! |
|
#4
| |||
| |||
| Good deal I appreciate the feedback, it looks like I just grabbed the wrong manuals I will get the FANUC book tom. when I try to finalize this litle program. Cheers!
__________________ I'm just a butcher masquerading as a machinist |
|
#6
| ||||
| ||||
| Hello. I have written a simple Macro B PC Desktop Application to find variables and a Macro B programming manual. Both are available to download free from CNC Data Limited :: CNC Data Monitoring and Collection under the downloads section. Hope this helps.
__________________ CNC Data Ltd www.cncdata.co.uk |
|
#7
| |||
| |||
| Aparently everyone who commented thus far failed to actually think about what your program is doing. You CAN NOT use conditional statements within a roughing/finishing cycle (G71). There are numerous other ways to make a variable program work while still using a canned cycle, for example using incremental programming within the cycle. If you do not want a certain move made, the variables corresponding with that feature would equal zerom therefore when the machine read U0. V0. W0. etc., it simply would continue to the next program line without axis movement. Hopefully I shed a small bit of light onto your problem. I have wrote countless variable programs for Fanuc controlled lathes, for simple to highly complex including 3 axis live-tooling work. It's not impossible. Nothing is. You just need a little shove in the right direction sometimes. |
![]() |
| 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 |
| Need some direction creating variable prog. | gogego | Mori lathes | 1 | 08-02-2011 01:29 PM |
| Outputting Common variable values into a program (with automated program number) | yaji63 | Fanuc | 0 | 12-27-2010 02:55 AM |
| Creating Sub Program In Genises | bri008 | CNC Machining Centers | 7 | 09-08-2009 05:58 AM |
| Need Help!- variable program | caddisfly | Fadal | 16 | 08-31-2009 11:05 AM |
| help creating program | brockadeau | Mechanical Calculations/Engineering Design | 1 | 11-16-2007 08:01 PM |