NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC pyVCP fix a connection between pyvcp and ngc

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: fix a connection between pyvcp and ngc

fix a connection between pyvcp and ngc 26 Jun 2012 23:54 #21372

  • Revilo
  • Revilo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 27 Jun 2012 01:12 #21373

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1316
  • Thank you received: 102
  • Karma: 129
Last Edit: 27 Jun 2012 01:19 by ArcEye. Reason: add link
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 27 Jun 2012 03:19 #21374

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4947
  • Thank you received: 85
  • Karma: 134
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 27 Jun 2012 07:35 #21385

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1316
  • Thank you received: 102
  • Karma: 129
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 27 Jun 2012 13:09 #21413

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4947
  • Thank you received: 85
  • Karma: 134
I have been piddling with a LinuxCNC G code tutorial page here that might help with the subroutines.

John
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 28 Jun 2012 01:58 #21422

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1316
  • Thank you received: 102
  • Karma: 129
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 28 Jun 2012 03:42 #21425

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4947
  • Thank you received: 85
  • Karma: 134
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 14 Aug 2012 04:10 #23154

  • Revilo
  • Revilo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
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
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 14 Aug 2012 04:17 #23155

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4947
  • Thank you received: 85
  • Karma: 134
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 04:18 by BigJohnT.
The administrator has disabled public write access.

Re:fix a connection between pyvcp and ngc 14 Aug 2012 05:13 #23161

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4109
  • Thank you received: 140
  • Karma: 129
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
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 1.851 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.