conversational input

More
01 Jun 2011 06:31 #10231 by M4MazakUser
so...

I've managed to link together subs using embedded ngcgui, so most people without the "g" code knowledge can create a usable program. or so i can do simple stuff quicker.

ill link some subs in the following messages, when they are all sorted, ill put the lot up somewhere.

basicaly, i have no preamble, and use a sub for the start, toolchange, and end of created program.

File Attachment:

File Name: t_chg.ngc
File Size:0 KB
Attachments:

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

More
01 Jun 2011 06:35 #10232 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
; start subfile

o<start> sub
#<SurfaceSpeed> = #1 (=180 Surface Speed)
#<Max_RPM> = #2 (=1400 Max Spindle RPM)
#<RToolNumber> = #3 (=1 Roughing Tool)
G54 (WORK CO-ORDINATE)
G90 G7 G21 G18 G95 M113
G4 P2.0
T#<RToolNumber> M6
G43 G7 G96 D#<Max_RPM> S#<SurfaceSpeed>

o<start> endsub


; end subfile

(info: End of Program)
o<end> sub
#<fin_posx> = #1 (= 295.0 X Fin pos)
#<fin_posz> = #2 (= 200.0 Z Fin pos)

M09 ; coolant off
M05 ; stop spindle
G00 X#<fin_posx> Z#<fin_posz>
G49 ; cancel toolength offset
M02

o<end> endsub


and attached is a finishing cycle.

File Attachment:

File Name: fin.ngc
File Size:2 KB
Attachments:

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

More
01 Jun 2011 06:46 #10233 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
i have written a lot more, and now need to focus on making the roughing with radiuses sub, and to make the rough/finish subs capable of internal/external use by checking which direction the start size to finished size is.
im probably going to be using these a lot, so ill try and de-bug them and post them within a week or two.

one thing im trying to work out is what to do if there is a bad input value, as i say in the fin cycle,
; insert errorcheck calc here. hmm, how do i report an error?
anyone have any ideas on this?

later then!

:side:

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

More
01 Jun 2011 11:24 #10235 by BigJohnT
Replied by BigJohnT on topic Re:conversational input
You can have a message pop up using (MSG, My Warning Message) format and with debug you can give the value. ngcgui does check for invalid numbers like 1..123 etc and turns the input box red.

I'm curious why you put the tool change in the start sub? For me that would limit a string of subs to one tool unless I misunderstand what your doing.

John

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

More
01 Jun 2011 19:50 - 01 Jun 2011 19:52 #10239 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
it generaly goes as such:

start -set m/c variables etc, speed, tool

rough -rough cycle

t_chg - change to next tool

fin -finish profile

t_chg -change tool again

thdod - thread od

end - stop spindle/coolant, move to a point for operator access to chuck.

File Attachment:

File Name: th_od-d08b...8774.ngc
File Size:1 KB



ps, i really need to change the numbers on the thread map!
Attachments:
Last edit: 01 Jun 2011 19:52 by M4MazakUser.

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

More
01 Jun 2011 21:18 #10240 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
Damn! ngcgui dosen't write things in the order that u do them, if u try and tool change in between cycles, when u output the program "Finalise" i stacks all the toolchanges together!

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

More
01 Jun 2011 23:29 #10245 by BigJohnT
Replied by BigJohnT on topic Re:conversational input
That might be why I included a tool change with each subroutine.

Someone just used Gimp or similar to make that I think.

There is one in the manual you might get and add your numbers to...

www.linuxcnc.org/docview/html/gcode_main...76:-Threading-Canned

John

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

More
03 Jun 2011 20:07 #10293 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
nothing to it then - lol, im going to have to work out how to write tcl....

or use that other embeddable language that works in 2.5.

ill write a proper roughing cycle today though -with radius support, (end and top of cut).

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

More
03 Jun 2011 21:17 #10294 by BigJohnT
Replied by BigJohnT on topic Re:conversational input
Neat! TCL makes my head hurt when I try and understand it... I can't wait to see it.

John

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

More
09 Jun 2011 02:46 #10383 by M4MazakUser
Replied by M4MazakUser on topic Re:conversational input
THERE IS ANOTHER WAY......

ill add tool number, tool change position, and speed to cycle input,

But!

if tool change value is null (0) the cycle will ignore said values and proceed without tool change.

-think brain -think!

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

Time to create page: 0.097 seconds
Powered by Kunena Forum