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 04-09-2008, 09:07 PM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road
Question I need help Simulating my code.

Im not sure what program is best to simulate my code.

Please see the attachemts.

The file extension is .H but i renamed it to txt.

I have built a program from scratch using visual basic .NET. where the

output would be the CNC code.

I tried using the free CNC Simulator but im still having difficulties with.

Any help would be appreciated. Thanx in advance.
Attached Files
File Type: txt 1_gear.txt‎ (91.7 KB, 61 views)
Reply With Quote

  #2   Ban this user!
Old 04-10-2008, 03:22 AM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

Modified your code. Altered all the 'L's to N1 and added G01 and this is the result.
Attached Thumbnails
Click image for larger version

Name:	ToolPathGear.JPG‎
Views:	79
Size:	36.4 KB
ID:	57307  
Reply With Quote

  #3   Ban this user!
Old 04-10-2008, 03:26 AM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road

WOW !!! THANX ..


Man may you post the modified code and may you please tell me what software your using to show the preview ?
Reply With Quote

  #4  
Old 04-10-2008, 04:21 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

www.ncplot.com


.
Attached Thumbnails
Click image for larger version

Name:	123.JPG‎
Views:	81
Size:	34.0 KB
ID:	57315  
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com
Reply With Quote

  #5   Ban this user!
Old 04-10-2008, 04:24 AM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road

Thanx Man. I still want to know what software kiwi used. His drawing shows the origin (x,y) . Which i like. If you know what program he ued please let me know.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-10-2008, 07:53 AM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

I used BobCADCAM V20.
As I use a FAGOR controller I altered to the required format by using MSword;

N1 G01 X-30.938 Y-160
N1 X-22.987 Y-160
N1 X-22.444 Y-159.986
N1 X-22.131 Y-159.969
N1 X-21.862 Y-159.95
N1 X-21.614 Y-159.929
N1 X-21.381 Y-159.907
N1 X-21.158 Y-159.884
Reply With Quote

  #7   Ban this user!
Old 04-10-2008, 02:38 PM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road

Thanx man, I downloaded the software.

I opened my file and used. moved the header part (First six lines) to a text file (Cut - Paste) so that [The word Tool & call wont be affected].

Then used the find and replace feature: Find"L(space)" Replace with "(space) (space)". Then pasted back what i cut.Then in the bobcam editor window i hit on Edit > Renumber ,then added in the G01 Manually.

I can see youve used N1 All the way along have u used it at the very begining as well ? Anyways heres my modfied code is it correct this way ? BTW how do i run a simulation ?

N1 BEGIN PGM NNT MM
N2 BLK FORM 0.1 Z X+100 Y+100 Z+0
N3 BLK FORM 0.2 X+200 Y+200 Z+100
N4 TOOL DEF 1 L+0 R+10
N5 TOOL CALL 1 Z S1 F1
N6 M6
N7 X+89 Y+89 Z+101 F1 M3
N8 X+201 F1
N9 Y-160
N10 Z-1
N11 G01 X-30.938 Y-160
N12 X-22.987 Y-160
N13 X-22.444 Y-159.986
N14 X-22.131 Y-159.969
Reply With Quote

  #8   Ban this user!
Old 04-10-2008, 05:03 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

I deleted all the lines down to your main code line N11. Didn't examine them for errors.
I could have just deleted the L instead of converting to a line number (N????)

To simulate :Edit/Select All...........Edit/Geometry from NC
Reply With Quote

  #9   Ban this user!
Old 04-10-2008, 07:09 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

The first 5 lines will vary, depending on the controller.
For lines with comments my FAGOR controller requires a ';' where others use '('
Using line numbers (N????) is optional.
Reply With Quote

  #10   Ban this user!
Old 04-10-2008, 07:47 PM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road

Thanx for your reply man, I have one question regarding the Workpiece.

Quick Intro:-

I have built a Spur gear Calculator program using Visual Basic .NET



Now Basically this window is under CNC code.

The highlighted items show the dimensions of the workpiece.



Now if im to draw my gear using BobCAD-CAM where should the fixture holding the workpiece be located at ?




Please see the attachments for the code.

This code is different from the one i posted earlier.
Attached Files
File Type: txt Original.txt‎ (47.7 KB, 27 views)
File Type: txt Modified.txt‎ (55.2 KB, 33 views)
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 04-10-2008, 08:43 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

You have done well with your calculator. Does it calculate a involute path?

I'm thinking a 3 axis vertical mill.
I would think the centre of the gear would be the origin X0 Y0 and the piece would be held with a bolt at this point or held with a vice or lathe chuck which is fixed to the table.
Reply With Quote

  #12   Ban this user!
Old 04-10-2008, 09:41 PM
 
Join Date: Apr 2008
Location: USA
Posts: 9
uaeXuae is on a distinguished road

Originally Posted by Kiwi View Post
You have done well with your calculator. Does it calculate a involute path?

I'm thinking a 3 axis vertical mill.
I would think the centre of the gear would be the origin X0 Y0 and the piece would be held with a bolt at this point or held with a vice or lathe chuck which is fixed to the table.
This program is specifically for spur gears calculations.




Now Basically what i want to do is tie the input machining parameters with the offset i got(Tool path CNC Code - see picture below).



The purpose of that is to move the centre of the gear to the centre of the workpiece.




Regarding the same input parameters that i input back in post # 10 this

would be my output (not the tool path generated).

.

So basically from the above picture you can see that when i apply both both new offset equations for the gear the values of a=b=0 on the other hand when i apply them for the pinion the value of a = (Distance Centre; Distance from the centre of the gear to the centre of the pinion), and b=0.

Moving to the CNC Window:



Hitting the OK button:



And now this is how i managed to write the first couple of lines my CNC Code header. *Note the values used in the machining parameters in the following pictures are different from the one ive been taking pictures of.















I could have used my old CNC code the one showing here:



But as i mentioned i want to do the translation so that after the code is saved from my program all i have to do is upload and run program. Any help is welcomed.
Reply With Quote

Reply

Tags
code simulation




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
Wierd NC Code and G-Code Tazzer General CAM Discussion 10 01-09-2012 01:07 PM
learning g code or cad-cam code output? slow_rider G-Code Programing 3 02-27-2010 08:48 PM
G-code for beginners - want to learn G-code FPV_GTp G-Code Programing 7 11-17-2008 11:25 PM
looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft troyswood Ability Systems - LPT Indexer and G-Code 2 12-24-2006 09:21 PM
Simulating TurboCNC code kombayotch TurboCNC 4 03-10-2006 09:00 AM




All times are GMT -5. The time now is 10:10 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 354 355 356 357 358 359 360 361