Set G28 and G30

Moderators: TomKerekes, dynomotion

Post Reply
a_j_p3
Posts: 16
Joined: Sun Aug 26, 2018 10:15 pm

Set G28 and G30

Post by a_j_p3 » Sun Jul 10, 2022 8:35 pm

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

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Set G28 and G30

Post by TomKerekes » Mon Jul 11, 2022 1:14 am

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
Regards,

Tom Kerekes
Dynomotion, Inc.

a_j_p3
Posts: 16
Joined: Sun Aug 26, 2018 10:15 pm

Re: Set G28 and G30

Post by a_j_p3 » Wed Jul 13, 2022 11:16 pm

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?

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Set G28 and G30

Post by TomKerekes » Wed Jul 13, 2022 11:38 pm

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
Regards,

Tom Kerekes
Dynomotion, Inc.

a_j_p3
Posts: 16
Joined: Sun Aug 26, 2018 10:15 pm

Re: Set G28 and G30

Post by a_j_p3 » Thu Jul 14, 2022 12:03 am

OK understand - good point on the MCodes - I keep forgetting there are so many available to assign.

Post Reply