Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: ostie01 on May 07, 2015, 01:50:56 AM
-
I bought a manual cold saw this year that I've updated with a ball screw feeder and an electric cylinder made also with a ball screw.
Work OK for now but will need some help to program the feeder, feeder have about 30in of travel with limit switches at both end.
There is a pneumatic vice on the feeder and on the saw.
I've added 4 buttons on the screen, Open and close feeder vise and 2 others for the saw vice.
Both vises can also be actuated with 4 macros for programming, M200, 201, 202 and 203.
What I would like to achieve, is when the feeder is near the limit switch, would return at the starting point and continue feeding the stock.
Will update this thread with pictures, camera still in the shop and I'm at home right now.
Jeff
-
it would be good to see picks sounds interesting
-
Hi Jeff,
I'm anxious to monitor the progress of your project as well.
I recently finished something very similar .... with the help of the fine folks on this forum. :)
We used a macro to divide the full available stroke of the feeder by the feed length of the individual part, then retract the feeder for the maximum number of cuts allowable per full stroke. Then, feed-cut, feed-cut, feed-cut ..... till the end, then repeat.
REALLY saved a lot of time while not allowing the feeder to move while actually cutting.
Can easily hold the finished cut lengths to less than +/- .0008"
Keep us in the update loop.
Regards,
Russ
:)
-
Russ did a great job on his saw.
http://www.machsupport.com/forum/index.php/topic,21871.0.html
(;-)TP
-
PICS
-
More Pics
-
More Pics
-
More Pics
-
More Pics
-
Another one
I'm not very good at VB program, I can do simple things but, when it comes to something like that, I'm completely lost.
I can program it to cut parts easily but, it's very time consuming and not very productive.
Thanks for your replies.
Jeff
-
Oppppsssss, sorry for the way too large pictures
Jeff
-
Looks like you have all the basics covered what is it that you need help with ?
(;-) TP
-
Thanks for the reply.
I really don't know where to start, VB, Brain or MacroPump.
I don't know if I should try to place codes in my program to monitor what has been cut and what is still available as of material in the feeder.
Z axis is for the feeder and the A axis is for the saw head, I do not program the saw head as a rotational axis, just regular depth of cut.
Should I use the Z move as a variable and add each Z move and store it in a UserDro and when this value is equal to 30in (feeder length),return the feeder to home position?
This sound easy but what if remaining stock is only 15in ?
I also have to add another home switch (adjustable) for the saw head as a safety, just to be sure the feeder would not feed the stock if the blade is down (missed step)
Have to monitor that feature also.
Thanks for any help.
Jeff
-
What you need is to develop a paramateric Gcode SUB program file to do the actual cutting. On your screen make a place for some DROs to hold the cutting variables. such as Stock Diameter, Length of parts, Number of parts.
As to the Stock length you put an EYE in the moveable vise so that when it is moving to the next cut length and the eye does NOT see the stock then it auto stops with a message "OUT OF STOCK".
The loops through the sub sets up your parts counter.
The fedder runs the stock UP until it hits the limit then moves back to the start of travel point and resets the length to how far it already moved PLUS the travel length. Then it resumes the feed to the required stock length.
SOUNDs a lot more difficult than it is.
The real trick is the parametric sub program and a few macros to control the feeder.
(;-) TP
-
Hi Jeff :)
This is how mine worked.
The feeder had 2 limit switches, the one near the saw doubled as a home switch (typical).
There was a sensor#1 in the traveling feeder vise (I called them clamps) and another stationary one (#2) at the full retract position of the feeder slide.
Once the operator entered the part length and the kerf (along with the feeds and speeds) do a cycle start.
Our material was 24' long and we cut the entire stick ..... and many of them for a given part length.
With material loaded, and sensor 2 made, the feeder would retract (via math in the macro) to the greatest number of incremental feeds for the full stroke of the feeder, clamp and feed incrementally until at "0". Then, if #2 is still made, repeat ... until the material clears sensor #2, at which time the feeder only retracts ONE length increment and continues in this fashion until sensor #1 goes clear, which ends the cycle with the entire stick consumed.
It worked exceptionally well but I have since modified it to be a bit less complex. It now uses a PLC, small Text panel for an HMI and Indexing servo drives.
TP and Ger21 helped tremendously. I could not have done it without them .... for sure.
The original used macros, a brain and a small PLC. Also used the CSMIO-M but it was too slow at 100kh.
I'll find the macros and screen for ya if you'd like.
Russ
-
Jeff, I meant to compliment you and say that you've done some beautiful work there ! (finally got a few of the pics loaded).
Real classy. A1 craftsman, you are.
Thanks for posting.
Regards,
Russ
:)
-
You guys both did a nice job on your saws. However firing up a pc to cut a piece of metal just seems over the top to me. I have Mach 3 running my homebuilt Cnc which of course needs coordinated motion. However I've already had PC problems that I had to deal with. Contrast that with all the machines I built using PLCs that have been running for 15 years or more without ever being shut off. In a very short time a PLC will be shown to be an easier and cheaper solution for a saw. Just because you can doesn't mean you should.
-
................ firing up a pc to cut a piece of metal just seems over the top to me.
Hi Gary, I eventually came to that conclusion as well. But, at first I was sort of experimenting with Mach and the materials I had on hand.
Also, this saw runs continuously for a 12 hr shift. We cut 3500+ lbs of .125" OD tubing per week. (just one of many sizes).
Yep, a small PLC, HMI and drives all on rs485 is the bees knees. :)
It was an fun project and I'm sure Jeff will enjoy his adventure as well.
Russ
:)
-
I'm doing a 7500 gallon per day waste treatment system right now. Two blowers, 3 pumps, 5 VFDs, 11 motorized valves, 4 solenoid valves, 3 flow meters, 3 analytical instruments, 3 float switches, two level transmitters, 3 capactive proximity sensors, a PLC, HMI, and a cell modem. Will run 24/7 for many years. It turns sewage into crystal clear almost drinking water!
-
OK, I've done my homework.
Here's the screen I have modified for the saw.
Sub Main ()
SawKerf=GetUserDRO(1003)
If SawKerf=0 Then
Message("Saw Kerf can't = 0")
Exit Sub
End If
MaterialLength=GetUserDRO(1004)
If MaterialLength=0 Then
Message("Material Length can't = 0")
Exit Sub
End If
SawRPM=GetUserDRO(1005)
If SawRPM=0 Then
Message("Saw RPM can't = 0")
Exit Sub
End If
SawFeed = GetUserDRO(1006)
If SawFeed = 0 Then
Message("Feed can't = 0")
Exit Sub
End If
StartCutHeight=GetUserDRO(1010)
If StartCutHeight=0 Then
Message("Start Cutting height can't = 0")
Exit Sub
End If
EndCutHeight=GetUserDRO(1011)
If EndCutHeight=0 Then
Message("End cutting height can't = 0")
Exit Sub
End If
'************************************
LengthOfPart=GetUserDRO(1001)
If LengthOfPart=0 Then
Message("Length of Part can't = 0")
Exit Sub
End If
NumberOfParts=GetUserDRO(1002)
If NumberOfParts=0 Then
Message("Number of Parts can't = 0")
Exit Sub
End If
If MaterialLength<((SawKerf*NumberOfParts)+(LengthOfPart*NumberOfParts)) Then
Message("Material length is not long enough for the number of parts")
Exit Sub
End If
SetUserDRO(1009,0)
p=GetUserDRO(1009)
'***New File
OpenTeachFile "EqualCut.tap"
Code "(EqualCut.tap)"
Code "G20 G50 G64 G90 G94"
If GetUserLED(1006) Then
ActivateSignal(OUTPUT2)
End If
Code "G4 P0.5"
Code "M3 S" & SawRPM
If p=0 Then
Code " M200 ( Close Feeder Clamp ) " 'Close Feeder Clamp
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) " 'Open Saw Clamp
If GetUserLED(1001) then
Code "M8"
End If
Code "G00 Z " & LengthOfPart
Code " M202 ( Close Feeded Clamp ) " ' Close Feeder Clamp
Code "G01 A " & EndCutHeight & " F " & SawFeed
SetUserDRO(1009,1)
End If
NewZ=LengthOfPart+SawKerf
p=GetUserDRO(1009)
If p>0 Then
For i=0 To (NumberOfParts-1)
NewZ=(NewZ+LengthOfPart+SawKerf)
' Code " M200 ( Close Feeder Clamp ) ' Close Feeder Clamp
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) " ' Open Sawlamp
Code "G00 Z " & (NewZ+SawKerf)
Code " M202 ( Close Saw Clamp ) " ' Close Saw Clamp
Code "G01 A " & EndCutHeight & " F " & SawFeed
Code " M210 ( Counter Increment ) "
Next i
Code "G00 A " & StartCutHeight
'SetUserDRO(1009,0)
End If
Code "G00 A0 "
Code "M30 "
CloseTeachFile
Call LoadTeachFile()
'****Exit Wizard back to mach
Call LoadStandardLayout()
End Sub
The Stock feeder is 32in long (travel). What I would like to add to my macro is,
If the next part to cut is longer than the distance from the feeder vise to the end travel switch, then open saw vise, return the feeder vise to zero (start), close saw vise
and resume the cutting process.
By the way, this macro is one I found on this forum and modified to fit my needs.
Thanks for any help, Jeff
-
ARE you open to suggestions ;D
Just a thought, (;-) TP
-
ARE you open to suggestions ;D
Just a thought, (;-) TP
Sure I am, even if it's coming from you ;D ;)
I am a member here for quite some time and I know what you can do, surprise me every time.
Jeff
-
Consider this. What you are doing is a very repetitive task. Raise the saw push the stock lower the saw. Repeat a number of times.
This is the perfect situation for a simple SUB program with #vars to drive the cut lengths. That way it is completely programable on the fly.
The number of SUB loops equals the number of parts to cut.
To load the SUB code on startup you can use a MCODE in the init string to load the cutting program on startup of Mach3
Is the RPM adjustable on the saw ?? IF not why the value ?
Instead of trying to calculate all the cut lengths and worrying about the over/under run of the stock feeder simple program the infeed of the stock to the Cut length each time. For example make a cut then push the stock the proper distance lock it up and cut. WHILE it is cutting have the feeder Retract the proper amount and be ready to Push the stock the proper distance. Cut then repeat. Don't try to calculate the number of cuts in the 30" travel you have just use the distance of the part length each time it cycles. That way the machine will CUT until it runs out of stock OR the end of the number of SUB cycles you programed(number of parts) is UP and it stops.
IF you are off the length of cut values all you need to do is edit the length value and press an update button and the #vars will be updated and the next cut cycle will cut to the new values. Easy QC on the cut lengths.
IF you have a lot of different parts to do consider USING the tool table to store the cut values in. This gives you 254 different programs you can run and NOT have to hand enter the values each time.
You can have it both ways enter the values for custom setups by hand on screen OR call the tool number and have it update automatically. IF you have a number of different cuts to make on the same stock you can STACK up the jobs by Tool # and it will change its setup on the fly. AND run until it runs OUT of material. IF it does and there is still MORE to cut replace the stock and restart the cutting sequence. IT can remember where it is in the SUB loop and continue on cutting.
ALL you need for switches is a home for the saw at the beginning of stroke (saw DOWN on the table = 0.000) and the stock empty switch( eye) for the end of stock.
and a home switch for the feeder. Feeder home is with the feeder closest to the saw blade . That makes all values positve for the saw feed AND the stock feed.
ALSO run it ALL in Incremental mode. That way VALUES do not accumilate and do not have to be divided. Easy peasy.
One other thought is to add G04 P0's in the Gcode mix. THAT WAY there is never any mulitple moves in the Que so Mach3 pretty much is in realtime mode. ANY update will happen on the very next cycle.
Just a thought, (;-) TP
-
Thanks for the reply.
I thought is was impossible with mach to drive the A and Z axis at the same time using different feed. The moves must be synchronize.
I cut a lot of 1/4, 3/8 and 3/4 stainless tube, many are about 1in long ( 0.818 to 0.968).
I'm worry about wear if the feeder would always move about 1in and then retract 1in and move again 1in.
I never done any programing with variables but I worked on CNC for the last 40 years, I own a Haas CNC mill now that I'm working from my garage.
Again, thanks to take the time to reply, appreciate a lot.
Jeff
For the RPM, it was already in the macro and I want (in a near future) , replace the 2.5HP single phase with a 3 ph motor and a VFD.
Jeff
-
I'm worry about wear if the feeder would always move about 1in and then retract 1in and move again 1in.
This is the main reason that I also chose to do the math and do a full retract of the feeder, to wear the ballscrew more evenly.
The other reason was to allow all axis feeds and speeds to be independent of one another.
-
Also, I never wanted to be sawing while any clamp was moving as in order to optimize the chipload, all available clamps had to be holding the (round) material to prevent any rotation/slippage during the cut. Some of the product is quite delicate and benefits from as many surfaces clamped as possible.
Russ
-
The macro that I modified work for me, it output the program I need, one thing I would need to add is another kind of loop that would monitor how
much material as been cut and if it is greater to 30in, open saw vise and return feeder to zero, close feeder clamp and resume cutting.
The loop would still monitor the material being cut and when total is now 60in, do the same open saw clamp, return feeder to zero and resume cutting again until it is out out material.
All I need to know is where to place this loop in the macro, probably just before the next i or something like that
Thanks again for your replies, really appreciated.
Jeff
-
As long as it works for you is all that matters (;-).
Different strokes for different folks, (;-) TP
-
As long as it works for you is all that matters (;-).
Different strokes for different folks, (;-) TP
Hope I did not wrote something that have insulted you.
If yes, I'm really sorry, that is absolutely not something I wanted to do.
Jeff
-
NO , I got the HUMOR ;D .
Notta problem , (;-) TP
-
NO , I got the HUMOR ;D .
Notta problem , (;-) TP
Great, happy to know that.
Jeff
-
DID you get the feeder loop working as you wanted?
(;-) TP
-
Not yet, still working on it when I have time.
The macro I have modified work ok for now, it output the program I want but I limit the number of parts to no
more than the feeder travel.
Tonight, I had 150 small mech tubing to cut but they were only 0.250 in length so I cut one lot of 90 and one lot of 60.
For that kind of job it`s great but I also have a lot of 3/8 stainless tubing at 12 3/16 in length so I will be limited to 2 strokes of the feeder, 3 is more than
the total feeder travel.
So for the material monitoring, I don't know where to begin.
Thanks for asking, Jeff
-
I wold start by adding several new DROs to the main run page.
Part Length
Feeder length
Stock Length
Intermediant Lenth
The Part length ( Pl) is obvious
The Feeder Length(Fl) is the Length left inside the feeder loop
The stock Length(Sl) is the total available to cut length of the stock
The intermediant length (Il) is a holder for IF the part you need is longer than ONE feeder length
And you would need to make 2 or more strokes to get the full part length.
Then create a test Macro ( verbal example)
001
If Pl < Fl then
unlock Vice
Move feeder = Pl
Lock vice
FL = FL -Pl
Sl = Sl - Pi
Il = 0.000
cut
END
002
If Pl > Fl then
unlock feeder
move to full stroke(32)
lock feeder
Fl = 32
Goto 001
003
Il = 0
IF Pl > 32 then
004
unlock feeder
Move to full stroke
lock feeder
unlock vise
Feed to zero
lock vise
Il = Il + 32
Sl = Sl - Il
Unlock Feeder
Move full stroke(32)
Fl = 32
If Pl < Il then
Goto 001
Else Goto 004
NOT a perfect example as I am sure I missed something off the top of my head. You really need a screen set running to be able to SEE the interaction of the code VERSES what you want it to do.
At least that is what works well for testing for me (;-) , YOUR mileage may vary.
IF you need help just holler.
(;-) TP
-
How about a video of it working (;-)
(;-) TP
-
No problem for a video, will do it tomorrow .
I post the two main pages with all DRO's. As you said, I would still need to add some more.
This is also the macro I use, not finish because I made so much mods to it.
'CNC_SAW Post
Sub Main ()
SawKerf=GetUserDRO(1003)
If SawKerf=0 Then
Message("Saw Kerf can't = 0")
Exit Sub
End If
MaterialLength=GetUserDRO(1004)
If MaterialLength=0 Then
Message("Material Length can't = 0")
Exit Sub
End If
SawRPM=GetUserDRO(1005)
If SawRPM=0 Then
Message("Saw RPM can't = 0")
Exit Sub
End If
SawFeed = GetUserDRO(1006)
If SawFeed = 0 Then
Message("Feed can't = 0")
Exit Sub
End If
StartCutHeight=GetUserDRO(1010)
If StartCutHeight=0 Then
Message("Start Cutting height can't = 0")
Exit Sub
End If
EndCutHeight=GetUserDRO(1011)
If EndCutHeight=0 Then
Message("End cutting height can't = 0")
Exit Sub
End If
'************************************
LengthOfPart=GetUserDRO(1001)
If LengthOfPart=0 Then
Message("Length of Part can't = 0")
Exit Sub
End If
NumberOfParts=GetUserDRO(1002)
If NumberOfParts=0 Then
Message("Number of Parts can't = 0")
Exit Sub
End If
If MaterialLength<((SawKerf*NumberOfParts)+(LengthOfPart*NumberOfParts)) Then
Message("Material length is not long enough for the number of parts")
Exit Sub
End If
SetUserDRO(1009,0)
p=GetUserDRO(1009)
'***New File
OpenTeachFile "cnc_saw.tap"
Code "(cnc_saw.tap)"
Code "G20 G50 G64 G90 G94"
If GetUserLED(1006) Then
ActivateSignal(OUTPUT2)
End If
Code "G4 P0.2"
Code "M3 S" & SawRPM
If p=0 Then
Code " M200 ( Close Feeder Clamp ) "
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) "
Code "M214"
If GetUserLED(1001) then
Code "M8"
End If
Code "G00 Z " & (LengthOfPart+sawKerf)
Code " M211 "
Code " M213 "
Code " M202 ( Close Feeded Clamp ) "
Code "G01 A " & EndCutHeight & " F " & SawFeed
SetUserDRO(1009,1)
End If
NewZ=LengthOfPart+SawKerf
p=GetUserDRO(1009)
If p>0 Then
For i=0 To (NumberOfParts-1)
NewZ=(NewZ+LengthOfPart+SawKerf)
' Code " M200 ( Close Feeder Clamp ) '
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) "
Code " M210 ( Counter Increment ) "
Code "G00 Z " & (NewZ+SawKerf)
Code " M202 ( Close Saw Clamp ) "
Code "G01 A " & EndCutHeight & " F " & SawFeed
'Code " M210 ( Counter Increment ) "
SetUserDRO(1205,NewZ+SawKerf)
Next i
Code "G00 A " & StartCutHeight
'SetUserDRO(1009,0)
End If
Code "G00 A0 "
Code "M30 "
CloseTeachFile
Call LoadTeachFile()
'****Exit Wizard back to mach
Call LoadStandardLayout()
End Sub
Other macro are:
M200 Close Saw Clamp
M201 Open Saw Clamp
M202 Close Feeded Clamp
M203 Open Feeder Clamp
M210 Parts Counter Increment
M211 Reset a DRO
M212 reset a DRO
M213 Reset a DRO
M214 Reset a DRO
M211, 212,213,214 are for Reset MaterialCounter, PartsCounter and some others
Like I said, I'm not good at all for macro so I modify one small part and try it.
Thanks for the reply.
Jeff
-
Here's the video you asked for.
https://www.youtube.com/watch?v=21OxSDLH57o&feature=youtu.be
Jeff
-
AH Nothing like Machine ********* ;D
Thanks, (;-) TP