Page 1 of 1
Set G28 and G30
Posted: Sun Jul 10, 2022 8:35 pm
by a_j_p3
Is there a way for me to set G30 and G28 locations? I can't find it searching this forum or the online documentation and currently both of those commands send the machine to X0 Y0 Z0 in machine coordinates... Ideally I could use G30 just to raise the Z Head to a set height and G28 to simultaneously move all 3 axes to a set position.
Thanks,
-Andrew
Re: Set G28 and G30
Posted: Mon Jul 11, 2022 1:14 am
by TomKerekes
Hi Andrew,
G28 and G30 positions are saved in the Var file (normally emc.var by default)
5161, 5162, 5163, /* G28 home */
5164, 5165, 5166,
5181, 5182, 5183, /* G30 home */
5184, 5185, 5186,
HTH
Re: Set G28 and G30
Posted: Wed Jul 13, 2022 11:16 pm
by a_j_p3
So I have noticed playing around with these that they are dependent on the units being used... i.e. if I put G30 at 1,1,1 and am using in units it will go to 1",1",1" but if I am using mm units it will go to 1mm,1mm,1mm... Can I specify this somehow to be either in units or motor counts or something consistent regardless of G20 or G21 the program is written in?
Also, is there a special way to denote that a certain axis should not move when something is called? Like could I write NA for 5161, 5162 and some value for 5163 to only have the Z axis move on a G28 call?
Re: Set G28 and G30
Posted: Wed Jul 13, 2022 11:38 pm
by TomKerekes
Hi Andrew,
No the GCode Vars are just numbers so the Interpreter assumes the current units.
I think a programmed point can be included. For example:
G28 Z0
would perform a move to Z0 (without any other axes moving) and then move to the home position.
Another option would be to use a custom MCode assigned to a C Program. This could then move in machine counts and be more flexible on order of motions and such.
HTH
Re: Set G28 and G30
Posted: Thu Jul 14, 2022 12:03 am
by a_j_p3
OK understand - good point on the MCodes - I keep forgetting there are so many available to assign.