![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Bending, Forging,Extrusion... Discuss Bending, Forging, Extrusion technique's here. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am almost done making my tube bender. The last part that I have to complete is the CNC control. I have a Vickers directional control valve that is currently controlled by a foot switch. I am buying a breakout board and a relay board from CNC4PC.com to control the valve. I have programming experience in Visual Basic, but know nothing of programming in Mach 3. I know this is a general question, but how difficult would it be to program Mach 3 to send a 5v signal to a pin? This pin would then energize a relay, which energizes a coil and causes the cylinder to extend? I would want it to send power to that pin until a specified position is reached. This will be determined by user input. Die position will be read from a rotary encoder. Lastly, I would like Mach3 to send 5v to another relay (my relay board has two relays on it) to energize the opposite coil, causing the cylinder to retract. I would like two fields in Mach3: one for degrees of bend and one for spring back. I would like to hit enter and have the PC control the valve. Is this something most easily achieved with Mach3? |
|
#2
| |||
| |||
Use m03 to start the movement and m04 to cause it to retract. M05 to turn both of these off. You will set up which pin does what under the ports and pins page. This is why you bought the breakout board. Mach3 doesn't read encoders directly, but some of the motion control boards do. The more knowledgable amongst us will help out here. Here is the edit. As long as the speed of the bender is not stupid fast, you could possibly hook the a and b from the encoder to 2 inputs and then count these inputs until they get to the right amount and then sent it back the other way. You could even hardwire a switch from the breakout board to a control box and not even need to use a keyboard. You would set this input to activate the cycle start. It would be very possible to reduce the keys needed to just a few and use keygrabber to work with a number pad only. You would also want to check the box under the general set up tab to have it rewind the gcode when it is at the end of cycle. This way it is always ready to go. The hard parts are going to get the readngs from the encoder in to mach3 and to be able to get it to handle the changes in angles. If you can break it down to a half dozen angles and then select them from a list it might make it easier Depending on your budget, you just might be better off buying an inexpensive plc and touchpanel. I would just make sure that the plc in question can take encoder inputs. If so the writing of the ladder logic wouldn't be tough. The operator enters the desired value on the screen and it gets entered into a register. Hit start. The 1st valve opens until the encoder counts agree with the register value and then the other valve opens until it hits a return limit switch then it stops. All ready to go again. If you wanted really basic, you could just use some wheels with numbers to write directly to the registers, I can't remember what they are called. No computer or display needed. Mike
__________________ Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out. |
|
#3
| |||
| |||
| I would appreciate it if anyone could lead me in the right direction regarding motion control boards that can read rotary encoders. I am stuck on using a PC. I just built one and am very close to purchasing Mach3. I like the idea of hooking my tube bender to my wireless network and doing the programming from my laptop on my couch. I have absolutely no clue about G-Code. What do you mean when you say m03, m04, etc. Is that the designation that Mach3 uses to refer to pin numbers? Thanks for your help, I greatly appreciate it. Brenton I like your idea about using two inputs from the encoder, counting them with the computer, then sending a stop signal once the number of counts is correct. I will investigate the logic behind this if I can't find a board that can receieve rotary encoder input. |
|
#4
| |||
| |||
http://www.machsupport.com/downloads.php Install it on a computer and start the program. On the first page of the program, bottom left is a button labeld g codes and one labeled m codes. Click them and see what all the fun is. They will give you a basic rundown of the gcodes involved. G and M codes are text files that are read by an interpreter in the program itself. The are easily edited in notepad or other basic editor. You don't want fancy formating to mess things up. M03 is the code to turn the spindle clockwise and M04 is ccw. M05 is to shut the spindle down or in you case cut input to both valves. http://www.machsupport.com/videos/ Go here and watch a few of the begining vidoes with an adult beverage in one hand and some nice homemade pizza in the other. I find it slows me down enough to watch videos. http://www.machsupport.com/downloads.php Go here and read the documents. Even thought they are a little old they are still very good to get you going. I just used them to get my bridgeport going with analog servo amps and I will be integrating the 24 position tool changer this winter. Thinking out loud here. If you use a 500 ppr encoder in quad it will give you 2000 counts per revolution. Since your tubing bender will only turn about 3/4 of a revolution in 20 secs, your counting speed should be well within the capabilities of the pport and will save you real money. I would try to get an encoder that is a multiple of 360. That way you get and even number of encoder counts per degree. Makes it easier to figure out where you are. It might be possible to use an encoder with an index pulse and have the index pulse act as a home. I think it is very doable. Learning Mach3 will open the way for the milling machine and lathe in your future. When you are all done let me know if you have any other questions. Mike
__________________ Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out. |
|
#5
| ||||
| ||||
| I built a similar system using a Galil Card, these are motion cards that will output a ±10vdc analogue (or stepper-signal) with encoder feedback. I used a simple off the shelf National Linear IC to output the analogue drive to control the directional servo valve. The cards I buy are the legacy DMC-1000 series off ebay usually get these for cheap, especially if you only need one axis. If you wanted to make up a VB interface instead of using native commands they have a VB library. I also have a DOS based program that operator screens can be made up in minutes, if interested. The beauty of these cards is you a have a closed loop system. For this type of application you do not really need G/M codes. just bend information. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
| Sponsored Links |
|
#6
| |||
| |||
| There is already a great deal of information here, thanks a lot guys! Al - Why would I benefit from getting a Galil card, even if it is cheap, when I can buy Mach3 for $140 and a breakout board with a relay board for $50? It seems as though Mach3 would be easier. Correct me if I am wrong. It just hit me that the power from the Parallel port will be sent as DC, correct? If this is correct then I must have a way to convert to AC. The power in from the Relay will need to be 120V AC. |
|
#7
| |||
| |||
__________________ Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out. |
|
#8
| ||||
| ||||
| You can drive a relay or SSR direct from the parallel port with a 2n7000, a search here will bring many results. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#9
| ||||
| ||||
| 1 Axis Galil Card $50.00 Ebay. DOS Operator interface Key $200.00 ISA bus PC $20.00, (re-cycler). I encoder $50.00 ebay NOS 1 National Semi $7.00 Servo valve drive. Power supplies. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#10
| |||
| |||
| Excuse my limited knowledge on electricity, but won't a PC output DC? Can a relay receive 5V DC, but have 120V AC contacts? That doesn't sound right! Al, I will definitely have a look at your ideas. I am rather stuck on the breakout board/relay board even though it may cost more. I have a Bridgeport Series II Prototrak mill. The mill was in a fire. Most of the Prototrak electronics are fried (pieces of burning insulation fell from the wood ceiling) but the mill is in great shape. Once the tube bender is complete, I will be working on replacing the burnt servo motors with stepper motors. I want to use the same system (breakout board, Mach3, etc) as my tube bender. If I can become familiar with that setup on my tube bender, the mill will be easier. |
| Sponsored Links |
|
#11
| ||||
| ||||
| See post #3 for one of the posts I meant for 2n7000 drive. http://www.cnczone.com/forums/showth...ghlight=2n7000 Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#12
| |||
| |||
Do a search on ebay and you will see a fine selection. If you bought a breakout board and a relay board from a cnc supplier, such as candcnc or cnc4pc or one of the others that advertise here, you just might have what you need sitting on your desk. Let us know what you have or will purchase. Take a look at my retrofit log here. http://www.cnczone.com/forums/showthread.php?t=66994 for ideas on how to do something like what you are planning on doing to your bridgeport. Mike
__________________ Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does Anyone Have Old Pines #4 Tube Bender For Sale? | morribi | Bending, Forging,Extrusion... | 1 | 10-02-2008 04:57 PM |
| Leonard tube bender collet | lazerracing | Bending, Forging,Extrusion... | 0 | 12-16-2007 07:37 PM |
| DIY Tube Bender | Sperstad | Bending, Forging,Extrusion... | 1 | 10-11-2007 08:13 AM |
| Tube bender controller | PSIman | General Electronics Discussion | 2 | 01-18-2006 03:07 AM |
| Help Building Tube bender | Fabric8r | General Electronics Discussion | 1 | 10-09-2004 12:45 AM |