![]() | |
| 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
| |||
| |||
Hello to all i am new with this and i have a problem with a subprogram calling.Is there a way when i call a subprogram to call in from a specific line number something like this g54 x0 y0; m98 p1000; m98 p1000 ???N50; m30; o1000; g91; x50 y20; m99; n50 x55 y30; m99; I am using a Stama MC320 Fanuc 0M system. Regards to all |
|
#2
| |||
| |||
| Instead of using an external (M98) subprogram call use the internal (M97) call to a subroutine in the calling program?
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#4
| |||
| |||
|
Okay, what is the format to for an internal call in fanuc, use that. I do wish the G and M codes had been correctly standardized years ago.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#6
| ||||
| ||||
| May be you can do it that way. Before macro call, define a variable with block number you want to beggin macro and start your macro with GOTO instruction. g54 x0 y0; #101=50 m98 p1000 m30; o1000; GOTO #101 g91; x50 y20; m99; n50 x55 y30; m99; |
|
#7
| |||
| |||
|
|
#10
| |||
| |||
| Like i said i am new with this and i was never used macro i guess i will try to see what will happen ![]() Thanks to all. And i have another question do anyone have Fanuc 0M manual and parameters ... and can he send them to me my mail is castbreeder@inbox.com |
| Sponsored Links |
|
#11
| |||
| |||
| Samu is correct with the easist way to do it. If you have macroB programing option on your control. G54X0Y0 #101=50-----------#101 will be set to the line number you want to jump to in this example its 50 M98P1000 M30 O1000 GOTO#101----------#101 is set to 50 or what ever you set it = to in your main program if #101=60 it would go to N60 G91X50Y20 M99 N50X55Y30 M99 N60X60Y40 M99 In every program you do right before your M98 call set #101 equal to what line number you want to jump to. You don't have to use #101. #1-#33 are local variables and cleared when a program end code is seen or and with reset button #100-#149 are common variables and cleared only at power down #500-#999 are permanent common variables and are never cleared and changed only when you change them. You said your new to this so I figured more detail might help. Stevo |
|
#12
| |||
| |||
|
![]() |
| 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 |
| Running subprograms from hdd | dtmtim | Haas Mills | 18 | 11-22-2010 09:12 PM |
| does camware have a 'where used' for subprograms? | inflateable | Mazak, Mitsubishi, Mazatrol | 3 | 07-09-2008 05:26 AM |
| Help with adding subprograms to post processor | creep_pea | Post Processors for MC | 9 | 11-13-2006 10:56 AM |
| Fanuc output program + subprograms | Mr_T | Fanuc | 9 | 11-29-2005 12:21 AM |
| M97 Internal Subprograms????? | CAMCRASH | G-Code Programing | 6 | 03-24-2005 12:10 PM |