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 > Mach Software (ArtSoft software)


Mach Software (ArtSoft software) Discuss Mach 1 , 2 and the new Mach3 here NC software here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-18-2006, 01:55 PM
 
Join Date: Apr 2004
Location: Wartrace, TN
Posts: 160
esmiller is on a distinguished road
Cutting at multiple depths.. looping ??

I have a question about how do dosomething in MACH3, which I am sure would is simple, but I am unable to figure it out.

When I use TURBOCNC, I use a gcode that uses a repeitive loop, based on current location. The code is as follows:

F50
G01 z.2
g00 X14 Y0
F42.0
#1=14.00 ; Material width
#2=.175 ; Width Of cut per pass
g00 z-.02
#3 = #1 F50 ; Set first cut depth & Feed rate
N0100 #3=[#3-#2] ; Start of loop, compute new depth
G00 y0 x#3 F50
G00 y12 x#3 F50; Set new Row
IF #3 GT 0 M97 O0100 ; Jump to start of loop (if not done)
N0300 M02 ; Program End


Unfortunately, this code will not run in MACH3. I don't think MACH3 supports the M97 command, if I recall the problem correctly.

My question is: how would the best way of converting this to MACH3 compatibility? I use this same way to cut out a part at increasing depths, by using the variable to set the Z depth, thus I can cut out a part to a max Depth of .75 inches in increments of .05 Inches, while only having the actual cutting code entered one time, instead of for each incremental depth.

Hope this question makes sense.. Any assistance would be greatly appreciated.

Eddie
Reply With Quote

  #2  
Old 01-18-2006, 05:31 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,463
ger21 is on a distinguished road
Buy me a Beer?

The latest versions of Mach3 have a wizard to cut in multiple passes. It will convert your single pass code to multiple passes.

With previous versions, you could use the Multipass, which is (was?) on the main page.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #3   Ban this user!
Old 01-18-2006, 06:45 PM
 
Join Date: Apr 2004
Location: Wartrace, TN
Posts: 160
esmiller is on a distinguished road

I was never able to understand how the Multipass worked.. should I remove all the Z depth commands from my G-Code and allow MACH3 to determine hem, or should he program ignore all Z commands, etc.. ?

Perhaps I should D/L the newer version, and see if i have better luck with it ...

Eddie
Reply With Quote

  #4  
Old 01-18-2006, 09:02 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,463
ger21 is on a distinguished road
Buy me a Beer?

I believe the new wizard is replacing the multipass. I haven't tried the wizard, but your right, the multipass is/ was a bit tricky to figure out. It does work good after a bit of trial and error.

I think with either method, you're g-code should be to the final (full) depth.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #5  
Old 01-19-2006, 08:57 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

I'm not sure about Mach, You have some lower case letter "G-commands", & "Axis-letters" Does that matter ?
g00 z-.02
Also is this supposed to be "GOTO"? And, does "Mach" support "GOTOB"?
IF #3 GT 0 M97 O0100 ; Jump to start of loop (if not done)
Should this be "N0100" ?
IF #3 GT 0 M97 O0100 ; Jump to start of loop (if not done)
Also does the "If' have to have a "EndIf", and what are you asking in your code, "IF #3" what? What is your condition, for the "If"?

IF #3 GT 0 M97 O0100 ; Jump to start of loop (if not done)


Is this a part of a larger program, a sub program?

You might want to just start over, write it out by hand in notepad, etc. or If you post your entire program, maybe we could get a better idea what your trying to do.

.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-19-2006, 09:48 PM
 
Join Date: Apr 2004
Location: Wartrace, TN
Posts: 160
esmiller is on a distinguished road
Entire program

NO.. that is the entire program, and it runs perfectly in TurboCNC. It is just that TurboCNC is not even 1/5 as fast as MACH3 is. I use this program to cut (Level(?)) the top of my sacrificial table whenever i replace it., but I would rather let MACH3 do it, since it runs so much faster. I just don't know how to program it ..

As for the lowercase Z, it does not appear to cause any problems, but I should fix that. It was just a personal program, and i never cleaned it up since I never expected it to be viewed by anyone else until now.

Also the O0100 seems to be the proper form to use when you are referencing where it is going TO, as aopposed to a location where it is at.. if that makes any sense at all.. I pulled this originally from another G-Code source, and played with it until I got it working correctly, and was able to make it do what I wanted when I wanted to do it..

The 'IF' statement seems to hang by itself with no requirement for an ENDIF as is necessary in programming. There was no ENDIF in the original program.
The GT in the same line means:
IF (variable) #3 is GT (GREATER THAN) 0 M97(jump to routine) O01000
Reply With Quote

  #7  
Old 01-20-2006, 09:21 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

I'm not sure how you Define anything in Mach (With 840D, I do it at the top of the page before any code) Like Counter in the code below

I didn't know the max length in "Y", I'm thinking the length in "X" was 14.00

I assume you will use a endmill, and zero the tool face to the table top surface before running the code below.

% ; Start program

G90 ; Absolute

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

G91 ; Incremental

FOR Counter1 = 1 TO 3 ; Loop 3 times. depth in "Z"

G91 ; Incremental

G01 Z-0.5 F50 ; Infeed "Z"

FOR Counter2 = 1 TO 40 ; Loop 40 times

G91 ; Incremental

G01 X-14.0 F50 ; Infeed "X"

G01 Y-0.175 F50 ; Infeed "Y"

G01 X14.0 F50 ; Return "X"

G01 Y-0.175 F50 ; Infeed "Y"

ENDFOR ; End loop

G90 ; Absolute

G00 Z0.0 F50 ; Send axis home

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

G91 ; Incremental

G01 Z-0.5 F50 ; Infeed "Z"

ENDFOR ; End loop

G90 ; Absolute

G00 Z0.0 F50 ; Send axis home

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

M30 ; End of program


If the code above works for you, you might want to adjust the feed on the return home, so your not waiting all day for all axis to go home.
Example:
G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home
G00 X0.0 Y0.0 Z0.0 F250 ; Send all axis home
I don't know what kind of machine your running (Homebuilt etc.) as far as the Rapid Feed goes, you don't want to lose steps, again though, your only using it to level a table.

I don't know If this was any help, heck I don't even know If Mach supports "FOR - ENDFOR"

Run at your own risk, I don't know your exact situation. So go slow, the first few cuts.




.

Last edited by Switcher; 01-25-2006 at 03:22 PM.
Reply With Quote

  #8   Ban this user!
Old 01-30-2006, 10:34 AM
 
Join Date: Oct 2004
Location: US
Posts: 118
Barker806 is on a distinguished road

You could use the surface wizard and save your setting This will make it so you could shange any think you like...

Hope that helps
Brian
Reply With Quote

  #9   Ban this user!
Old 01-30-2006, 10:36 PM
 
Join Date: Apr 2004
Location: Wartrace, TN
Posts: 160
esmiller is on a distinguished road
Surfacing wizard ??

My ignorance is showing through again... What is the surfacing wizard?? don't recall seeing this one..

Eddie

Originally Posted by Barker806
You could use the surface wizard and save your setting This will make it so you could shange any think you like...

Hope that helps
Brian
Reply With Quote

  #10   Ban this user!
Old 01-31-2006, 05:48 AM
 
Join Date: Oct 2004
Location: US
Posts: 118
Barker806 is on a distinguished road

It should be in the Mach3 wizards... I have it here.. press the load wizards button on the screen and it is called surface.

Hope that helps
Brian
Reply With Quote

Sponsored Links
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On





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