![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I have built a 6 axis cnc mill for making beekeeping woodenware. I first design was for a frame end piece. These pieces are about 9" long by 1 3/8" wide. The machine does a nice job I would like to make it cut multiple copies using Code G54. How do I tell it where the starting position of the G code is? For example if the following code cuts the piece: G0 X0Y0Z1 M3 G1 Z0.25 F6 X1Y0 X1Y1 X0Y1 X0Y0 Z1 M5 How do I tell the machine that X0Y0Z1 is the starting point for each piece and that I want to cut one at X0Y0, X1Y0, X2Y0, etc? TIA Greg Ferris aka beekeep |
|
#2
| ||||
| ||||
| What kind of controller does it have?
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| ||||
| ||||
| First you should be homing the machine to some position that can be repeatedly found again after the power is shut off and turned back on. This home position is most commonly described as being X0Y0Z0 in the machine coordinate system which is named G53. However, by parameter, you could also give the home position other coordinates, but this is still the primary machine coordinate system G53. All the workshifts from G54 through to G59 are related to this G53 coordinate system, as distances from the zero point of G53 to the zero point of G54 (on up to G59). So if you are machining without being aware of this, I'm not sure how you established the zero of your first part because normally G53 X0Y0 does not coincide with the G54 X0Y0 of your workpiece. That is not to say that it couldn't coincide it is just highly unlikely ![]() So if your first part datum (location) is somehow being machined at G54 X0Y0, then the second part should be machined at G55. You should be able to find the workshift registers in your control and input values for G55 X and Y that equal the amount of offset you need in order to produce the second part without overlapping the first one. The third part will use G56, again with unique values for X and Y in the G56 register. Bear in mind that the values in the workshift registers are absolute distances from the G53 X0Y0 and not incremental distances between workshifts. Normally at the beginning of your operation, immediately after the tool change, you insert G54 (or whichever workshift you wish to call) into your code. This causes the controller to shift X0Y0 from the machine G53 coordinate system to whichever workshift you invoke.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| ||||
| ||||
| What Hu said. In order to use G54-G59 easily, you need to have a repeatable home position. If not, you may be better off using G92. You enter the offsets on the offset screen, btw.
__________________ 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) |
| Sponsored Links |
|
#7
| ||||
| ||||
| Using a workshift does not create subroutines, you'd have to do that yourself. You can do this by putting your toolpath code in a subroutine (or subprogram) and then write a main program which contains a workshift, then a sub call, next workshift, sub call, etc. You'd be limited by the number of workshifts available to your controller basically up to G59. A lot of controllers have an extended list of workshifts up somewhere over G110. But another way to do this is to use G52 calls, which you can have as many as you like.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#8
| ||||
| ||||
| There are I think 255 offsets available in Mach3. Check the manual on how to call the ones after G59, but I think it's G59P1, G59P2, or something like that.
__________________ 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) |
|
#10
| |||
| |||
| I rewrote the program in incremental. I'm learning and didn't realize that I could go back and forth between incremental and absolute. I reality my biggest problem has been the new terms that I am not familiar with. The only programming that I have done in the past was basic and that was many years ago. I'll get the hang of this it is just a matter of learning a new language. Question. Can one write G code subroutines and call them up in G code? Thanks Greg Ferris |
| Sponsored Links |
|
#11
| ||||
| ||||
| I have a different control but it works about the same as mach. here's the instruction for my machine: QUESTION 209 How do we call and loop subroutines in the G code program? We use the industry standard method. Anyone familiar with G code programming should be able to explain this better. You can look in the Buyers Guide in the back of your CamSoft manual on what book we recommend to learn CNC programming. An M98 call will call a subroutine and an M99 will return back to the line after the M98 when finished. M98 has two parameters - P and L. P calls the block number or program number to jump to and L specifies the number of times to repeat or loop the subroutine. In CNC Professional M98 is user definable. The P parameter can either call a block number that starts with N or a program number that starts with O. In CNC Plus the letter O is the default. In CNC Professional the letter N is the default, but can be changed. Each subroutine should be capable of standing alone and run on its own. Subroutines cannot be called from CNC Lite. Below are some examples: (Call a simple subroutine and repeat the subroutine 3 times.) N1 G0 X0 Y0 Z0 N2 M98 P1234 L3 N3 M30 O1234 N4 G1 Z-.5 F25 N5 G0 Z.1 N6 M99 (Use a subroutine to loop the entire program 100 times.) N1 M98 P1234 L100 N2 M30 O1234 N4 G0 X0 Y0 Z0 N5 G1 Z-.5 F25 N6 G0 Z.1 N7 M99 (Nested subroutines, only available in CNC Professional.) N1 G0 X0 Y0 Z0 N2 M98 P1234 L1 N3 M30 O1234 N4 G0 X1 Y1 Z1 N5 M98 P5678 L1 N6 M99 O5678 N7 G1 Z-.5 F25 N8 G0 Z.1 N9 M99 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |