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! > CAM Software > SolidCam


SolidCam Discuss SolidCam software here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-29-2009, 09:53 PM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Profile - Depth Type 3D - G Code

Hi Guys,

Got some strange G code output going on, and wondered if anyone can throw light on it.

I'm milling around a profile using 3D depth type. The simulation works fine, but the problem occurs at the G code generation.

If I select to rough only then the code is fine. G90 absolute coordinates and just as I planned.

If I rough and finish in the same op then it's also fine. Same as above (G90).

But, if I select to just finish then the G code goes very strange. The toolpath goes haywire. Parts of the code are in G90 absolute and other parts are in G91 incremental. This would be ok, but it's calling a G91 where it should be a G90. Not always in the right place though.

It's obviously something to do with my .mac & .gpp files as if I use the supplied fanuc.mac and fanuc.gpp files the output is different again. In some cases putting a G90 and G91 on the same line.

Confused!

I fiddled the code (using Cimco Edit) and all's well on the machine, but I can't be doing that all the time.

I'm guessing that I need to print out the gpp tool help manual and take it to bed for bed time reading.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 02-02-2009, 02:58 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Hi Matt,

Take a look in your GPP file and near the top look for a commented out "trace" command. Delete the comment, save the file and post out your code - the output will show what the CAM is putting out and what sub-routine in the post is generating your odd code. My guess is a sub call in either @line or @rapid is causing the problem, but that is only a guess and you really need to examin the debug code.

All the best

Bob
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 02-11-2009, 10:17 PM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Bob,

Well, it's been awhile but I eventually got around to trying to sort this out.

It seems that the @absolute_mode section in the gpp file was a little lacking:

-------------------
gcode = 90

skipline = true
endp
-------------------

Changed it to:

-------------------
gcode = 90
{nb, 'G'gcode, ' '}
skipline = true
endp
-------------------

And now works a treat.

No idea where the missing line went to, but I've simulated both old and new programs back to back and this seems to have solved the issue for now.

Now I must go to back of class and write lines.....

Check gpp file
Check gpp file

etc etc etc.........
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 02-12-2009, 02:56 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Originally Posted by mattpatt View Post
Now I must go to back of class and write lines.....

Check gpp file
Check gpp file

etc etc etc.........
Hey Matt, that seems a little harsh. Far better to study the manual and plan how you would build a new version of your post from the ground up.

Bob
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 02-13-2009, 05:14 AM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Bob,

You are right of course.

This may sound like a stupid question, but what's the best plan? Up to now I've pretty much skipped through the manual as and when I've had a problem. Mostly I can solve it, or at least see what's going on, but as for writing my own from scratch!

Oh well, I guess it's just a case of getting stuck in and getting on with it.....but any suggestions would be very welcome.

Matt.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-14-2009, 10:21 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Matt,

I found writing my own posts one of the most satisfying things I have do regarding CNC. I start by writing a specification - nothing fancy, just a good description of how I wanted the code to look illustrated with examples. Things such as what happens at the beginning of a program, what happens at tool change and what happens between each cut or pass. Remember, the actual cutting bit of code is the most straightforward and the hardest bit is the code around toolchange - it is very easy to send the tool straight through the job if G28 is missing. Think about what happens when and the logic behind it, such as "if I have work work offsets in my CAM program, how do I want the machine to handle the change from one offset to the other?". This is crucial if sometimes Offset 1 is 150mm higher than Offset 2. Think very hard about the different circumstances and plan the logic about that.

I started tweaking SolidCAM posts by completely rewriting the drilling section of my GPP file, first to reflect all the canned cycles on my machines then to provide specialist code such as peck drilling with G00 and G01 (because sometimes our SH400 alarms out if it does too much G83 - go figure) or spiral hole milling. Then I moved on to handling pallet rotation bith a B axis - ah, the delights of @tmatrix! From there it was just a short step to tool changes and vóila, you have a post. Then come the scary stuff when you have to test it, watching like a hawk. Just as you think you have it nailed, some situation you haven't foreseen occurs and your code isn't up to it, so it is back to the GPP file and think again. This happens a lot at the beginning of the development process but you will get there in the end.

Matt, have you done any sort of computer programming? I mean things like BASIC or other computer languages. If you have, then will be familiar with the concept of variables and their types, if you haven't you need to study that bit of the manual in particular. The main uses of the variable types is as follows
NUMERIC : any number that has decimals, so if you want a variable to store an axis position for some reason, this is what you would declare it as.
INTEGER : a whole number. Used when counting something. I used this in my peck drilling cycle to count how many loops (or pecks) a drill had done before exiting the loop and drilling to the final depth.
LOGICAL : a simple yes or no. I use logical (or BOOLEAN) variables for things like "is this the first rapid move? If YES, insert a spindle start"
STRING : anything that is text (and may include numbers). Used for generating comment lines and other things. For example I use string variables for generating comment lines in the program and to create a textfile separate from the program giving a listing of all the tools and the CAM job names

I have gone a bit longer than I meant to, sorry.

Hope this helps.

Bob
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 02-15-2009, 08:52 PM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Bob,

"I have gone a bit longer than I meant to, sorry."

You could have gone on a lot longer and I wouldn't complain Shame you're not here in Thailand, 'cos I'd rack your brains for hours!

At the moment I'm reasonably happy with most things, but there are couple of little quirks that I'd like to change. For example, I still haven't sussed out the G80 generation that isn't happening after 3-d drilling, but since I don't use it a huge amount at this time I just (lazily) keep writing it in manually.

I'm also not sure if I can generate a G2/3 code is the XZ and YZ axis. It would have been jolly handy on the last job I did, which was two R42mm channels, along a block. I used linear technology to semi-finish and finish the part. It came out quite sweet, but the program was all linear moves and nearly 2 million lines to the program! I had a look through the manual, and changed a couple of things in the files but it still put out linear moves and not G2/3. Hmmmm.

Anyway, It looks like my best approach for now is to take it a step at a time and build up to the final (for now) version.

Thanks for offering your advice.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 02-16-2009, 03:33 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Originally Posted by mattpatt View Post
For example, I still haven't sussed out the G80 generation that isn't happening after 3-d drilling, but since I don't use it a huge amount at this time I just (lazily) keep writing it in manually.

I'm also not sure if I can generate a G2/3 code is the XZ and YZ axis.
The 3D drilling is a little odd as the G80 call needs to be generated for @drill_point (he says working of memory - it's two years since I did that in my post!). Like you, I hardly ever use 3D drilling - all my holes are on different angular displacements.

You can get SolidCAM to use G18 and G19 and then sung G2 & G3, though I have never used it. I believe you set the plane as YZ or XZ in the co-ordinate system set-up and go on from there. I imaginge that you would set up a separate MAC for these jobs that are using G18 / G19 and then set up you post so that it read the difference and acted accordingly.

We use right anle head tooling here quite a bit, though they are all programmed manually using parametric macros - I'm going to have a play at building a post for this I think.

All the best

Bob
Tweet this Post!Share on Facebook
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
Newbie- 3D profile in NC. scrapper400 G-Code Programing 0 12-02-2008 09:27 AM
G71 type I and type II cycles sinha_nsit Fanuc 5 11-03-2008 06:34 AM
Y Profile in Z skipper_52 Wood Lathes / Mills 3 05-16-2008 03:52 PM
Help with profile TPPJR OneCNC 30 12-28-2005 12:22 AM
When I profile?? CNCadmin General CAM Discussion 3 06-26-2003 11:39 AM




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