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 05-19-2009, 12:38 AM
 
Join Date: May 2008
Location: USA
Posts: 43
cwm9 is on a distinguished road
G-Code output precision always 3 digits?


UPDATE

Suspected SolidCAM Bug. See post #5.



Original text

I've been trying to get solid cam to output 4 digits of precision (1/10000 inch), but no matter I do it refuses to give any x/y values more precise than 1/1000 inch...

Here's what I did. In my .GPP code I entered the lines:

numeric_def_f = '5.4'
xpos_f = '5.4'
ypos_f = '5.4'
zpos_f = '5.4'

Arc radii are in 5.4 format, but I always end up getting lines like

N36190 G0 Z0.406

instead of

N36190 G0 Z0.4064


Is there something I am doing wrong?

-cwm9

Last edited by cwm9; 05-20-2009 at 06:49 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 05-19-2009, 03:23 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Yes, try this

{nb, 'G' gcode' X' xpos:xpos_f, ' Y'ypos:ypos_f,' Z' zpos:zpos_f}

If that doesn't work, try this

' X'(xpos):'+ 5.4 (P)
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 05-19-2009, 03:57 AM
 
Join Date: May 2008
Location: USA
Posts: 43
cwm9 is on a distinguished road
Sadly neither of Brakeman's changes altered anything.

I tried xpos_f = '5.4/4' and got an extra 0 trailing everything. That seems to imply that SolidCAM only calculates to 1 mil internally. I was surprised, so I tried:

xpos=xpos*10
ypos=ypos*10
zpos=zpos*10

at the front of every function as a quick double check, and sure enough I only get data in the hundredths place after that.

That seems to confirm SolidCAM has a maximum internal precision of 1 mil. I searched though the settings, but couldn't find any way to increase the resolution to 1/10 mil. I don't understand why they'd intentionally limit the precision like this.

If anyone knows a way around this, please do tell.

=(

Last edited by cwm9; 05-19-2009 at 01:01 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 05-20-2009, 03:00 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
Have you tried altering the value "Rounding" in "Menu - SolidCAM - Settings - Units"? That defaults to 3 places on installation has influence on the CAM output to post processor.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 05-20-2009, 03:04 AM
 
Join Date: May 2008
Location: USA
Posts: 43
cwm9 is on a distinguished road
Originally Posted by Brakeman Bob View Post
Have you tried altering the value "Rounding"...?
Yes, I did. No change.



UPDATE


Well, I've found a kludge solution: work in metric.

SolidCAM appears to truncate all coordinates to 3 decimal places regardless of what units you are working in.

If you work in the metric system and your coordinates are all in mm, the finest resolution you can get is .001 mm or .00004 inches.

If you work in inches, the finest resolution you can get is .001 inch.

I'm pretty sure at this point that this is a bug, and a pretty obvious one at that. Does everyone just use metric CNC? I mean, it's not like my mill is ACCURATE to 1/10 of a mil, but it can certainly resolve that, and it does make some difference in the surface quality of my small parts. OK, it's a bit picky, but come on.

You can even see the difference if you set up a 3d Milling Operation with constant-Z on the outside of a cylinder with sloping walls. Set the Z-Step to .001, and with each z-step the path should step away from the prior step since the diameter of the cylinder at that z-level is changing. If you set it to inches and zoom in you get an ungodly mess. If you set it to metric you get nice even contours.

Here's my example. First on off-axis shot of the part:



Same thing, looking straight on. I'm going to zoom in on the toolpaths to the left:



The imperial version shows contours crossing, overlapping, and uneven... what a mess!



And now the exact same imported part, with the same toolpath settings, only with SolidCAM set to work in metric units:




Here's to hoping this gets fixed at some point in a future release. Fixed point math? It's not like our PCs can't do floating point math with ease...

Last edited by cwm9; 05-21-2009 at 12:17 PM.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 05-21-2009, 03:16 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
This is intriguing. I work in metric and my post outputs to 4 decimal places if I set ROUNDING to "4".

Some questions

Were the graphics of the toolpaths created in SolidWorks or by using a backplot program? This is significant because I have had SolidWorks show me junk toolpaths at very small resolutions that when processed in CimcoEdit (and subsequently machined) were OK.

What version of SolidCAM are using and what service pack?

Have you run TRACE in the GPP file? If so, what does the raw post output show in terms of xpos etc? Also, if you are working in Imperial, is there some jiggery-pokery going on in terms of dividing through by 25.4 that is rounding the result to 3 places?

Finally, could this be a SolidWorks thing? I mean could this be a setting in SolidWorks that is rounding the co-ordinate position before it is passed to SolidCAM for processing. I am not familiar with working in SolidWorks in Imperial but I do know from creating VBA macros that in native SolidWorks in Metric coughs out 8 decimal places. So I wonder if SolidWorks is inherently metric and when set to Imperial merely multiplies / divides through by 25.4

All the best

Bob
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 05-21-2009, 12:01 PM
 
Join Date: May 2008
Location: USA
Posts: 43
cwm9 is on a distinguished road
Originally Posted by Brakeman Bob View Post
I work in metric and my post outputs to 4 decimal places if I set ROUNDING to "4".
Are you certain? I get 4 places (to the right of the decimal point) only on I and J, not X or Y. For example:

N70 G3 X12.956 Y-3.961 I-1.6664 J-5.4507



Originally Posted by Brakeman Bob View Post
Were the graphics of the toolpaths created in SolidWorks or by using a backplot program?
By solidworks. Solidworks does produce poor quality circles and arcs, but there is also clearly some lower resolution junk going on in there. (Even the metric version shows the poor drawing capabilities of solidworks.)

Originally Posted by Brakeman Bob View Post
...subsequently machined were OK.
The only reason I noticed was because I machined a very small part prototyping part with a very small slight vertical slope using a square end mill descending 1 mil at a time and noticed it kept going around the part over and over again without changing the diameter at all, but then would suddenly jump out and the diameter would increase. It was when I read the code that I realized that the Z-axis was going down by 1 mil but the circles around the part were identical 10 times in a row. By looking at the raw g-code I deduced this was because there were only 3 digits. That's when I started my quest to get 4 digits out of SolidCAM.

Also, if you work in metric, your parts would turn out OK because you are 25x more accurate than if you machined imperial.

Originally Posted by Brakeman Bob View Post
What version of SolidCAM are using and what service pack?
SolidWorks 2009/SP1 (going to try updating to make sure this isn't the cause, but I very much doubt it), and the most recent SolidCAM.

Originally Posted by Brakeman Bob View Post
Have you run TRACE in the GPP file?
Interesting thought. All three digit info, except for the resultant I and J, which now I see is because the post code is calculating from the rest of the 3 digit data supplied to it. There's a sqrt in there that's providing the extra info.

@arc ==> xpos:-5.278T ypos:6.563T zpos:10.020F feed:508.000F feed_teeth:0.127F
..> arc_direction:ccw xcenter:-2.080 ycenter:3.051 radius:4.750
..> arc_plane:xy xcenter_rel:2.156 ycenter_rel:-4.232
..> start_angle:116.995 end_angle:132.312 arc_size:15.317
..> next_direction:90.078 zstart:10.020
..> feed_type:'finish_feed' arc_feed:254.000
>
> N385 G3 X-5.278 Y6.563 I2.1561 J-4.2325

Originally Posted by Brakeman Bob View Post
...is there some jiggery-pokery going on in terms of dividing through by 25.4 that is rounding the result to 3 places?
None that I can think of. The part was drawn natively imperial. Besides, the problem shows up on a single sloping surface, so that shouldn't have anything to do with it.

Originally Posted by Brakeman Bob View Post
Finally, could this be a SolidWorks thing?
I seriously doubt it. Solid works has no problem making very fine details.



It sounds to me like internally SolidCAM is using high precision math, but when it spits out the raw data to the post module, it only puts out 3 digits.

Last edited by cwm9; 05-21-2009 at 12:28 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 05-22-2009, 03:18 AM
 
Join Date: Oct 2007
Location: United Kingdom
Posts: 392
Brakeman Bob is on a distinguished road
You were right to question, I followed my own thought process and found as you did that SolidCAM only offers 3 digit data to the post. When I tried it yesterday I saw the 4 digits in C and CC calls (Heidenhain equivalent of I's & J's and assumed that was it - 4 digit output not a problem. Probably a bug in R13 that hasn't been fixed yet. Ha! As my mate here says "Assumption is the mother of all cock-ups". I'll test a bit more before I type in future.

I'll have a chat with my support chap and see if he knows anything. I am still struggling believe that 4 digit output isn't possible.....

Have a good weekend

Bob
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 11-05-2009, 07:53 AM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Bob, did you find anything out about this?

I've been making the molds for some of our latest carbon parts and I've found that the tighter the accuracy of the post then the better the finish on the part. The post is obviously a lot longer, but a small price to pay.

Example, I paid a few hundred quid for mold (acrylic I might add) a couple of years ago. I recently made the new mold myself (aluminium) and the parts popped out with a much nicer finish than the previous (contracted out) mold and I didn't even bother to polish mine.

I was particularly happy as it was the first mold of this type I had made. I had no real idea how to design it, and the guy that made the previous mold wouldn't tell me. But as I had originally modeled the part in Solidworks it was quite a straightforward process to design the mold, then tickle it a bit to how I wanted.

But anyway....yes....four digit output would be nice!
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 11-06-2009, 10:40 PM
 
Join Date: Mar 2008
Location: USA
Posts: 22
Adam Hubert is on a distinguished road
Can't believe you've had this very common problem this long.

I'm disappointed but not surprised that someone from SolidCAM support didn't immediately jump in and help you with this.

A missing or wrong setting in your *.mac file is causing this problem.

Fire up your mac file in a text editor and find the Epsilon settings area.

The below command needs to be there, or if already there it needs to be changed from the default value of 3 decimal place output to 4 decimal place output.

You have already experienced the fact that it makes no difference that your values in the gpp file are set as they should be 5.4. This movement_precision value in the *.mac file needs to be set to allow the 5.4 values in your gpp file to work.

The below value in the *.mac file is either not there which results in it defaulting to 3 decimal place output or the value is there and it's set on 3.

if movement_precision is there it's probably set like one of the following:

movement precision = 3 ; this forces 3 decimal place output in inch or metric
or movement precision = 0.000, 0.000 ; 1st value is metric, 2nd value is inch.

It needs to be either of the following

movement_precision = 4 ;forces 4 decimal place output in inch or metric
or movement_precision = 0.001 , 0.0001 ; equivalent to = 4 above

I can assure you that this will force it to post out with 4 decimal place output.

Another little gotcha may be there.

When your X, Y, and Z values change to 4 decimal place output that does not mean that your R (if you use R's), I, J, and K will also. They are controlled elsewhere.

In the largest portion of the the SolidCAM posts there is not an explicit definition of R, I, J, K in your *.gpp as there is X, Y, and Z.

The following in you gpp file will take care of the decimal output of your R, I, J, and K values.

in your GPP variables

numeric_def_f = '5.3' needs to be changed to '5.4'

the numeric_def setting is kind of a catch all that takes care of address values that are not explicitly defined.

Good Luck
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-08-2009, 11:28 PM
 
Join Date: Nov 2007
Location: Thailand
Posts: 272
mattpatt is on a distinguished road
Thanks Adam, that worked.

movement_precision = 4

Gives me output to 4 decimal places. Perfect

But....

movement_precision = 0.0001, 0.000004
or
movement_precision = 0.001, 0.00004

Will only output to three places. Not to worry, the first command works nicely.

Many thanks.

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

  #12   Ban this user!
Old 11-10-2009, 02:01 PM
 
Join Date: Mar 2008
Location: USA
Posts: 22
Adam Hubert is on a distinguished road
Matt,

I knew this would work to get you 4 decimal places. This is very common in America that you work in 4 versus 3 decimal places. From a fundamental standpoint almost all of the controller axis position readouts on a normal mill and lathe are 4 places below the zero. I have seem this cause major grief to many of the users in the inch scene until knowing how to change this got worked out. Problems primarily were related to arcs errors and attempts to to do very fine 3D milling finishing that were erroring out or resulting in butt ugly 3D finishes.

This is something I always thought that SolidCAM handed very poorly as they began to put their product in the inch scene.

Something as critical as this just should not be hidden away and not documented to the point that you have to jump through these hoops to solve it.
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
learning g code or cad-cam code output? slow_rider G-Code Programing 3 02-27-2010 09:48 PM
Need Help!- HIGH PRECISION CODE CNC_BOB OKK 1 05-01-2009 04:39 PM
G-code output problem NewToGibbs Post Processor Files 8 01-31-2009 12:20 AM
Image embossing & G-Code output example dcarr Virtual Sculptor VS3D / VScad3 Software 4 07-31-2004 08:51 PM
Dialog Digits MikeT BobCad-Cam 2 03-02-2004 09:07 AM




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