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 10-24-2008, 01:27 PM
ataxy's Avatar  
Join Date: Jul 2005
Location: canada
Posts: 969
ataxy is on a distinguished road
little gcode problem i guess

ok i recently acquired a syil x4+ and am getting back in the whole programming thing, for the last few year i have been operating but not programming and fortunately for us as operator the programmer is really good so we dont have to fiddle much with the code in the machine so now that i have my own cnc i have to figure out a bunch off thing that i forgot how to take care of.

so here is my problem i am currently trying to do a test part to see if the machine does what its suppose to do and if the tolerance are respected now here is the problem.

the first operation seem to go fine machine starts from its home position goes to its g54 to do the contour of the part then it does the central pocket all with the same tool ounce this is done it goes back to it home position to call a tool change to do the to little pocket in the central pocket and this is where it bugs

N5200 G1 Z.1 F6.33
N5210 G0 Z2.
N5220 M5
N5230 G91 G28 Z0. M9
N5240 G28 X0. Y0. A0.
N5250 M01
( 15/64 LEFT SIDE CENTER POCKET TOOL - 3 DIA. OFF. - 3 LEN. - 3 DIA. - .234375 )
N5260 T3 M6
N5270 G0 G90 G54 X1.3271 Y1.3464 A0. S3000 M3
N5280 G43 H3 Z2. M8
N5290 Z.1
N5300 G1 Z-.38 F6.
N5310 X1.3264 F10.
N5320 X1.3242 Y1.3522


now normally what its should do is ask for tool change, which it does, then i press cycle start and it should go to its g54 which should be its work zero but instead it seem to be trying to go to X1.3271 Y1.3464 from its home position and then from there well to machine goes over travel does anybody have an idea as to why it does that...???
__________________
The opinions expressed in this post are my own. -Les opinions exprimé dans ce messages sont les mienne
Reply With Quote

  #2   Ban this user!
Old 10-24-2008, 03:03 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

It wants to go there because you have it programmed to go there.
N5270 G0 G90 G54 X1.3271 Y1.3464 A0. S3000 M3

If G54 is the center of the pocket then the code above is telling it from G54 go X1.3271 Y1.3464. What you want to do is G0G90G54X0Y0A0S3000M3 This will take you to G54 position.

Stevo
Reply With Quote

  #3   Ban this user!
Old 10-24-2008, 03:12 PM
ataxy's Avatar  
Join Date: Jul 2005
Location: canada
Posts: 969
ataxy is on a distinguished road

i am not sure i get what you are saying in this case
if i am reading it right it should be
from the g54 ,position your self at X1.3271 Y1.3464... no!
so g54 x0 y0 would just put it in the corner of the block
but my problem is that instead of going to the block it try to make its move from the home position and not from the work offset position so i guess then my code is right its mach3 that does not make the good move
__________________
The opinions expressed in this post are my own. -Les opinions exprimé dans ce messages sont les mienne
Reply With Quote

  #4   Ban this user!
Old 10-24-2008, 03:56 PM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

This is a Mach3 controller?

Never had the pleasure of running one.

Try putting your G54 G90 on line N5265. Somehow its not reading the G54 on the line its programmed.
Reply With Quote

  #5   Ban this user!
Old 10-24-2008, 04:14 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Hmm. Ok so your G54 X0Y0 is the corner of the block and your center of the pocket is X1.3271 Y1.3464 from G54. Is your G54 set up properly? When you found the corner of the part you put the "machine" position in the G54 offsets. If so then yes your code should be correct.

As like Beege I do not have any experience on a Mach3 control if thats what it is. Try doing what Beege said. In a seperate line before your X and Y movement put the G54. It might be that it is not instating the G54 until the next line of code. I have seen that before. I have had to set parameters in the Fanucs that are for instating an offset in the same line or the next exacuted line. Worth a shot.

N5260 T3 M6
N5265G0G90G54
N5270X1.3271 Y1.3464 A0. S3000 M3
N5280 G43 H3 Z2. M8

Stevo
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-24-2008, 05:55 PM
ataxy's Avatar  
Join Date: Jul 2005
Location: canada
Posts: 969
ataxy is on a distinguished road

yep ill try this out, for now family mater call, got to take care of the kid and do my father duty will post back later.
__________________
The opinions expressed in this post are my own. -Les opinions exprimé dans ce messages sont les mienne
Reply With Quote

  #7  
Old 10-24-2008, 07:56 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,455
ger21 is on a distinguished road
Buy me a Beer?

G54 is Mach3's default coordinate system, so calling G54 probably doesn't actually do anything, because you're probably already in G54.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #8   Ban this user!
Old 10-24-2008, 08:45 PM
ataxy's Avatar  
Join Date: Jul 2005
Location: canada
Posts: 969
ataxy is on a distinguished road

Originally Posted by ger21 View Post
G54 is Mach3's default coordinate system, so calling G54 probably doesn't actually do anything, because you're probably already in G54.
i dont get it then since it did the two first operation wich was the contour and the big pocket how did it knew where the part was, unless i dont get what you are saying? cuz from what i get from your post g54 would be equivalent to its home position?? or am i wrong... anyway another thing is i took a look at a post for mach3 from nova... something website that was made for mach9 and with that post it does not do any g28 or infact as you point do any g54 for that mater it does it like this

N5310 G03 X3.6442 Y2.7049 I-.0625 J0.
N5320 G01 Z.1 F6.33
N5330 G00 Z2. M09
N5340 M05
N5350 T3 M06 (15/64 LEFT SIDE CENTER POCKET)
N5360 (MAX - Z2.)
N5370 (MIN - Z-.62)
N5380 G00 Z2. M08
N5390 G00 X1.3271 Y1.3464 S2000 M03
N5400 Z.1
N5410 G01 Z-.38 F6

but then i dont get it from what i get you only have 2 inches in between your part and the quill to do your tool change??... oh no now i get it what i have to do is set my clearance to something like 8" but then again i dont get it how does it figure were the part is if it does not take note of the g54...
__________________
The opinions expressed in this post are my own. -Les opinions exprimé dans ce messages sont les mienne
Reply With Quote

  #9   Ban this user!
Old 10-24-2008, 09:33 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Executing a G54 doesn't cause any movement. It sets the machine offsets to the G54 coordinate system.

Looking at this line of code:
G0 G90 G54 X1.3271 Y1.3464 A0. S3000 M3

It is basically saying:
G0 (Set modal rapid motion)
G90 (Use absolute coordinates)
G54 (Use the G54 coordinate settings)
X1.3271 Y1.3464 A0. (Move to these coordinates)
S3000 M3 (Turn the spindle on and set the speed to 3000rpm)

You have to decide where you want the origin for the part, set the G54, G55 or which ever coordinate system you want to run in and then program the cuts relative to that origin.

I set my G54 origin with this line of code:
G10 L2 P1 X0.0 Y0.0 Z0.0 (set to home P1==G54, P2==G55, etc)
Then you could set your G55 origin with something like this:
G10 L2 P2 X1.3271 Y1.3464 Z0.0 A0 (but where ever you want it to be)
Then you could invoke:
G55
G0 X0 Y0 A0
(do some operations)
G54 (restore home coordinates)

I am running EMC2 but since Mach originated in EMC also, I would expect that the code for this would be similar.

Alan
__________________
http://www.alansmachineworks.com

Last edited by acondit; 10-24-2008 at 09:51 PM.
Reply With Quote

  #10   Ban this user!
Old 10-24-2008, 10:03 PM
Bamber's Avatar  
Join Date: May 2008
Location: Australia
Age: 73
Posts: 18
Bamber is on a distinguished road

Have you checked the values in the G54 parameters?????

Dave
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-24-2008, 10:11 PM
ataxy's Avatar  
Join Date: Jul 2005
Location: canada
Posts: 969
ataxy is on a distinguished road

I understand the g54 is not a movement code but were the zero or origin of my part is but you have to call it if i am not mistaking or else the machine is just going to start its move from were its is... no? from what i got from the post of ger21 i do not need to call a g54 in mach as mach will automatically consider a move with no work offset as a move using g54... no? to be honest with you G10 L2 P2 its the first time i see this code and i never got to use this so you sort of lost me there, but ill have a look at how to use it and if mach3 use it.
Didnt know about mach3 originating from emc!

As for this:
G0 (Set modal rapid motion)
G90 (Use absolute coordinates)
G54 (Use the G54 coordinate settings)
X1.3271 Y1.3464 A0. (Move to these coordinates)
S3000 M3 (Turn the spindle on and set the speed to 3000rpm)
I totally agree its just that in the case of my current problem seem to be like beege is saying so instead of go to its g54 and positioning its self X x.xxx and Y y.yyy from the work offset (g54) it try to do it from home position (g28) effectively going over travel also as i said my g54 is good as the two first operation it does with tool 2 are good its just that ounce its done and the tool change as been done it, it seems to be trying to go to the X and Y before it takes into consideration the g54.
__________________
The opinions expressed in this post are my own. -Les opinions exprimé dans ce messages sont les mienne
Reply With Quote

  #12  
Old 10-25-2008, 07:27 AM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

I'd be surprised if G54 is Mach's default coordinate system, it might be the default workshift, but the real coordinate system that belongs to the machine (and where G28 references) is G53.

That call for G28 X0 Y0 A0 at the tool change bothers me a bit. That is a command to move to machine zero through points X0 and Y0. Since G91 was not commanded on that line, it may have attempted to move through the current workshift's X0Y0. Without being there and experimenting with the machine, its tough to guess what the control would try to do.

So perhaps try
G00 G91 G28 X0 Y0
as the 'fully written out' command.

Also as a safety, after a tool change it is a good habit to insert a safety line like this:
/G0 G54 X0 Y0

This sends the tool to the workshift X0Y0 where you can do a visual check that indeed the tool is at the datum. Once you get into running the program repeatedly, you can then skip this move with the block delete switch.
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
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
KMB1 gcode problem mmachining HURCO 2 10-06-2008 10:58 PM
Need Help!- GUESS: Home Limit or Both Mr.Chips General Electronics Discussion 8 03-20-2008 11:03 AM
Cam to gcode problem Sonicmook56 General CNC (Mill and Lathe) Control Software (NC) 3 12-24-2007 07:01 AM
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
dxf to gcode problem... freezer General CAM Discussion 9 02-19-2004 12:02 AM




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