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! > MetalWorking Machines > Haas Mills


Haas Mills Discuss Haas machinery here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-04-2008, 11:59 AM
 
Join Date: Oct 2007
Location: usa
Posts: 16
PaintItBlue is on a distinguished road
parametric question

I am having problems getting the vf-2 to accept some different amounts for variables, any explanation would be welcome. Machine is in inch increments if it matters.
these are being changed then checked , it is not a string of reassiging #800 commands consectutively
#800=X.x(input)/ X.x (output checked at variables screen using m01/opstop)

#800=100.52/100.519997
#800=100.5 /100.5
#800=1000.5/1000.5
#800=1000.52/1000.520020
#800=1259.08/1259.079956
#800=1259.8/1259.800049

going to try this on the mini mill and see if i get the same results, but not till tommorow, it's tied up with job.

Last edited by PaintItBlue; 01-04-2008 at 02:22 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 01-04-2008, 05:01 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

080104-1644 EST USA

PaintItBlue:

I do not understand this either. How old is your machine?

I do not believe my machines convert 100.5200 into a floating point for storage. It looks like a possible error converting to floating point and then back again. In a system like a CNC machine I would think that data moves, adds, and subtracts would be done in integer arithmetic to avoid cumulative rounding errors. With todays processors and the travel range of machines I would even think multiply and divide would be in integer.

I will try to remember to run the experiment on one of my machines.

Maybe your numbers are too big. Try 30.52 .

.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 01-04-2008, 08:47 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

080104-2032 EST USA

PaintItBlue:

I tried the experiment on our oldest HAAS, 93, VF-2.
63.52 stores as 63.520000
64.52 stores as 64.519997

#100 = 10.052 this stores ok
#101 = #100 * 10.0 reads out of #101 100.519997

Looks like a floating point rounding problem. So do not use large numbers.

For positioning on a VF-2 why would you need such a large number.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 01-05-2008, 08:15 AM
 
Join Date: Oct 2007
Location: usa
Posts: 16
PaintItBlue is on a distinguished road
follow up test w/ controlled series of values

did some more tests, it seems to be an error with more than 4 places in the whole number AND more than 2 places in the decimal, or xxx(3).xxx(3)

all ok:

1.5=1.500000
10.5=10.500000
100.5=100.500000
1000.5=1000.500000
10000.5=10000.500000

errors show at xxxx(4).xx(2):

1.51=1.510000
10.51=10.510000
100.51=100.510002
1000.51=1000.510010
10000.51=10000.509766

errors show at xxx(3).xxx(3):

1.515=1.515000
10.515=10.515000
100.515=100.514999
1000.515=1000.515015
10000.515=10000.514648 <<wtf??

no errors:
1.5=1.500000
1.51=1.510000
1.511=1.511000
1.5111=1.511100
1.51111=1.511110
1.511111=1.511111

Last edited by PaintItBlue; 01-05-2008 at 11:06 AM.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 01-05-2008, 02:18 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

080105-1347 EST USA

PaintItBlue:

Visit http://en.wikipedia.org/wiki/Floating_point for some background.

I think you should give up on the idea of using one variable location to store two different values.

Since you want to work with paired values consider putting the pair in adjacent memory locations.

You could do this internal subroutines instead of external routines,

#800 = 1.054
#801 = 8.
#802 = 1.255
#802 = 8.

and so on.

There are indexing means that will allow you to access a pair at a time.

You do not need to manually load these at the machine. Create a different program or multiple programs that contain the values. Such as

%
O100
#800 = 1.054
#801 = 8.
#802 = 1.255
#802 = 8.
M99
%

You could also include the random G52 offsets in here as well. I won't go into how at this time.

A different one
%
O101
#800 = 1.525
#801 = 7.
#802 = 1.010
#802 = 9.
M99
%

In the main program you call O100 or which ever one is to be used at the start of the program:

%
O500 (main program)
M98 P100 (this loads the values into #800s)
(rest of your code)
M30
%

.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-05-2008, 08:05 PM
 
Join Date: Oct 2007
Location: usa
Posts: 16
PaintItBlue is on a distinguished road
thanks!

I will take your advice and give up on the 2 variables and just builds a table like this:
#801=major fixture 1
#802=pitch fixture 1
#803=minor fixture 1
#804=major fixt. 2
#805=pitch fixt. 2
#806=minor fixt. 2
etc etc

Your way works better with some excel spreadsheets i have been working on for jobcards. It is going to be a dedicated machine pretty much so i going to used the 154p1-154p99(? forget high range) for the ~25-30 perm fixture positions we will have.As parts get larger we get fewer orders and they are larger pcs 1-2 runs). Although i did use your g52 example to write the logic and loops counts for the intial x,y web centerline probing and for the lockdown plate clearance holes, and the part lockdown holes.


I did get it working by fixing the dual variable, then integer *.001 to reduce 1259 to1.259 and then find the .08 remainder[original 1259.08 - 1259.(fixed) * 100 to change .08to 8, then rounding this number, the amount of rounding errors was maybe .000345 which isnlt enough to affect the .xx places i would be using ~05 to ~56 for pitch. I will take your advice and give up on this idea. i definatley wouldn;t risk these results for moevment commands.

Last edited by PaintItBlue; 01-05-2008 at 10:43 PM.
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
Parametric programming. chrisryn Parametric Programing 32 01-26-2009 06:14 AM
Parametric programming question. chrisryn Parametric Programing 12 05-27-2008 01:04 PM
New to Parametric Programming weaston G-Code Programing 4 02-27-2007 08:40 AM
Parametric Programming widgitmaster BobCad-Cam 7 05-04-2006 02:04 PM
parametric programming Karl_T CamSoft Products 21 05-24-2005 03:58 PM




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