Cut Rifling Machine Help

More
11 Aug 2021 14:49 #217551 by SPC89
Replied by SPC89 on topic Cut Rifling Machine Help
Few Pictures of the machine being built 

   

 

 

Attachments:
The following user(s) said Thank You: phillc54, tommylight, anfänger

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

More
15 Aug 2021 14:50 #217816 by andypugh
Replied by andypugh on topic Cut Rifling Machine Help

Taking very small steps tbh. I cant stress enough how new I am to this again. Just started learning how to make buttons in Glade and connecting them up through Hal Config. 

For your application it is probably worth noting the info hidden in section7.6
This can be used to pass values to a G-code subroutine.

As a concrete example, I have a GUI which has an "action button" which contains the command:
O<turning> call [${turn.x-f}] [${turn.sf-f}] [${turn.cut-f}] [${turn.feed-f}] [${turn.z-f}] [${turn.rad-f}] [${turn.angle-f}] [${turn.tool-s}]

This calls a G-code programme, passing the values of various Glade "HAL_Spinbutton" controls to the G-code as paramenters #1, #3 etc.
O<turning> sub

; #1 finish diameter
; #2 speed
; #3 depth of cut
; #4 feed/rpm
; #5 finish length
; #6 radius
; #7 angle
; #8 tool number

I think that this is how I would configure your rifling machine, with a G-code subroutine that cuts rifling according to the parameters passed in (such as length, lead, number of grooves etc)

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

More
18 Aug 2021 07:06 - 18 Aug 2021 08:44 #218044 by SPC89
Replied by SPC89 on topic Cut Rifling Machine Help
This is the basic G code program that I've sort of come up with that makes it move roughly to how we want, with the variables listed like you said.
G21 G90 G40

#201=482.0 (BARREL LENTH)
#202=203.2 (TWIST RATE)
#203=25.0 (ADDITIONAL LENTH)
#204=1.0 (RAISE HEIGHT)
#205=2  (NUMBER OF CYCLES)

#105=[360/#202]  (DEG PER MM)
#106=[#201+#203+#203] (FINAL LENGTH)
#107=[#106*#105]  (FINAL TWIST)

O100 DO

G0 Z-25.0 X0 (FIRST POSITION)

G1 Z#106 X#107 F600.00 (FIRST CUT)

G1 Z-25.0 X0.0 (FIRST RETURN)

G0 X90.0  (ROTATE 90 FOR SECOND CUT)

G1 Z#106 X[#107+90] F6000. (SECOND  CUT)

G1 Z-25.0 X90 (SECOND RETURN RETURN)

G0 x180.0 (ROTATE 90 FOR THIRD CUT)

G1 Z#106 X[#107+180] F6000. (THIRD CUT)

G1 Z-25.0 X180 (THIRD RETURN)

G0 x270.0 (ROTATE 90 FOR FORTH CUT)

G1 Z#106 X[#107+270.0] F6000. (FORTH CUT)

G1 Z-25.0 X270.0 (FORTH RETURN)

G0 x0 (ROTATE 90 FOR FIRST CUT)

G91
G1 Y#204
G90

#205=[#205-1]
O100 WHILE[#205 GT 0]

M30


We have tried this and technically it will rifle something but I'm not too sure how consistent the rotation axis of the tool is locked in with the carriage travel along the barrel. Plus setting the tool zero on the barrel points is not easy as such.  
Last edit: 18 Aug 2021 08:44 by andypugh.

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

More
18 Aug 2021 08:57 #218051 by andypugh
Replied by andypugh on topic Cut Rifling Machine Help
The X and Z axes should move exactly in synch, that's pretty much the first requirement for a CNC machine.

Personally I would have configured the axes as X and A or maybe Z and C, but that has no bearing on basic functions. Though in either case there is some question about feed-rate calculations. It is probably better to use inverse-time feed rate and calculate a cycle time based purely on barrel length. But that is a detail for later.

For maintainability it might be good to switch internally to named parameters:
#<B_LENGTH>
for example.

If calling the routine from an action button in the GUI the numbers come in on #1, #2 etc. It's probably best to load the internal parameters from those immediately. Though there is the option for the routine to "pull" the values rather than have them "pushed"
#<B_LENGTH> = #<_hal[rifling-gui.barrel-length-f]>
(Assuming that the Glade GUI is called "rifling-gui" and has a HAL spinbox called "barrel-length")

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

More
19 Aug 2021 07:15 #218118 by SPC89
Replied by SPC89 on topic Cut Rifling Machine Help
Yes, I was thinking of renaming the axis for ease of understanding but only quickly wrote out the program just to get basics going. It will be refined as the project proceeds and really this is just proof of concept first. Tbh i've been talking to some senior programmers here and they recon we can minimize the program even further with a few "if" "GOTO" and "while statements, if Linux CNC can run them ? However, that is getting beyond me with my G code knowledge so will see. 

Agree as well, deff start to name the parameters for what they represent and guessing like you said, be simpler to connect them up to the GUI. Still got loads to learn there. 

Plan of attack is to get the program running well and fairly refined to the finished article and then try and connect the parameters to a GUI.

Also got to try and put a pause button in the program to stop the machine at a very specific point to use a dia-test gauge to measure the depth of rifling and then a resume button to continue on from where it is. 

On a separate note i have wrote down a flo chart, as such, for my self to understand how i want the machine to operate and be a sort of instructions guide for new users. Ill post it on here when i have a chance.      

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

More
19 Aug 2021 17:29 #218164 by andypugh
Replied by andypugh on topic Cut Rifling Machine Help

i've been talking to some senior programmers here and they recon we can minimize the program even further with a few "if" "GOTO" and "while statements, if Linux CNC can run them ?


Yes: linuxcnc.org/docs/2.8/html/gcode/o-code.html

Also got to try and put a pause button in the program to stop the machine at a very specific point to use a dia-test gauge to measure the depth of rifling and then a resume button to continue on from where it is.


That sounds like a job for the M0 code: linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m0-m1

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

More
19 Aug 2021 20:29 #218178 by fc60
Replied by fc60 on topic Cut Rifling Machine Help
Greetings,

Back to the machining process...

Is this a "cut" rifling process? Not a button rifling?

If cut, does it have multiple teeth to cut the depth in one pass?

Does it cut all the grooves in one pass; or, one at a time?

If single groove cut, how is the cutter returned to the beginning of the part?

This project is most interesting to me and I have been following it closely.

Cheers,

Dave

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

More
20 Aug 2021 08:31 #218219 by SPC89
Replied by SPC89 on topic Cut Rifling Machine Help
Thanks, the links are a great help. See what i can come up with.

Yes it is a cutting process. The tool is removing about 0.0001 every pass it makes. Once it has done a cycle of grooves say 4 it then gets raised by a mechanism that rotates a screw in the tool that pushes on a wedge that raises the cutter up. 

A rifling button doesn't cut it swages the metal to the right shape. Puts alot of stress in the metal so we heat treat it afterwards. 

below is a cut rifling tool we use on our machines. A piece of carbide is used to do the cutting work and ground up with correct angles for any given twist as such.  

 

 
Attachments:

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

More
20 Aug 2021 08:44 #218223 by SPC89
Replied by SPC89 on topic Cut Rifling Machine Help
For a bit more context here is a video of an cnc rifling machine made by Bartlien Barrels.

They make excellent barrels blanks!!!!!!

  Bartlein Barrels Rifling Machine - YouTube

 

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

More
20 Aug 2021 09:29 #218227 by andypugh
Replied by andypugh on topic Cut Rifling Machine Help

Yes it is a cutting process. The tool is removing about 0.0001 every pass it makes. Once it has done a cycle of grooves say 4 it then gets raised by a mechanism that rotates a screw in the tool that pushes on a wedge that raises the cutter up. 
 

The video seems to indicate that the tool is engaged with a separate mechanism that tweaks the screw to add feed.

It would also be possible to have a motor coaxial with the indexing / rotating motor permanently engaged with the adjusting scew. The secret to making that work would be CNC, you would rotate both motors the same amount to index and twist, and then only move one to feed. 

But simply engaging with a fixed "tweaker" isn't a bad solution. 

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

Time to create page: 0.355 seconds
Powered by Kunena Forum