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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-17-2008, 09:45 AM
 
Join Date: Mar 2005
Location: usa
Posts: 214
Harryman is on a distinguished road
Need help with Gcode for homing

I've got a desktop 4 axis mill with proximity switches on all axis for homing, for XYZ all is good, G28 will home them all or individually just fine. On my rotary A axis, it's a no go. G28A gives me an missing command error and WinCNC my software, doesn't seem to recognize the code. It looks like it'll only home XYZW.

The switch works fine and it'll trip as a limit when wired up that way but I want it to trip only when I home it. I can wire it in as an Aux input but I can't figure out how to write the gcode for a routine to rotate A till the switch trips, stop A, and then set the machine zero.

Thanks in advance.
__________________
www.harryhamilldesigns.com
CAD sculpting and services
Reply With Quote

  #2   Ban this user!
Old 12-17-2008, 01:00 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Doing a G28A0 will send your machine to “HOME” position. Home position is not always your reference position. Which is what I think you are looking for. Sometimes I set up my machining centers to have home position different from machine origin (where your switches will be). You need to give it a G53 in the same command. G28G53A0 should get you there.

Not familiar with your machine. What kind of control do you have on it?

Stevo
Reply With Quote

  #3   Ban this user!
Old 12-17-2008, 08:32 PM
 
Join Date: Mar 2005
Location: usa
Posts: 214
Harryman is on a distinguished road

Thanks Stevo, I tried both of your suggestions but my mill just sits and stares at me.

It's a benchtop mill, a Minitech Minimill 3 Pro with Wincnc (http://www.wincnc.net) running Coolmuscle servos with integrated controllers. (http://www.coolmuscle.com/Motors?motors3=CM1-P-23L20)

I think it's a WinCnc issue and might have to come up with a workaround.
__________________
www.harryhamilldesigns.com
CAD sculpting and services
Reply With Quote

  #4   Ban this user!
Old 12-19-2008, 09:34 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Hmm. Do you have a programming manual for this machine? I looked up the G-code for this machine with the links you provided. Your machine does have G53 but I don't quite understand the definition. One other thing to try put the G53 first before the G28. G53G28A0. G28 is a position and the G53 says it is a rapid movement to the specified position so maybe the G53 needs to be first then sees the position of G28. One other thing is try the G53A0 on its own with no G28. This however should take you to home position and you are looking for orgin.

With the description of the G53 I would think you should get a movement and not the machine just sitting there.

I just caught this in your first post. G28A gives a missing command error. You should have to have a value specified with the A. G28A0.

Stevo
Reply With Quote

  #5   Ban this user!
Old 12-19-2008, 10:20 AM
 
Join Date: Mar 2005
Location: usa
Posts: 214
Harryman is on a distinguished road

Do you have a programming manual for this machine?
No, there's not a lot of documentation concerning Gcode except for the listed commands.

G28G53A0 and G53G28A0 both give me errors for multiple commands.

G53A0 will rotate the axis to what I assume is machine zero.

G28A should home A if WinCnc recognized it I believe, G28X will home X independently for example.

Are the G28 routines usually kept somewhere in like a config file or are they housed somewhere in memory on the board? I've looked all over trying to find the code thinking I could modify the file to work for A but without any luck. Am I completely wrong thinking G28 runs a routine or macro somewhere?

Thanks for your help.
__________________
www.harryhamilldesigns.com
CAD sculpting and services
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-19-2008, 11:06 AM
 
Join Date: Apr 2006
Location: USA
Posts: 187
SCRAPWOTSCRAP is on a distinguished road

I'm not the world's foremost expert but I have a machine with WinCNC, you should have a file named cnc.ini or cnc2.ini (depending on version) for WinCNC. the homing routines should be there along with other startup info.
Be advised I have no rotary axis, in that .ini file is a section for g28 settings, essentially what the machine does after performing the home, you can make adjustments there for what happens after the machine homes, like where the machine moves to after homing. I hope this helps a little. no support from machine manufacturer or WinCNC?
Reply With Quote

  #7   Ban this user!
Old 12-19-2008, 02:34 PM
 
Join Date: Mar 2005
Location: usa
Posts: 214
Harryman is on a distinguished road

I'm pretty familiar with the .ini file, I've configured quite a few things in there to my liking. As per your suggestion, I checked and the G28 settings are configurable as to the approach speed and how far you want the motor to back off after tripping the switch etc. Of course, (D'OH!) I didn't notice that there is a line for g28A and (D'OH again!) it had a "[" preceding it, which disables it.

So, now with that enabled, when I G28A, it spins happily along but nothing happens when it trips the switch. I'll have to do some more investigating on the hardware side to make sure it's all OK, but at least it's progress.

I did email Wincnc, earlier this week and they said they'd look into it. Nothing yet.

Thanks for your help.
__________________
www.harryhamilldesigns.com
CAD sculpting and services
Reply With Quote

  #8   Ban this user!
Old 12-19-2008, 02:57 PM
 
Join Date: Apr 2006
Location: USA
Posts: 187
SCRAPWOTSCRAP is on a distinguished road

Does your axes window on the display show the A axis and the limit switch state? Progress is a good thing, Bill Murray said it best, "Baby Step, Baby Step". I noticed these guys are into wincnc pretty heavy and I think they know their way around the .ini files pretty well, plus like everybody here they are willing to help:

http://www.cnczone.com/forums/showthread.php?t=67525

Doesn't matter if they have routers and you have mini mill, control doesn't know the difference.

After all............we're all in this together.

I hope
Reply With Quote

  #9   Ban this user!
Old 12-19-2008, 08:17 PM
 
Join Date: Mar 2005
Location: usa
Posts: 214
Harryman is on a distinguished road

Well, it's homing via G28 fine now, but whenever it trips the switch while rotating, it triggers a limit which pauses the program. Kind of a deal killer there for a rotary. Wincnc doesn't have a setup for separate home and limit inputs as far as I can tell, which is why I was considering wiring the switch in as an aux in and then writing a macro to home it.

Thanks for the link, I'll check and see what I can learn over there.
__________________
www.harryhamilldesigns.com
CAD sculpting and services
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
HRT 210 homing JAVB Haas Mills 1 12-07-2006 12:44 PM
Homing Sanghera TurboCNC 8 05-09-2006 06:47 PM
homing vs 0,0,0 planeflier Mechanical Calculations/Engineering Design 7 02-07-2006 09:02 PM
I have a problem with my gcode or my conversion to gcode , everything is tiny? NickLatech G-Code Programing 0 03-10-2005 12:46 PM
gcode to gcode converter july_favre General CAM Discussion 4 05-24-2004 06:51 PM




All times are GMT -5. The time now is 12:09 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