Hello Guest it is March 28, 2024, 09:49:38 AM

Author Topic: code to set home programmatically  (Read 3161 times)

0 Members and 1 Guest are viewing this topic.

code to set home programmatically
« on: April 20, 2012, 08:16:54 AM »
Hello All

are there words that i can code in the code which will set home x and set home z?

the machine has home switches

best regards
think of the trees-- use both sides of the computer paper
Re: code to set home programmatically
« Reply #1 on: April 20, 2012, 11:24:30 AM »
You can jog to a set position, and then use

G54 (or whatever offset you are using)
G92 X0. Y0. Z2.0 (or whatever location you are wanting to assiign that point to such as G92 X12.5 Y3.0 Z0.)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: code to set home programmatically
« Reply #2 on: April 20, 2012, 12:03:24 PM »
Fred IF you have home switches then you have what yoou need to setup HOME.  It does not have to be at the switch positions. The Home/limits setup page you can apply an offset to the switch position to move the actual HOME to be anywhere on your machine.

That would be G30 home

You can also Specific where you want G28 home to be in setup.


NOW if you are talking USER Coordinates HOME then Move to that location and do a

G52 X0Y0Z0    OR
G92 X0Y0Z0    OR
G10 L2 P1 X0Y0Z0

and you have just set the USER home to 0,0,0

There IS one more option and that would be to create a Mcode that will set the Machine HOME at the position you are at. But you can ONLY set it to zero that way. AND I am not sure how any HOME offsets woul dbe applied.

Hope that helps IF not I will try again, (;-) TP
« Last Edit: April 20, 2012, 12:05:50 PM by BR549 »
Re: code to set home programmatically
« Reply #3 on: April 23, 2012, 11:38:35 AM »
Thank you seemecnc

This is looking clearer-- g54 (defined as "use fixture offset 1 in chapter 10")
will fixture offset 1 always be the position found by the home switches when I have used
"set home" on the manual screen?

then the next question regarding G92.
If i use your suggestion of g92 X12.5 y3 z0 and enter this either as
code or from the MDI line. does this mean that when i later code in
G92 (alone with no parameters) the tool will return to the preset position
of x12.5 y3 z0?
( note to TP- i am working through your suggestions and will respond in a few minutes)
think of the trees-- use both sides of the computer paper
Re: code to set home programmatically
« Reply #4 on: April 23, 2012, 12:12:43 PM »
Ok - thanks TP -

I am getting around all this home stuff  !!

So does that mean that G10 ( defined in manual as"coordinate system origin setting" ) will take the
machine to X0 y0 z0 ?
and this position is the "machine coords" position x0 y0 z0 where the "set home" button
was positioned ?

While this has all been very interesting - please forgive me but the original question is still unanswered.

Sorry about my bad english.

What i am wanting to do is to put in a line of code which will automatically move the machine
to trigger the home switches .

Normal procedure would be to select manual screen and press buttons to set home X and then set home Z

I would like to write this into the code so that at startup the machine automatically finds the home position
 
My next action would then be to take a small cut, measure the cut and set the axes to that size

many thanks

fred






 




 
think of the trees-- use both sides of the computer paper

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: code to set home programmatically
« Reply #5 on: April 23, 2012, 03:13:23 PM »
NO g10 can only set USER home position (X0Y0). I guess I need to do a CHART to show all the variables for HOME.

(;-)TP