fix a connection between pyvcp and ngc

More
27 Jun 2012 06:54 #21372 by Revilo
hey

i built my panel with pyVCP, within there´s a "touchprobe" button. now i want to make a fix connection between that butto an the g-code for touchprobe, so everytime i push the button, my mill should execute the touchprobe.ngc. could someone give me help?

greetz

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

More
27 Jun 2012 08:12 - 27 Jun 2012 08:19 #21373 by ArcEye
Last edit: 27 Jun 2012 08:19 by ArcEye. Reason: add link

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

More
27 Jun 2012 10:19 #21374 by BigJohnT
Or you could make your file a proper subroutine file and call it using a MDI.

See this thread for more info on how to do that.

John

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

More
27 Jun 2012 14:35 #21385 by ArcEye
Yeah, Johns way is easier.

You would learn a lot doing it my way, but you probably just want to use it with minimum input

regards

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

More
27 Jun 2012 20:09 #21413 by BigJohnT
I have been piddling with a LinuxCNC G code tutorial page here that might help with the subroutines.

John

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

More
28 Jun 2012 08:58 #21422 by ArcEye
That's looking good John.
Let us know when you are happy with it and have posted it permanently, need a link to point beginners to.

Certainly fills a hole. It's very difficult to know where to suggest someone starts, if they have no prior experience with other controllers or at least some general computer programming knowledge.

No point studying the many Fanuc type programming books and web pages, because as soon as you leave the first few G codes you are into numbered blocks and all sorts that Linuxcnc does not use.

regards

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

More
28 Jun 2012 10:42 #21425 by BigJohnT
It's a work in progress and any suggestions are welcome. The url is a permanent one well at least as permanent as I can maintain the hosting site lol. That is the reason I started the page as far as I know there are no LinuxCNC tutorials out on the web. BTW, it is done using AsciiDoc so the base pages are just txt files so anyone could write a section and send it to me to be added in.

John

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

More
14 Aug 2012 11:10 #23154 by Revilo
hey guys,

didn´t understand much. somehow it does not work.

maybe a better explanation could help you to help me.

i build an pyvcp radiobutton with 2 choices. i can choose I, for incremetal movements, or A for absolutely movements. also i have three spinboxes namend x y and z. so if on the radiobutton i is chosen and in my x spinbox i write the value 5, i want my x axis to move 5 mm in x direction.

is this possible to do that in any way?


greetz

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

More
14 Aug 2012 11:17 - 14 Aug 2012 11:18 #23155 by BigJohnT
Incremental is possible using halui and some logic components. Doesn't this duplicate the function on the manual tab? Absolutes might be a problem to figure out...

linuxcnc.org/docs/html/man/man1/halui.1.html

John
Last edit: 14 Aug 2012 11:18 by BigJohnT.

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

More
14 Aug 2012 12:13 #23161 by andypugh
Revilo wrote:

i build an pyvcp radiobutton with 2 choices. i can choose I, for incremetal movements, or A for absolutely movements. also i have three spinboxes namend x y and z. so if on the radiobutton i is chosen and in my x spinbox i write the value 5, i want my x axis to move 5 mm in x direction.


It can be done. But it will take a bit of fiddling.

MDI_COMMAND statements in the INI file create HAL pins and define a G-code line to run when the HAL pin goes high.
Because what you want to do takes more than one line of G-code, the MDI_COMMAND needs to call a subroutine.
See JT's example for how to do that part.

You then need the G-code that is called to read the PyVCP control values. The means that the values need to be connected to G-code analogue and digital inputs in HAL, and then the G-code inside the called subroutine needs to read them in to variables.
There is an example of how to do all this here: www.bodgesoc.org/lathe/lathe.html

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

Time to create page: 0.114 seconds
Powered by Kunena Forum