Create Y/N Message Box

More
14 Mar 2017 18:19 #89621 by rjshust
Hello,

I have been using LinuxCNC on a hobby machine for a few years, and have done a few basic things with PyVCP (basic buttons, touch plate).

What I want to do:
Use a .laser for X/Y homing. Attach laser on spindle mount, shine the laser at the point I want to set as X/Y home, run G92 to set X/Y zero to where the laser is pointing. I can do all of this without any issues.

The Issue:
I am afraid that I could accidently click this button, and then lose the X/Y home. Is there a way to have a message box pop up to confirm I want to reset X/Y before it runs the G92?

Thanks

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

More
14 Mar 2017 22:16 #89632 by BigJohnT
Replied by BigJohnT on topic Create Y/N Message Box
Well, you should not use G92 to set a home position, you should use the home button. If you try and home again in Axis it asks if you really want to home again.

Now to answer your question, you could create a button in the PyVCP panel and a Multi-Label to display the message and the button to confirm you really want to.

The only place I use G92 is on my plasma machine because I jog to the start position and my touchoff routine sets XY zero then Z zero.

JT
The following user(s) said Thank You: rjshust

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

More
16 Mar 2017 18:42 #89763 by andypugh
Replied by andypugh on topic Create Y/N Message Box

Well, you should not use G92 to set a home position, you should use the home button.


The HOME button uses G10 behind the scenes. And that would be an option.

I would start with hal_manualtoolchange.py, rename it, and change the pin names.

Then you can connect that in HAL so that it pops-up when you press a button, and if you answer "yes" it will pass-on that button-press to wherever the signal currently goes.
The following user(s) said Thank You: rjshust, cakeslob

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

More
23 Sep 2020 14:54 #183477 by 3D-Master
Replied by 3D-Master on topic Create Y/N Message Box
maybe a little late but you could just put for example " (DEBUG, NC-Start = Yes ) " and a M0 or M1 above G92 so you have to click cycle start to continue

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

Time to create page: 0.175 seconds
Powered by Kunena Forum