Control Gcode program loaded into Axis

More
03 May 2011 13:32 #9559 by Nick
Hi!

I'm wondering is there any way to control Gcode that is loaded from ngc file.

We want to create some small "CAM buttons" for simple procedures like rectangle pocketing, array drilling, bed cutting, and etc directly from EMC2 without any external CAM.

So what do we need:
1. A way to create Buttons which will start external script. (it can be done with PyVCP or Glade VCP)
2. A way to post Gcode to running AXIS. Here's where we've stopped.

So is it possible to change gcode in the AXIS?

PS sorry for my English :blush:

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

More
03 May 2011 14:22 #9561 by BigJohnT
Nick,

Sounds like your looking for the ngcgui add on for Axis. You can add any custom tabs you want and just fill in the blanks like width, length, depth, tool etc and when your done you can combine them all into a program all right inside of Axis. All that is in the Subroutines section here on the forum.

John

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

More
03 May 2011 14:32 #9563 by Nick
Thanks a lot! I'll take a look!

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

More
04 May 2011 07:39 #9581 by Mike_Eitel
Hi Nick

Just a hint
Don't go pyvcp and M1xx commands, and or phyton. You will not be happy.

Mike

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

More
11 May 2011 16:28 #9724 by andypugh
Nick wrote:

HWe want to create some small "CAM buttons" for simple procedures like rectangle pocketing, array drilling, bed cutting, and etc directly from EMC2 without any external CAM.

As well as ngcgui, you might want to look at www.bodgesoc.org/lathe/lathe.html
It is likely that I will migrate from that solution to ngcgui at some point, though.

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

More
12 May 2011 08:36 #9736 by Nick
That's nice, but we wanted to make more complicated gui.

For example, we want to have buttons with images describing their behavior instead of using usual text buttons.
Or place text entries on the image to reach mutual understanding.

Is it able to do it using ngcgui?

http://cnc-club.ru/forum/download/file.php?id=1459&mode=view

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

More
12 May 2011 11:48 #9741 by BigJohnT
Ok, I understand now... you need gladevcp. With gladevcp you can build your own interface almost. It is in the 2.5 version of EMC.

Some information about gladevcp is here:

www.linuxcnc.org/docview/devel/html/gui/gladevcp.html

John

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

More
12 May 2011 12:32 #9745 by Nick
Do you know is there any way to change Gcode in Axis using python / gladevcp, or not?
And about mdi commands, can they be multi line or not?

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

More
12 May 2011 12:56 #9750 by Mike_Eitel
Here something to test:

If you comment the o<p103> sub and the o<p103> endsub lines
you can start them as M1xx via pyvcp

If you put ( all including ) in a file p103.ngc you can start as phyton.

Via phyton you will get what you expect, including preview.
Started via M1xx and pyvcp button you will see nothing on axis and program starts direct execution ( I dislike that )


o<p103> sub ( helical hole milling, already loaded tool )
#1= 5 ( x pos] )
#2= 5 ( y pos] )
#3= 3 ( safety height )
#4= 5 ( hole depth )
#5= 8 ( hole dia )
#6= 6 ( tool dia )
#7= 3 ( depth per circle )
#10 = 120 ( feed )
#11 = 0 ( do endcircle )
(MSG, helical hole milling )

g21 g64 g17 g90 m3 F#10

#4=[0 - #4]
#8=[#3 - #7] (#8 is current depth step)
g0 z#3
g0 x[#1 + #6] y[#2 + [#5 / 2]] (start above and right for convex corner for entry to ccw arcs)
g41 g0 x#1 y[#2 + [#5 / 2]]
o101 while [#8 GT #4] (down toward the specified depth a bit at a time)
g3 x#1 y[#2 + [#5 / 2]] i0 j[0 - [#5 / 2]] z#8
#8=[#8 - #7]
o101 endwhile (down to the actual depth)
g3 x#1 y[#2 + [#5 / 2]] i0 j[0 - [#5 / 2]] z#4
o102 if [#11 GT 0]
g3 x#1 y[#2 + [#5 / 2]] i0 j[0 - [#5 / 2]] (full circle at the actual depth)
o102 endif
g0 x#1 y#2
G0 z#3
g40
m5
(m60.0)
o103 endsub

m2
%


Mike

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

More
12 May 2011 13:03 #9752 by Nick
That's why you have recommended to avoid it.
I do not like it too :(.

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

Time to create page: 0.115 seconds
Powered by Kunena Forum