Create Y/N Message Box

More
14 Mar 2017 18:19 #89621 by rjshust
rjshust created the topic: Create Y/N Message Box
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
More
14 Mar 2017 22:16 #89632 by BigJohnT
BigJohnT replied the 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
More
16 Mar 2017 18:42 #89763 by andypugh
andypugh replied the topic: Create Y/N Message Box

BigJohnT wrote: 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
Time to create page: 0.061 seconds
Powered by Kunena Forum