G92 vs. Keyboard END Key?
11 Dec 2013 22:21 #41514
by Paul
G92 vs. Keyboard END Key? was created by Paul
Hello,
I have an MDI command setup to touch-off different axis. Something like "G92 X0.000 Y0.000". I assumed this command was basically the same as selecting each axis and pressing the END key on the keyboard. Recently I used my MDI command via an on-screen button to touch-off both X and Y axis, but my screen image of the work area didn't update appropriately except for the axis readout resetting to 0.00 and I also received a warning that one or more axis would run outside it's limits if I ran the next job.
Pressing the END key for each axis successfully set LinuxCNC to the current position. Do I need to use a different code for my MDI command to duplicate the keyboard's END key?
Thanks...
PK
I have an MDI command setup to touch-off different axis. Something like "G92 X0.000 Y0.000". I assumed this command was basically the same as selecting each axis and pressing the END key on the keyboard. Recently I used my MDI command via an on-screen button to touch-off both X and Y axis, but my screen image of the work area didn't update appropriately except for the axis readout resetting to 0.00 and I also received a warning that one or more axis would run outside it's limits if I ran the next job.
Pressing the END key for each axis successfully set LinuxCNC to the current position. Do I need to use a different code for my MDI command to duplicate the keyboard's END key?
Thanks...
PK
Please Log in or Create an account to join the conversation.
12 Dec 2013 04:23 #41527
by BigJohnT
Replied by BigJohnT on topic G92 vs. Keyboard END Key?
The "End" key sets the currently selected axis G54 offset to 0, so it is the same as G10 L20 X0 for the X axis.
JT
JT
Please Log in or Create an account to join the conversation.
12 Dec 2013 11:14 #41535
by Paul
Replied by Paul on topic G92 vs. Keyboard END Key?
Thanks John. I did not know that.
Psul
Psul
Please Log in or Create an account to join the conversation.
13 Dec 2013 01:45 #41556
by andypugh
Replied by andypugh on topic G92 vs. Keyboard END Key?
Axis is the layer at which the END key is interpreted. Because Axis has seen the END key, Axis knows it needs to refresh.
If you change the coordinate systems outside Axis, then Axis does not know that it needs to update.
axis-remote might help, allowing you to force a reload. linuxcnc.org/docs/html/man/man1/axis-remote.1.html
A hal-pin version might exist, I can't cheek right now.
If you change the coordinate systems outside Axis, then Axis does not know that it needs to update.
axis-remote might help, allowing you to force a reload. linuxcnc.org/docs/html/man/man1/axis-remote.1.html
A hal-pin version might exist, I can't cheek right now.
Please Log in or Create an account to join the conversation.
15 Dec 2013 11:33 #41616
by Paul
Replied by Paul on topic G92 vs. Keyboard END Key?
Thanks Andy. I'll have to look into it.
Please Log in or Create an account to join the conversation.
22 Jan 2014 21:30 #43078
by Paul
Replied by Paul on topic G92 vs. Keyboard END Key?
OK – I took some time to work on this. Probably a better way to do this, but I now have:
In the main .ini file:
In my custom_postgui.hal file:
In my custompanel.xml file:
My M101 file:
If I run M101 from a terminal, it seems to act correctly – Z axis 0's and the axis display reloads. If I click on the PyVCP button, nothing changes and a few seconds later I get an error that this can't happen in manual mode. I thought the halui.mdi-command-xx would put LinuxCNC in MDI mode, complete the script and return to (auto?) mode. I removed the line “axis-remote –reload” from M101 as a test to see if two commands created the error, but same results.
Is there something(s) I'm missing? Thanks in advance.
In the main .ini file:
[HALUI]
...
MDI_COMMAND = M101
In my custom_postgui.hal file:
net remote-touchoffznew halui.mdi-command-08 <= pyvcp.touchoffznew
In my custompanel.xml file:
<button>
<halpin>"touchoffznew"</halpin>
<text>"Touch Off Z-Reload Axis"</text>
<font>('Helvetica',10)</font>
</button>
My M101 file:
#!/bin/sh
# Touch-off Z axis and refresh Axis display
axis-remote -m G10L20P1Z0.00
axis-remote --reload
exit 0
If I run M101 from a terminal, it seems to act correctly – Z axis 0's and the axis display reloads. If I click on the PyVCP button, nothing changes and a few seconds later I get an error that this can't happen in manual mode. I thought the halui.mdi-command-xx would put LinuxCNC in MDI mode, complete the script and return to (auto?) mode. I removed the line “axis-remote –reload” from M101 as a test to see if two commands created the error, but same results.
Is there something(s) I'm missing? Thanks in advance.
The following user(s) said Thank You: HolgerT
Please Log in or Create an account to join the conversation.
23 Jan 2014 15:21 #43100
by Rick G
Replied by Rick G on topic G92 vs. Keyboard END Key?
Have you tried using...
halui.mode.mdi (bit, in) - pin for requesting mdi mode
linuxcnc.org/docs/html/gui/halui.html
If you use a button to switch to MDI mode first.
Your MDI command could simply be...
MDI_COMMAND = G10 L20 P1 Z0.00
Rick G
halui.mode.mdi (bit, in) - pin for requesting mdi mode
linuxcnc.org/docs/html/gui/halui.html
If you use a button to switch to MDI mode first.
Your MDI command could simply be...
MDI_COMMAND = G10 L20 P1 Z0.00
Rick G
Please Log in or Create an account to join the conversation.
23 Mar 2014 23:01 - 23 Mar 2014 23:03 #45150
by HolgerT
Replied by HolgerT on topic G92 vs. Keyboard END Key?
Thank you very much for this hints. I could do some further steps forward with it.
Now I can confirm the behavior of "axis-remote --reload" (delay and error EMC_TASK_PLAN_OPEN).
After some investigations, this worked for me as a work around (no delay and no error anymore):
Please pay attention to the "&" at the end of line.
Also following line for reloading worked:..but this will flash a terminal window at screen.
Hope this helps.
Holger
Now I can confirm the behavior of "axis-remote --reload" (delay and error EMC_TASK_PLAN_OPEN).
After some investigations, this worked for me as a work around (no delay and no error anymore):
#!/bin/sh
# Touch-off Z axis and refresh Axis display
axis-remote -m G10L20P0Z0
axis-remote --reload &
exit 0
Please pay attention to the "&" at the end of line.
Also following line for reloading worked:
:
axis-remote -m G10L20P0Z0
gnome-terminal -e "axis-remote --reload"
:
Hope this helps.
Holger
Last edit: 23 Mar 2014 23:03 by HolgerT.
Please Log in or Create an account to join the conversation.
24 Mar 2014 02:36 #45164
by Paul
Replied by Paul on topic G92 vs. Keyboard END Key?
Thanks Holger. That now works for me too. I am familiar with the "&" which runs the command in the background and should have thought about that. I did not. Thank you!
Paul
Paul
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds