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 > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-22-2009, 08:44 AM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road
current axis position

are there machine variables that have the current axis positions that i can access from gcode? #5061 #5062 ---etc give the probe impact value but i want the value at program start and after a move.
I have some irregular stock (reclaimed machinable wax) i want to machine it to a standard thickness. so i am trying to write a program that starts with the z axis zeroed to the bottom of the stock and the tool setting at the z-max of the stock. i want to run a surfacing pattern in a loop stepping z until i get to the pre set thickness.
this is simple to do if i can read the current position in the gcode.
where in the documentation would i likely find this information?
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

  #2   Ban this user!
Old 03-23-2009, 08:28 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

For looping look in the O code section of the manual.

http://www.linuxcnc.org/docview/deve...ml#cha:O-Codes

If your stock is different heights can you adjust your number of loops or something like that...

Are you using 2.3 or 2.2.x?

John
Reply With Quote

  #3   Ban this user!
Old 03-24-2009, 06:20 AM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road

Thanks John.
i understand about writing loops and using variables. I can get the job done by measuring the thickness of the wax and entering that in the program, and that works fine. What i want to do is mount the hunk of wax with the z axis zeroed to the bottom of the piece/top of the fixture, and with the z step down set in the program start from where ever the machine is setting and make surfacing passes to my predefined thickness. I am trying to get around editing the program for each hunk of wax, because i am a klutz and i don't trust my typing all that much. so in use i would mount the wax run the tool to the highest point and start the program. taking off the z step thickness or fraction of for the last pass.
i am not sure which version of emc2 i have. I downloaded the live cd for hardy heron, it came with axis 2.2.7 if that helps.
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

  #4   Ban this user!
Old 03-24-2009, 08:39 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

If you don't mind using a beta version you can upgrade to 2.3 beta and use G28.1 or G30.1 to store your current locations then do the math in your loop to figure out how many passes you need.

http://www.linuxcnc.org/docview/deve...sec:G30,-G30.1

and to upgrade

http://wiki.linuxcnc.org/cgi-bin/emc...?UpdatingTo2.3

John
Reply With Quote

  #5   Ban this user!
Old 03-24-2009, 08:56 AM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road

thanks again BigJohn g30.1 is exactly what i want. I will have to think about upgrading to 2.3beta.
I am just getting started with cnc milling and i don't know if i want the extra anxiety of unstable software. Ill have to do some reading about 2.3
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-24-2009, 09:03 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

So far 2.3 seems to be bug free... I have it on two computers now and have been using the pre 2.3 on my plasma cutter for quite some time (a year maybe). It doesn't look like much of a pain to revert back to 2.2.x should you want.

John
Reply With Quote

  #7   Ban this user!
Old 03-24-2009, 09:31 AM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road

the upgrade seems simple enough. i think you talked me into it. i have some things to run this morning, but should enough time to do it this afternoon.
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

  #8   Ban this user!
Old 03-24-2009, 09:44 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

When you get your code worked out if you don't mind sharing post it here or send it to me. It sounds like some useful reusable code.

John
Reply With Quote

  #9   Ban this user!
Old 03-24-2009, 12:34 PM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road

i upgraded. mostly going ok. i had trouble getting the x axis to home. no matter where i set it when i hit home axis it set x to -.5499

i greped the machine config directory for 5499 and found that in emc.var 5221 was -0.549925. changed the entry to 0.00000 and i can now home x ok

while i was editing emc.var i noticed that 5223 is set to -0.00000. is that meaningful ?

now to go see if g30.1 and g28.1 work
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

  #10   Ban this user!
Old 03-24-2009, 01:04 PM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

Not that I know of. There is a menu item under Machine to clear offsets... Don't know what all it will clear off the top of my head. Sounds like your making progress now. IMHO 2.3 is WAY better from every aspect.

Keep us posted or pop in on the IRC and chat with the rest of the EMC group. Just click on the embedded java client if your not savvy with the IRC on this page.

http://www.linuxcnc.org/content/view/4/8/lang,en/

John
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-26-2009, 09:52 AM
 
Join Date: May 2008
Location: usa
Posts: 29
cxevalo is on a distinguished road

i got to work on the program for a while this morning and have a subroutine doing one pass correctly.
now i have to write write a subroutine to do the inverse pass machining back to the start.
then add a z step loop and it will be soup.

there are a few nasty things going on with the conditionals when you put then in a while statement. It took me some time to hack around the problem. it makes the program klunky but i think its a real bug.
what happens is if you use a GE in a while as in:
o100 while [ # GE #]
and then put an 'if' statement inside the 'while' loop emc goes into an infinite loop trying to calculate a tool path. with no conditionals inside the loop GE is fine LE does the same thing.

i will have to play with it some more to be sure of all the conditions that make it crash.
__________________
If you are not having fun, you are not doing it right.
Reply With Quote

  #12   Ban this user!
Old 03-26-2009, 09:58 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,081
samco is on a distinguished road

could you post the program that doesn't work?

thanks
sam
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!- angle position axis bfservice Fanuc 2 09-28-2008 09:51 PM
Help needed with z-axis position Spazdemon AjaxCNC Control Products 5 05-08-2008 11:24 PM
x-axis losing position...??? shnitzel Servo Motors and Drives 11 09-29-2007 12:46 PM
What is your current CNC Position? rodneydeeeee Polls 1 04-22-2007 09:03 PM




All times are GMT -5. The time now is 05:34 PM.





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