![]() | |
| 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
| |||
| |||
Hello, I have a milling machine with stepper motors and linear scales. I have everything talking and working, and I have run into a problem with using the scale feedback. Axis doesn't provide for a pin to feed actual joint position into. I tried feeding it into the motor position pin, but because I am using screw comp, this causes issues, especially with homing. The screw comp also causes problems using the method outlined in the EMC wiki. Axis does provide a pin called actual joint position, but it is an output. What I need is a pin in axis that is actual joint position input. A actual and commanded delta output would be nice too. Thoughts? Brian |
|
#2
| |||
| |||
So, if the BASE_THREAD is 50000, or 50 microseconds, that is 20 KHz. So, you don't want more than 10000 encoder counts per second. If the encoder has a resolution of .0004" (metric scale of ,01mm) or 2540 counts/inch, and you are moving at 60 IPM or one inch per second, then that is only 2540 counts/second, so that should work. But, it eats up most of a whole parallel port doing this. So, you might look at some of the hardware "accelerators" available for EMC. Anyway, I know how to do this using my Universal PWM Controller, I'm not sure of the exact details of doing this using all EMC-Hal components, but you definitely need to add in the PID component, which is the central part of closing a servo loop. You can look at the univstep configs files that are on your EMC system to see how all this is hooked up. ppmc.0.encoder.00.position is the scaled position out of the encoder counter. ppmc.0.stepgen.00.velocity is the step rate output to the hardware step generator. Jon |
|
#3
| |||
| |||
I think I am a few steps ahead of you. I already have HAL reading both scales correctly. I have already done the math for the input frequency. When I say axis has no provision for joint feedback, I am referring to the HAL component 'axis'. specifically, axis.0.joint-pos-fb being an OUT. I need that pin to be an IN. Once I get that, I can take the difference of axis.0.joint-pos-cmd and axis.0.joint-pos-fb and add that to the stepgen input. This likely wouldn't even need a PID loop. Again, I am way past the rudimentary connection and setup problems. What I am up against is a missing 'feature' of the HAL component 'axis'. Brian |
|
#4
| |||
| |||
As Jon said, The normal way a closed loop stepgen driven servo is done in EMC is by feeding the commanded position and the encoder position feedback into a PID component than drives a stepgen running in velocity mode. The PID loop needs to have feedforward set to one and maybe a small amount of P and or I to compensate for clock differences (Hardware stepgens only) or delays in changing direction (Both hardware and software stepgens) |
|
#5
| |||
| |||
| I must not be explaining the issue clearly. I am not concerned with how to close the loop with a PID controller. The only place I can connect the encoder data to in EMC has the screw comp added to it later (axis.x.motor-pos-fb) I need a pin that is after the screw comp, but before the gui. The reason I need this is so when I disable the motors and manually wheel the table around, EMC can keep track of whats going on. Brian |
| Sponsored Links |
|
#6
| |||
| |||
All I know is how it is done in a servo system where EMC is part of the servo loop. I don't use screw error compensation on my system, but the kinematics IS handling it, if I were to provide a comp table. And, on both of my machines, it definitely is able to follow machine position when I hit E-stop and manually move the machine. If I generated and entered the comp tables, it would automatically be conpensating for screw errors, too. I THINK that the on-screen display would show the corrected position, but as I have not used this function, I can't absolutely verify that. Maybe you had better run this question by the EMC developers to check that it works that way. Jon |
|
#7
| |||
| |||
| Jon, I have tested it, and it does work the way you propose. I connected the scales to the motor position feedback, and with motors disabled, axis would follow the table around. Because of the backlash (acme screws) and the wear in the center of the x screw, I really need to use the screw comp, and this is at odds with the fore mentioned method. I am sure it will take a code change, but I don't think it would be a major one. I was kinda hoping to catch the eye of one of the developers, and maybe see if it could get worked in. I would dig into the code, and contribute the change myself, but I don't have time to familiarize myself with the source and make the patch. Especially when I know there are guys that are already familiar with it, and I suspect could implement it fairly easily. The way the axis component is already structured, I am kinda surprised this hasn't already been done. Is there a better way to bring this to a developers attention? Brian |
|
#8
| |||
| |||
| emc-developers@lists.sourceforge.net The info on joining is in the linuxcnc.org home page, but here's the subscribe page for the developer's list : https://lists.sourceforge.net/lists/...emc-developers The other problem is that backlash compensation doesn't actually work. For commanding positioning-only control from G-code, it can be done. For sensing position from shaft angle measurement, it kinda-sorta works, but is far from ideal. For actual machining with interpolation, it just is awful, because the leadscrew is not in control of the table position. If the leadscrew cannot hold the table in position, the cutting tool can take control, causing the workpiece to JUMP toward the tool, with often spectacular results. So, if there is any way at all to reduce the backlash, such as cutting the Acme nuts and pushing them together, you really ought to do it. Jon Last edited by jmelson; 07-04-2010 at 11:38 PM. Reason: typo |
![]() |
| 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 |
| DRO Scale Problem | ranchak | Benchtop Machines | 4 | 09-15-2008 02:54 PM |
| Need to make scale tire mold for 1/6 scale car | thuffner3 | Moldmaking | 2 | 04-29-2008 12:57 AM |
| scale feedback | camtd | Mach Software (ArtSoft software) | 6 | 09-03-2007 05:51 PM |
| G320 receiving feedback from linear scale | Paraprop | Gecko Drives | 3 | 04-13-2007 11:54 PM |
| scale | craig | Mastercam | 4 | 03-09-2007 08:10 AM |