Creating a "one button touch off" button

More
19 Sep 2012 04:01 #24404 by cmorley
in linuxcnc 2.5+ using P0 will set the current system regardless of what it is.

As in G10 L20 P0 X0 Y0 Z0

This was specifically added for 'touch off button' use.

Chris M

Please Log in or Create an account to join the conversation.

More
19 Sep 2012 04:25 #24405 by cmorley
Replied by cmorley on topic Re:Creating a
andypugh wrote:

btvpimill wrote:

Thanks Andy, Can I also say x0y0z0, as I want to set a "current location is origin". I must have mis-read the doc's and am thinking setting them to zero will clear the current g5x data?


G10 L20 P1 X0 Y0 Z0 will set the current location to the origin.
G10 L2 P1 X0 Y0 Z0 will set the G54 Offsets to 0. The difference is in the L2 or L20.

www.linuxcnc.org/docs/html/gcode/gcode.h...em_a_id_sec_g10_l2_a


L2 and L20 where never explained clear enough for me but this was my interpretation:

(This much I know is true)
L20 sets the offsets so the current location (of the tool) will display as the numbers entered.
eg L20 P0 X5 Y0 sets the current location to X 5 , Y 0 and Z will stay at what ever it was.

(This much not so sure)

L2 sets the offsets so the origin is offset by the amount requested.
eg L2 P0 X1 will offset the x axis positively by 1 (lowering the readout)

to recap if you were at X absolute zero and the user coordinate system read zero for X, then issued
G20 L20 P0 X5 the readout would say X5

same thing except:
G20 L2 P0 X5 the readout would say -5

hopefully no lies there....

Chris M

Please Log in or Create an account to join the conversation.

More
19 Sep 2012 11:46 #24414 by btvpimill
Replied by btvpimill on topic Re:Creating a
I will try to get some play time with this today, just to get confirmation on exacty what each does.

Thanks Andy,John, and Chris for the helpful insight to this, I will report my findings so hopefully there will be no more question - even if I am the only one who has them :)

Please Log in or Create an account to join the conversation.

More
23 Sep 2012 17:56 #24564 by eszyman
Ok so we found that after running the G10L20 command the gcode display does not update and we have issues with travel since the code is not reloaded as when the axis touch off button is used,

The solution has been to write an o call to access the following codes

o<zerog54>call
o<zerog54> sub
G10 L20 P1 x0y0z0a0 
(debug, reloading gcode...)
M155
o<zerog54> endsub

M155:
#!/bin/sh
axis-remote --reload

Note the G10 and M155 must be on separate lines or there will be issues with the numbers not touching off unless you bounce in and out of G54

The next problem is that now we get the following axis error:
can't do that (EMC_TASK_PLAN_OPEN) in manual mode

The end result is that the file reloads and the g54 is touched off appropriately, but we'd like to rid ourselves of the error if possible. Has anyone else seen anything this?

Please Log in or Create an account to join the conversation.

More
14 Jan 2013 03:23 #28660 by h_munktell
Great info on the axis-remote --reload! Works, but I have a problem and that is that it takes approx 5 seconds before the axis-remote command in my M155 file is executed and returning.

M155:
#!/bin/sh
axis-remote --reload
echo Hello
exit 0

If I run this script in a terminal, it executes directly and I get the messege and it reloads the file in axis correctly. But if I call the M155 file from MDI, it takes 5 secons before anyting happens and I dont get the message in the terminal i started linuxcnc from. If I comment the axis-remote line away, and executes M155 from MDI, it executes directly and I get the message in the terminal. Are I'm doing something wrong or is it a bug? (I run latest master version)

--Henrik

Please Log in or Create an account to join the conversation.

More
04 Sep 2013 03:07 #38454 by the_muck
Same here... any idea?

Please Log in or Create an account to join the conversation.

More
23 Mar 2014 23:03 #45151 by HolgerT

Please Log in or Create an account to join the conversation.

Time to create page: 0.272 seconds
Powered by Kunena Forum