twin headed hydro punch how to cnc
27 Oct 2012 03:35 #25852
by jd896
Replied by jd896 on topic Re:twin headed hydro punch how to cnc
is there a difference between using m codes vs oword subs for the punch cycle
eg
inhibit motion moves
turn output 1 on
wait for input 1 (timeout after 10 secs then error, ask is machine pump running? or are limits set correctly?)
turn output 1 off
wait for input 2 (timeout after 10 secs then error , ask are limits set correctly?)
motion moves ok
question is motion paused while in a sub or m code ?
thanks john
eg
inhibit motion moves
turn output 1 on
wait for input 1 (timeout after 10 secs then error, ask is machine pump running? or are limits set correctly?)
turn output 1 off
wait for input 2 (timeout after 10 secs then error , ask are limits set correctly?)
motion moves ok
question is motion paused while in a sub or m code ?
thanks john
Please Log in or Create an account to join the conversation.
27 Oct 2012 03:42 #25853
by BigJohnT
Yes you could move the beam and run punch 1 then move the beam and run punch 2 and so on. It just takes a little more up front thinking with your code.
John
Replied by BigJohnT on topic Re:twin headed hydro punch how to cnc
the possibility it there then, is there a way to have the file struture/ order its self so that taking into account the punches are 600 appart have the first few holes run on one machine and then invole the second machine without having to run up and down the beam from point to point (not overlapping moves if you like so's to get cycle times down)
i dont know the terminology but could it order the file based on the x position requested ascending/descending
thanks john
Yes you could move the beam and run punch 1 then move the beam and run punch 2 and so on. It just takes a little more up front thinking with your code.
John
Please Log in or Create an account to join the conversation.
27 Oct 2012 03:49 #25854
by BigJohnT
The difference between using custom M codes like M100 and subroutines is you can do things outside of LinuxCNC with the custom M codes and subroutines are for doing normal things you do with G code it just adds logic and looping and variables to the G code.
For the pump control I'd use classicladder as it has easy to use timers.
John
Replied by BigJohnT on topic Re:twin headed hydro punch how to cnc
is there a difference between using m codes vs oword subs for the punch cycle
eg
inhibit motion moves
turn output 1 on
wait for input 1 (timeout after 10 secs then error, ask is machine pump running? or are limits set correctly?)
turn output 1 off
wait for input 2 (timeout after 10 secs then error , ask are limits set correctly?)
motion moves ok
question is motion paused while in a sub or m code ?
thanks john
The difference between using custom M codes like M100 and subroutines is you can do things outside of LinuxCNC with the custom M codes and subroutines are for doing normal things you do with G code it just adds logic and looping and variables to the G code.
For the pump control I'd use classicladder as it has easy to use timers.
John
Please Log in or Create an account to join the conversation.
27 Oct 2012 03:49 #25855
by andypugh
Replied by andypugh on topic Re:twin headed hydro punch how to cnc
This reminds me of the Optimal Golomb Ruler problem (though it is easier)
en.wikipedia.org/wiki/OGR
What form is your input data in?
en.wikipedia.org/wiki/OGR
What form is your input data in?
Please Log in or Create an account to join the conversation.
27 Oct 2012 03:55 #25856
by jd896
Replied by jd896 on topic Re:twin headed hydro punch how to cnc
ideally it would be just text boxes as john mentioned above distance to first hole then the hole centres and how many then distance to second set of holes centres and number of holes
wow that reference andy never even heard of such a thing, love it
wow that reference andy never even heard of such a thing, love it
Please Log in or Create an account to join the conversation.
27 Oct 2012 04:00 - 27 Oct 2012 04:03 #25857
by jd896
ah oword then beacuse it would only need logic and timings
also my thinking was to have classic ladder waiting for the punch command to signal and then fire up the pump for the punch required and then timeout to turn the pump back off if not requested again within so many mins
also wanted to use classic to run some tooling lubrication aswell eg - fire a some oil misted air at the punches after x number of holes the next time the punch it at the top of stroke
Replied by jd896 on topic Re:twin headed hydro punch how to cnc
The difference between using custom M codes like M100 and subroutines is you can do things outside of LinuxCNC with the custom M codes and subroutines are for doing normal things you do with G code it just adds logic and looping and variables to the G code.
For the pump control I'd use classicladder as it has easy to use timers.
John
ah oword then beacuse it would only need logic and timings
also my thinking was to have classic ladder waiting for the punch command to signal and then fire up the pump for the punch required and then timeout to turn the pump back off if not requested again within so many mins
also wanted to use classic to run some tooling lubrication aswell eg - fire a some oil misted air at the punches after x number of holes the next time the punch it at the top of stroke
Last edit: 27 Oct 2012 04:03 by jd896.
Please Log in or Create an account to join the conversation.
27 Oct 2012 20:26 #25885
by BigJohnT
Replied by BigJohnT on topic Re:twin headed hydro punch how to cnc
If you want the pump on when you start punching a beam you could link it to halui.program.running (I think that is correct) so when a program starts it starts the pump then waits for an input that the pump is ready then start running your G code.
John
John
Please Log in or Create an account to join the conversation.
28 Oct 2012 04:49 #25911
by jd896
Replied by jd896 on topic Re:twin headed hydro punch how to cnc
can inputs be watched directly in subroutines eg not just digital inputs and if so would there have to be any hal linking involved or can you just call for any gpio and wait for the input to rise/fall as needed ?
also for machine setting could i retain manual foot control of the punches selectable through linuxcnc eg have i switch to select auto control or punch 1 or punch 2 and both for testing and adjusting of the machine centres perpendicular to the x axis
would this be more stable in ladder maybe also this would only be used when there isnt a program running so would it have too be in ladder ?
but obviously simpler because there's no need to watch inputs
also for machine setting could i retain manual foot control of the punches selectable through linuxcnc eg have i switch to select auto control or punch 1 or punch 2 and both for testing and adjusting of the machine centres perpendicular to the x axis
would this be more stable in ladder maybe also this would only be used when there isnt a program running so would it have too be in ladder ?
but obviously simpler because there's no need to watch inputs
Please Log in or Create an account to join the conversation.
28 Oct 2012 18:55 #25935
by BigJohnT
Replied by BigJohnT on topic Re:twin headed hydro punch how to cnc
Subroutines can only see what is available to g code ie M62-M68. M66 is wait on input. All the M I/O must be "connected" in HAL to the I/O pin you wish to use.
linuxcnc.org/docs/html/gcode/m-code.html
A selector switch could be used and you will have to sort out turning on the pump in manual mode.
Just to recap a bit for my understanding... the subroutines are moving the beam with G code and finding the ends as needed with the probe input, the actual punching can be done with M100 user defined codes and the G code program waits for the M100 to complete before the next line. So you define M101 for punch #1 and M102 for punch #2.
So a simplified example subroutine might resemble...
#<num-holes> = 5
#<hole-distance> = 600
#<first-hole> = 257
G0 X#<first-hole>
#<current-x> = #<first-hole>
o100 repeat [#<num-holes>]
M101
#<current-x> = #<current-x> + #<hole-distance>
G0 X#<current-x>
o103 endrepeat
John
linuxcnc.org/docs/html/gcode/m-code.html
A selector switch could be used and you will have to sort out turning on the pump in manual mode.
Just to recap a bit for my understanding... the subroutines are moving the beam with G code and finding the ends as needed with the probe input, the actual punching can be done with M100 user defined codes and the G code program waits for the M100 to complete before the next line. So you define M101 for punch #1 and M102 for punch #2.
So a simplified example subroutine might resemble...
#<num-holes> = 5
#<hole-distance> = 600
#<first-hole> = 257
G0 X#<first-hole>
#<current-x> = #<first-hole>
o100 repeat [#<num-holes>]
M101
#<current-x> = #<current-x> + #<hole-distance>
G0 X#<current-x>
o103 endrepeat
John
Please Log in or Create an account to join the conversation.
30 Oct 2012 19:59 #26058
by jd896
Replied by jd896 on topic Re:twin headed hydro punch how to cnc
Thinking about the two drives thing and being able to rewrite Hal on the fly and such could I have switches on the drive mechanisms to sense a beam and rewire Hal to enable and use the drive possibly change into gantry mode when both drives are enabled
Is this possible mid program I'm just thinking if it can be automatic then it's one less thing to program into the gcode
Thanks john
Is this possible mid program I'm just thinking if it can be automatic then it's one less thing to program into the gcode
Thanks john
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.091 seconds