Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 05:10:03 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
General Mach Discussion
g20/g21 and g70/g71 problems
Pages:
1
Go Down
« previous
next »
Author
Topic: g20/g21 and g70/g71 problems (Read 505 times)
0 Members and 1 Guest are viewing this topic.
desutt
Active Member
Offline
Posts: 22
g20/g21 and g70/g71 problems
«
on:
March 03, 2011, 04:25:12 PM »
I have a problem with the g20/g21 and g70/71 codes. Whenever I use any of these in a program I get unpredictable results.
I use the following short programs to illustrate the problem. I move my z axis to the top of my table, and move the x
and y to a convenient place on the table. I the zero all three DRO's and run program test1. The results are that the three axis
each moved the predicted one inch.
(test1)
g0 f30
g1 x1 y1 z1 (move to x=1, y=1 z=1)
m1 (stop, read DRO's first time - cycle start to continue) (DRO's read x=1 y=1 z=1)
x0 y0 z0 (move back to orgin)
m30
Next I edit the g code (using Mach 3) to add a g 20 and regenerate the path
resulting in the following code.
(test 2)
g0 f30 g20
g1 x1 y1 z1 (move to x=1, y=1 z=1)
m1 (stop, read DRO's - cycle start to continue) (DRO's read x=1 y=1 z=1)
x0 y0 z0 (move back to orgin)
m30
As soon as I put the g20 into the code my DRO's changed from 0 to
x =-16.7674
y = -388.7217
z = -53.7139
Since the position was previously at 0,0,0 I zero all three axis to read 0's and regenerate the path.
I start the code and the machine immediately moves to the y and z stops and tries to keep going until
I stop it manually (using escape).
If I remove the g20 the axis are still screwed up when I run the program.
If I replace the g20 with a g 21 then everthing goes back to normal in terms of movement,
i.e. the 3 axis move one inch
when the program runs, however the speed of movement appears to be much slower than normal for f30.
Closing Mach3 and and loading a program without a g20 seems to make things normal again.
If I close mach3 and reload the program with the g21 in the movement seems to be OK but
the speed of movement is still slower, i.e. the movement at f30 is not as fast as normal.
If I reload the program with a g70 in place of the g20 it behaves as if I used g20, i.e. g20 and g70 behave the same.
If I use g71 instead of g21 I get the same results except the speed of movement seems normal for f30.
Since I never use mm it does not seem to be a problem if I simply leave the g20 out, however
I like to keep my code portable which dictates that you not assume any previous machine conditions.
Any suggestions?
Logged
Hood
Active Member
Offline
Posts: 17,366
Carnoustie, Scotland
Re: g20/g21 and g70/g71 problems
«
Reply #1 on:
March 03, 2011, 04:42:35 PM »
Can you attach your xml please.
Hood
Logged
desutt
Active Member
Offline
Posts: 22
Re: g20/g21 and g70/g71 problems
«
Reply #2 on:
March 04, 2011, 01:03:32 PM »
I thought that I sent the XML code yesterday, but I must have messed up the post somehow. Here it is.
DonsMill.xml
(97.62 KB - downloaded 26 times.)
Logged
Hood
Active Member
Offline
Posts: 17,366
Carnoustie, Scotland
Re: g20/g21 and g70/g71 problems
«
Reply #3 on:
March 04, 2011, 01:23:30 PM »
Ok you are set up as mm for native units and I am thinking you are meant to be inches?
If thats the case then go to Config then SetNative Units and then change that to Inch. Next you will have to go to motor tuning and multiply each of your X Y and Z axis steps per unit by 25.4, remember to save axis settings each time you change. Restart Mach and you should be fine.
Hood
Logged
desutt
Active Member
Offline
Posts: 22
Re: g20/g21 and g70/g71 problems
«
Reply #4 on:
March 04, 2011, 07:49:14 PM »
That didn't work, everything is screwed up when I do that. Thanks anyway
Logged
Hood
Active Member
Offline
Posts: 17,366
Carnoustie, Scotland
Re: g20/g21 and g70/g71 problems
«
Reply #5 on:
March 05, 2011, 04:58:46 AM »
Do you have steppers?
What microstepping are the drives?
Do you have gearing between screws and motors?
What is the pitch of the screws?
Hood
Logged
desutt
Active Member
Offline
Posts: 22
Re: g20/g21 and g70/g71 problems
«
Reply #6 on:
March 05, 2011, 12:32:51 PM »
I have steppers, don't know what microstep.
Logged
Hood
Active Member
Offline
Posts: 17,366
Carnoustie, Scotland
Re: g20/g21 and g70/g71 problems
«
Reply #7 on:
March 05, 2011, 02:02:16 PM »
Then afraid I cant help unless you can give me the information needed to work things out.
Hood
Logged
desutt
Active Member
Offline
Posts: 22
Re: g20/g21 and g70/g71 problems
«
Reply #8 on:
March 06, 2011, 05:50:52 PM »
Ok thanks anyway. Since it not really a problem if I leave out G20 I think I willl ignore it for a while. Tried of chasing it now.
Logged
Hood
Active Member
Offline
Posts: 17,366
Carnoustie, Scotland
Re: g20/g21 and g70/g71 problems
«
Reply #9 on:
March 06, 2011, 11:57:41 PM »
It is a problem because you are set up in Metric units as far as Mach is concerned and if your code ever has a G20 in it the path will be 25.4 times larger.
If you are certain that when you command a move of 1 inch it does move one inch then all you need to do is set the Native units as Inch. I however find this strange as if your unit in motor tuning is one inch then you only have a value of 548 for X and 534 for Y which means you must have a very course drive system, that is why I was thinking in a previous reply that when you changed the native units you would need to multiply the steps per unit by 25.4.
Hood
Logged
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...