Hydraulic valve control with encoder

More
01 May 2015 22:16 #58298 by Poma
Very impressive! The machine looks great. I think I will get the same breakout board, but we are not going to have a linear axis. Maybe in the future someday.

I am going to have two "simulated" axes, however, just as a convenient way to keep track of the manual movements. For example, I have X,A,C configured where X and A are simulated so we can save the recipe and have the required movements on the screen for the operator to follow.

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

More
01 May 2015 22:51 #58299 by EW57
Nice build! Do you have any videos yet?

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

More
05 May 2015 05:00 - 05 May 2015 05:07 #58388 by Poma
What does it do when it reaches the commanded position? Do you also have control of the pipe clamp valve? Our machine has a manual pipe clamp and I am a little worried about the possibility of the machine destroying its self or whacking someone with a long piece of pipe when someone hits "return home" without releasing the pipe clamp first. I might need to add a switch for that.

Also, do you see any jittering when it reaches the commanded position? I wonder if there is a way to make some ladder logic to keep the valve off until someone presses "start" again. Or, is there a way to force the G-code to always read program pauses? If someone turned them off it could be disastrous.

Edit: Duh, I could use M0 between bend sequences instead of M1.
Last edit: 05 May 2015 05:07 by Poma.

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

More
12 May 2015 19:02 - 12 May 2015 19:08 #58596 by adoyle88
The way I got it all to work might not be the most elegant way of doing things, but it does work. Here is a snippet with comments explaining how my G code works. The bender computer doesn't have internet access at the moment so I'll have to get the files off of there later.

; use M7 (coolant on command) to close latch
M7

; dwell for 5 seconds while the latch closes
G4 P5

Then I use the following commands to complete the bend (90 degrees in this example):

; rapid motion for 90 degrees. The computer thinks it is moving a servo so it calculates speed using PID. My HAL file just looks at the sign of the velocity the machine is trying to move the A axis (+ or -) and trigger the hydraulic switch until the velocity is 0 again.
G0 A90

; use M3 to set spindle on
M3 S1

; M1 optional pause (when spindle is on, the A axis arriving in its location will trigger cycle start to restart the program at the following line)
M1

; after A axis finishes moving, cycle start is triggered, then spindle is set to off
M5

; unlatch, pause during unlatching
M9
G4 P5

; feed X and repeat
G1 X20 F250
G0 A0

Yesterday we bent a calibration piece: feed 10, bend 22.5, feed 10, bend 45, feed 10 and bend 90. Then we measured the result, plotted it on excel and used a best fit line equation to determine our deviation: degree = (target + 3.35) / 0.951. To bend 45, I would use the command G0 A51 (It is actually 50.841 but I have to round to the nearest 0.25 degree because of the resolution of the encoder).

Then we bent a frame rail for one of our kit cars. Here is a video of it: bending a frame rail . We bent up two more and they all fit into the frame welding jig. We are very happy with how the tubes came out.

The only time we got some jittering was when the hydraulic ram still had some air in it and there was no tube loaded. I have set the deadband at .5 degree and after using the ram a few times, the jittering is gone.
Last edit: 12 May 2015 19:08 by adoyle88. Reason: forgot to return A to 0

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

More
12 May 2015 19:18 #58597 by andypugh
Is it purely a single-plane bender, or do you plan to add a tube rotator to the feed carriage?

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

More
12 May 2015 19:30 - 12 May 2015 19:33 #58598 by adoyle88
It will remain single plane for a while. We designed this bender to be meet the requirements to bend up the kit car we are manufacturing. The car requires bends for 1.5 and 1.25 inch OD tubing, all on single planes. 1.5 inch gets bent with a 6.5 inch radius and 1.25 inch bends with a 4.25 inch radius.

BTW, we've been calling the feed mechanism a tractor. Carriage sounds more professional.

PS. Thanks very much for your help. You, arceye and a few others on the linuxcnc IRC were very helpful in figuring out this project.
Last edit: 12 May 2015 19:33 by adoyle88.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum