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 > NCPlot G-Code editor / backplotter


NCPlot G-Code editor / backplotter Discuss NCPlot software here.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-23-2007, 08:03 AM
 
Join Date: Oct 2007
Location: usa
Posts: 20
jjenks is on a distinguished road
How to write a code program to cut threads

I am a shop teacher just learning the CNC side of machining. I need to write a program to cut 1/2-13 threads for a school project. We do have a spectra light 400 lathe. We can use a cam product to draw and produce the cnc program automatically. It produces a canned cycle and when we put it into the lathe program it will not move in the z direction. The tool will move into the X position and the spindle will turn on. After talking to consultants they think there is something wrong with the lathe. Anyway I would like to try and write the code manually. I have a small understanding of the code and just need some help.

Thanks.
Jack
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 11-23-2007, 08:16 PM
Donkey Hotey's Avatar  
Join Date: Nov 2007
Location: USA
Posts: 1,636
Donkey Hotey is on a distinguished road

Can you post the program output here?

Are you totally new to G-code or just to the threading canned cycle? Do other XZ moves work correctly?

It might be doing the positioning up to the point where the threads are supposed to start, turning the spindle on, then choking on the actual canned cycle that cuts the thread. That's my uninformed guess.
__________________
Greg
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 11-23-2007, 10:34 PM
jackson's Avatar  
Join Date: Oct 2006
Location: United States
Posts: 584
jackson is on a distinguished road

IT DEPENDS ON IF YOUR CONTROL IS SET UP FOR SINGL OR DOUBLE LINE G76 IF THAT IS WHAT YOUR USING
DOUBLE IS NORMALE FOR NEWER MACHINES

G0G54T101
G97S800M3
X.55Z.1M8
G76P020060Q100R.002(THE DECIMAL IN THE R ALSO DEPENDS ON THE MACHNE)
G76X.421Z-1.P300Q150F.076

SINGLE
G76P020060X.421Z-1.D200F.076(I THINK ITS BEEN AWHILE SINCE I WROTE A SINGLE LINE )
__________________
individual who perceives a solution and is willing to take command. Very often, that individual is crazy.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 03-11-2008, 11:14 PM
 
Join Date: Jan 2006
Location: Australia
Posts: 475
FPV_GTp is on a distinguished road

LOL , this g code stuffing is going to my head
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 04-14-2008, 01:06 PM
 
Join Date: Oct 2007
Location: usa
Posts: 20
jjenks is on a distinguished road

I used spectracam to cut 1/2-16 threads. It works when I verified it. I loaded the cnc program into the spectra light turn program and it will verfify just fine but when I go to run the program the bit will move into the x axis but will not move on the z. So if there is someone out there to look at this file and see if some thing is not written properly. Sorry it has taken so long to answer.

thanks.

Jack

N0 ; spectraLIGHT Turning Center
N1 ; Single Tool Operation
N2 ; Material Type: screw
N3 ; Material Size: Z4 X0.5
N4 ; Material Origin: Z0 X0
N5 ; Units: Inch
N6 ; External Tool #4: 'Threading Tool'
N7 M03
N8 M05
N9 G05 ; Insert Tool #04
N10 M03
N11 ; Thread Cycle, Threading #1
N12 S200
N13 G04 F5 ; Dwell Five Seconds
N14 G0 Z4 X0.25
N15 G32 Z0.52 X0.2035 Q0.05 F0.077
N16 G80
N17 G0 X0.25 ; Retract
N18 M02 ; End of File
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-14-2008, 02:22 PM
 
Join Date: Jul 2005
Location: Canada
Age: 49
Posts: 14
acssgt is on a distinguished road

Hi Jack,

Last year I rebuilt an old Light Machines lathe for one of our local high schools that had a circa.1988 TMC1000 controller that had fried. I built them a new controller with 2 stepper boards and it runs on TurboCNC and G code through the parallel port ... I may be able to help ... or not!

I have a couple of questions to try and get a grip on your problem;

Does your lathe respond to jog commands from the keyboard in both the Z and X axis?

Can you give the control an MDI command in the form of a single string on typed in G code? ie G00 X1.0 Z2.5 << and will both axis move?

From your description of the problem it sounds like you may have a code problem with your G32 command. Am I right in assuming that your spectracam came with the lathe?


Do you have a command reference for the acceptable parameters for your G32 (not all flavours of G and M code are created the same)?

Check to see if your G32 parameters math the following for your command

G32 Z0.52 (end value in z-axis) X0.2035 (max depth dia or rad - specify) Q0.05 (depth of cut - this could be the problem) F0.077 (feed for pitch).
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 04-21-2008, 10:47 AM
 
Join Date: Oct 2007
Location: usa
Posts: 20
jjenks is on a distinguished road

What did it cost to build the new controller? Do you do that for a living? I have an ENCO lathe I wanting to do something different with. Currently it is set up with the England standards of Z going in a negative direction. Or I guess + Z is out on the right end of the stock instead of next to the stock. Will your set up work on that?

It was last fall since we tried the thread program so I have kinda forgotten about it. We ended up cutting them on the enco lathe.

Let me know about the controller.

Thanks.

Jack
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 04-21-2008, 10:18 PM
 
Join Date: Jul 2005
Location: Canada
Age: 49
Posts: 14
acssgt is on a distinguished road

Hi Jack,

See the PM I sent you, in short I used chips I had access to and the total cost was under $100 to make 2 driver boards, a breakout board, and drop in an indexer from CNC4PC to allow spindle sync for threading.
As for the whole axis definition problem ... TurboCNC will let you name and swap the axis names and definitions and directions any way you like. Check out the site at www.dakeng.com - I'd say it's a must for any first time machine builder/converter. The same is true of Dave's site at www.hobbycnc.com.

Rob

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
Mazatrol Program into a G Code Program fuzzman Mazak, Mitsubishi, Mazatrol 14 02-08-2010 04:55 PM
Look at this code for cutting threads jjenks General CNC (Mill and Lathe) Control Software (NC) 0 10-25-2007 01:06 PM
Possible to write variables to a program? Heavy D G-Code Programing 2 08-22-2006 12:08 AM
someone wanna write a program? ljoe1969 DIY-CNC Router Table Machines 2 06-06-2004 08:47 PM




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