![]() | |
| 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
| |||
| |||
G10 can be used to overwrite a parameter. Sometimes it may be desirable to store the current value of a parameter before changing it, so that it could be restored later on. System variables are available corresponding to certain parameters, so these can be read. What can be done if no system variable is available? Taking a backup is a different thing. I am wondering if it can be done through the program. The question in short is, can we read a parameter? |
|
#3
| |||
| |||
| For the sake of discussion, I would just give a theoretical example which may not have any practical relevance: Let us say I have to execute a program on a machine which is new to me and it may have G-code system A, B or C. I can write the program in three parts, suitable for the three system. A conditional statement in the beginning of the program, based on parameters 3401#6 (GSB) and 3401#7 (GSC), would jump to the relevant portion of the program. For this, I should be able to read these bits inside the program. A different way would be to write the program in, say, system A, change parameter setting to system A in the beginning of the program (using G10 L50), and restore the original setting at the end of the program. For this also, one would need to know the original setting. Another example could be associated with DPI setting (3401#0). My program should run as expected, irrespective of this setting. Of course, one can always look into the parameter screen and find out the setting. I want to know if it is possible to read a parameter setting inside a program? With the limited knowledge I have, I believe the answer is NO. Please confirm. |
|
#5
| |||
| |||
| Stevo |
| Sponsored Links |
|
#6
| |||
| |||
| Many a time I try to explore certain things just for the sake of learning or out of curiosity, to find out what is possible and what is not. Some time back there was a discussion on how to undo G92. Thinking on a similar line, I wondered if it is possible to undo G10. In fact, it may be more desirable because the effect of G92 is temporary (in the current machining session only), whereas G10 changes data permanently. Possibly, in a future version, Fanuc would introduce "Programmable Data Output"! In fact, they have partially done this by defining system variables corresponding to some parameters. |
|
#9
| |||
| |||
| Hmmmm….I disagree. Depends on what you want to change with your G10. If you were writing a program to say shift your workcoordinates many times throughout a program using the G10 it really doesn’t matter what the end result is. The important part is to know what it is before you started. You could do this by storing the coordinate in a variable or just knowing the hard number you want it to be. #500=#5221(stores current X of G54) G10L2P1X10 … …change the coordinate with G10 as many times as you want … #5221=#500(sets G54 X back to original setting) M30 If you were using incremental you could go as far as using a variable to keep tracking the total distance moved and reset it to that at the end. Stevo |
|
#10
| |||
| |||
| OK. But this is possible because there is a system variable associated with offset values. What to do for those parameters for which there is no system variable defined? And If a system variable is available, why at all use G10! |
| Sponsored Links |
|
#11
| |||
| |||
I would use the G10 for many reasons even though there is a system variable that I can use. I have a lot of extensive macros written for the guys but I leave them the option of what work coordinates they want to use for their setup. If I were to hard code the system variable for say G55 to go back to its original value they would not be able to use anything other than G55 for their setups. I have 2 ways I do this. 1. is the guys will plug in the coordinate they are using into say #100 and then store their current settings of the coordinate they are using. Say they set #100=58 #500=#[5201+[[#100-53]*20]]----sets #500 = to current setting of G58 X #501=#[5202+[[#100-53]*20]]----sets Y #502=#[5203+[[#100-53]*20]]----sets Z … … G10L2P[#100-53]X#500Y#501Z#502 Now can this be done without using the G10 function…absolutely. However if you are shifting a coordinate incrementally throughout 1 or multiple programs it is much easier to program: G10G91L2P[#100-53]X1. Rather then #[5201+[[#100-53]*20]]= #[5201+[[#100-53]*20]]+1. One other way I like to do it is by using the modal coordinate which is held in #4014 so I would replace the #100 with #4014. This I will commonly use when I have multiple macro and nested programs all running at the same time and that may use extended coordinates and are hard to keep track of. The program will just simply use whichever is modal. Basically the programs get so in depth that I can't keep track of everything and start to loose my place .G10 can simplify programming but if you want to set specific parameter bits while machining G10 is the only way you can do so. Ok after typing all of that I am starting to ask myself the same question as Sinha. For sake of simplifying the programming what other reason would G10 be used for if system variables are available?? Thoughts anyone? ![]() I know there is a good reason but it's Friday and my mind is burned out so thats all I got. Stevo |
|
#12
| |||
| |||
For #100 = 58, #500 would store the current contents of the system variable corresponding to G58 X. When the same value is written into G58 X, through G10, what would change? |
![]() |
| 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 |
| read status of MDI spindle controler key from Okuma Robusturn LFS12 LOADER SUBprogram | ohallock | Okuma | 1 | 11-18-2009 01:17 PM |
| Read Current Position? | andypugh | General CNC (Mill and Lathe) Control Software (NC) | 4 | 05-08-2009 06:40 AM |
| Current Tool Status | barbter | NCPlot G-Code editor / backplotter | 5 | 07-10-2008 09:09 PM |
| How can I read the running current? | rolveram | Gecko Drives | 1 | 07-03-2007 01:22 PM |
| Current Status | jabuffi | OpenSource Software | 20 | 11-02-2006 02:08 AM |