![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am building a CNC tube bender as a senior project for my BS in MET. I am using EMC2 on Ubuntu 8.04. I am using a breakout and relay board to control a 120V Vickers directional control valve. I have a 500 PPR rotary encoder. It is my wish to use the rotary encoder to track die position (0-100ish degrees). I hooked the required ports (A,B,Ground and +Vdc) to the breakout board. I would like to have a small DRO on the screen that tells me angular position in degrees. I have searched online but found nothing. I have sent EMC2 to look for pins 12 and 13 as spindle position A and spindle position B. Pins 1 and 14 are outputs that are set as Spindle CC and Spindle CCW. I have absolutely no clue what to do next. Please guide me as I am a new user to EMC2. Check out my build here if you are interested: http://cnczone.com/forums/showthread...796#post531796 |
|
#2
| |||
| |||
| Hi! You may take a look at Parallel-port Two-axis PWM servo controller for Etch CNC It uses two simple DC-Servo connected to a PWM bridge and encoders. All connected directly to the parallel port. You did not write anything about home or reference switches (and limit switches...)? Hope your design has one (at least). Without any real knowledge about tube benders (except they bend tubes...) i would mount a reference or home switch at a (slightly) negative angle (-5°) to leave some space when inserting the tubes... EDIT: The config files are there, too. So you can have a look at them. Jürgen Last edited by juergen; 11-27-2008 at 05:38 PM. |
|
#3
| ||||
| ||||
| AFAIK EMC like Mach does not input an encoder into the parallel port, you might look at wether EMC does interface a Manul Pulse Hand Wheel, this is typically a 100p/turn encoder for manual motion and adapt this routine. EMC also has the option of add-on cards for servo operation. Otherwise you would have to use the A & B pulses and write an algorithm that detects one pulse as counts and the other for direction. You may run into a timing issue, depending on how fast the parallel port was read and the encoder speed. You may not necessarily need home or limit switches as the hydraulics could simply bottom out on a stop. For home registration, you could just bottom to a stop, and when motion was zero for so many seconds, make this zero reference. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#4
| |||
| |||
| These links might help, they are related to using encoders with parallel ports in emc2: http://wiki.linuxcnc.org/cgi-bin/emc..._A_MPG_Pendant http://emergent.unpythonic.net/projects/01142347802 http://wiki.linuxcnc.org/cgi-bin/emc..._With_Encoders http://www.members.shaw.ca/swstuff/spindle-encoder.html So I guess it can be done, in any number of ways. I haven't done it myself yet, but I want to try it too. Thanks, Dan |
|
#5
| |||
| |||
| The first link with the MPG writeup seems like it will work well. I am going to try it when I get home. If I manage to get the rotary encoder hooked up, will EMC2 display a DRO displaying angular position in degrees? |
| Sponsored Links |
|
#6
| ||||
| ||||
| I built a rotary encoder for the spindle of my lathe and I am using the parallel port to read its inputs. I am only using the index and 100 count features, I never got the B channel hooked up and working. I am attaching the portion of my ".hal" file that has to do with the spindle encoder. Here is a link to my thread. The encoder starts at message 48 and continues (off and on) to message 85. Alan
__________________ http://www.alansmachineworks.com |
|
#7
| |||
| |||
| Wow, thanks for your help Alan. I probably don't need the B channel either. My rotary encoder will never rotate more than 100 degrees because my tube bender can't move past 102ish degrees. My encoder is 500PPR, so it will only ever send out 130 pulses over 15 seconds, leading to 9 pulses per second (very minimal). Your file opens in Notepad as a paragraph; everything is smashed together. Hopefully Linux will open it differently. |
|
#9
| ||||
| ||||
| Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#10
| ||||
| ||||
| If he never rotates more than 100° he should be able to just use a direction signal and count. He might even be able to use the index to set up home. Alan
__________________ http://www.alansmachineworks.com |
| Sponsored Links |
|
#11
| ||||
| ||||
| The general premise for an encoder is one channel is the count and the other the direction pulse, no? Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#12
| ||||
| ||||
Alan
__________________ http://www.alansmachineworks.com |
![]() |
| 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 |
| rotary encoder help | anslee | Linear and Rotary Motion | 0 | 11-17-2008 07:24 PM |
| EMC2, Xylotex and Sherline Rotary Table | kiwols | LinuxCNC (formerly EMC2) | 2 | 12-18-2007 12:58 PM |
| Qt20hp Turret Rotary Encoder | intermax | Mazak, Mitsubishi, Mazatrol | 3 | 12-11-2007 02:10 AM |
| Emc2 with encoder feedback | R.thayer | LinuxCNC (formerly EMC2) | 5 | 01-27-2007 09:26 AM |
| How to tell if my motor is Pulse encoder or quadrature encoder? | Darc | Servo Motors and Drives | 0 | 07-22-2005 03:51 AM |