4171
G-Code, CAD, and CAM discussions / Re: I want to learn turning program. Please help
« on: October 24, 2010, 09:55:16 AM »Quote
I am new to this macro editing using vb scriptThe macro's don't need editing. Operations tab>v script editor> then open the file to have a look at the file contents.
Quote
alternative codes to use
The bulk of Gcodes available for Mach Turn are listed in the manual, but the manual was written a long time ago, so there are
some canned cycles / macros done by users and the ones i posted are a good example. You may find some lathe canned Gcodes
for other controllers but they were specific for say a Fanuc controller and are not supported by Mach.
The Mach Turn Wizards provide for manny of the common single tasks to be done on the lathe. Lazyturn and LazyCam can give you code for turning a profile.
Quote
how to write repetitive program
Hm......not sure what you mean by repetitive
Do you just want to use the program generated g code for a single task, have the code available to be reused another time, be able to use the code
at different locations along the profile, want the code to to do some machine moves prior and after the program to your liking......
or maybe use inputs on the screen and Mach will run the code........etc
I just listed the above to give you a flavor of "repetitive" use to enlighten the learning experience . Each one will require a different level of
knowledge and programming techniques.
SO here is what i am suggesting:
1.Get a good reference book on programming......Peter Smid - CNC Programming Handbook
2.Try each of the lathe wizards and look at the generated code. ( there is one to turn down a diameter) Much can be gained from reviewing
the code.
RICH