CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-30-2009, 08:28 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road
can we read the current status of a parameter

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?
Reply With Quote

  #2   Ban this user!
Old 11-30-2009, 10:29 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Sinha,
What parameter are you trying to read and on what kind of control?

Stevo
Reply With Quote

  #3   Ban this user!
Old 12-01-2009, 01:15 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

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.
Reply With Quote

  #4   Ban this user!
Old 12-01-2009, 06:14 AM
 
Join Date: Nov 2006
Location: Bulgaria
Posts: 162
f-bu is on a distinguished road

User program can not read parameters, only PMC and a program, executed by macro executor/C-executor can do that
Reply With Quote

  #5   Ban this user!
Old 12-02-2009, 08:06 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by sinha_nsit View Post
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.
Not the parameters you are looking to read. Out of curiosity what is the reason that you would like to do this? Are you trying to setup some kind of standard programming database with maybe general programs that can run on any machine regardless of the settings in the control?

Stevo
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-02-2009, 11:30 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

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.
Reply With Quote

  #7   Ban this user!
Old 12-03-2009, 07:29 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

I know what you mean. I love to test things just for gaining the knowledge of can it work.

What do you mean by undo the G10??

Stevo
Reply With Quote

  #8   Ban this user!
Old 12-03-2009, 09:15 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

By undoing G10, I mean restoring the values changed by G10 (at the end of the program), which is not possible because we do not know the original values. G10 simply overwrites.
Reply With Quote

  #9   Ban this user!
Old 12-03-2009, 11:23 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #10   Ban this user!
Old 12-03-2009, 11:36 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

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!
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 12-04-2009, 08:06 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road
Anyone else on G10 reasoning??

Originally Posted by sinha_nsit View Post
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!
Sinha……good question.

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
Reply With Quote

  #12   Ban this user!
Old 12-05-2009, 12:32 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by stevo1 View Post
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
Stevo
I have not used G10 much, so I have a confusion.
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?
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 01:52 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361