Step/Dir or Analog?

More
19 Apr 2014 06:05 #46097 by DaBit
Replied by DaBit on topic Step/Dir or Analog?
It works well enough to do the scale thing again on my new mill. Chinese ballscrews are cheap, but not that accurate. The (Taiwanese) scales are reasonably cheap too, but they are accurate. At least the one I have is. They improve accuracy a lot, but the key thing is to minimize backlash. PID-controllers don't like discontinuities.

Due to the fairly low resolution it is necessary to keep the bandwidth of the scale loop low. A few Hz, that's about it. Maybe with the servos it is better; more power allows quicker corrections.

In my testing (with 5u scale, BTW) I had the scale PID act on position. Thus: scale PID had position as input, position as output. 'servo' PID had position as input, velocity as output. This allowed me to limit the maximum corrrection from the scale to +/- 0,30mm. That's plenty to be effective, and little enough to prevent a runaway situation when a scale stops working.

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

More
19 Apr 2014 06:22 #46098 by cmorley
Replied by cmorley on topic Step/Dir or Analog?
Another way to use glass scales and rotary encoders is to use two PIDs.

This is very terse:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Combin..._Devices_On_One_Axis

Its what Stewart did on one of his huge mills.

jmkasunich.com/cgi-bin/blosxom/shoptask/...a-trip-02-20-08.html

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

More
21 Apr 2014 06:16 #46150 by andypugh
Replied by andypugh on topic Step/Dir or Analog?

However, I'm sticking with the servos & decided to use some driver/motors from DMM (Dynamic Motor Motion).

Make sure you have the DYN-3 drives not the DYN-2. The DYN-2 can, in theory, run with 0-5V analogur command but the inputs float high, so at confog time the servos may run at full speed. Which is bad.
The DYN-3 has a proper +/- 10V drive input.

Could you toggle between the two or use both at the same time to improve accuracy? Just wondering if it's worth while hooking up the scales.

What you can do is run a conventional encoder-based position loop with the motors/drives/encoders and then add is a relatively slow, limited-authority second PID controller using the scales. Almost like a live version of screw compensation.

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

More
22 Apr 2014 01:43 #46191 by rds626
Replied by rds626 on topic Step/Dir or Analog?
Thanks, I am looking at the DYN-3 and haven gotten a quote from DMM.

It's pretty cool that linuxCNC is flexible enough to implement 2 loops if one wants. I will definitely try it.

The only thing I'm looking for now is a linux version of the DMM tuning software, or if they will provide a communication/protocol spec for the DYN-3 RS232 port.

Who wants to have windows around just for motor tuning!

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

More
22 Apr 2014 02:44 #46194 by Todd Zuercher
Replied by Todd Zuercher on topic Step/Dir or Analog?
You are going to run into this with almost any servo that requires oe tuning software. They just don't support any other operating systems. It isn't necessarily that bad though. Once you have your drives tuned you should never need to use it again. (One day in Windows probably won't kill you.)

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

More
28 Apr 2014 06:08 #46396 by wizard69
Replied by wizard69 on topic Step/Dir or Analog?

Another way to use glass scales and rotary encoders is to use two PIDs.

This is very terse:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Combin..._Devices_On_One_Axis

Its what Stewart did on one of his huge mills.

jmkasunich.com/cgi-bin/blosxom/shoptask/...a-trip-02-20-08.html


A third way is to use the linear scale for low resolution / high speed and dynamically switch to the rotary when high resolution is required. A couple of decades ago I spent most of my working life servicing such machinery. It is an interesting approach but the manufacture did this via custom hardware and I wouldn't even want to guess at the difficulties they had developing that hardware. Most people don't have a need for such high resolution systems and frankly electronics are a lot faster these days so it is unknown to me if this can be accomplished on PC hardware.

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

More
28 Apr 2014 14:23 #46418 by DaBit
Replied by DaBit on topic Step/Dir or Analog?
If you say 'decades ago' I guess they did that because they ran into pulse counting/processing speed limits. Then it makes sense to move quickly using the low resolution feedback and switch to high resolution feedback once pulse rate drops far enough.

It made me think though: it should be possible to create a component that uses the scale counts as 'most significant digits' and add resolution using counts from the rotary.
Any mechanical play in the system would add non-monotonic behaviour though.

Regarding processing speed: current PC's or even cheap microcontrollers are blazing fast compared to the speed of the mechanics.

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

More
05 May 2014 15:37 #46608 by DaBit
Replied by DaBit on topic Step/Dir or Analog?
I mounted my glass scale (Sino KA-300 5um resolution) for measurement purposes and put it in the loop yesterday 'because I can'.





Needs 2-3 more support points over the length though.

Deviation, scale vs. rotary encoder, no correction:


Scale of the graph is 0,01mm/division (0,0004"/div)

(it is fairly obvious that I have a mechanical problem. Ballscrew is not 100% straight, pulley not 100% square to the screw, and Chinese ballscrews costing $20 including end machining. This is also why I set up the scale so I can measure and take actions based on measurements instead of gut feelings).

With scale correction, travel speed 1000mm/min (40ipm):

Scale of the graph is 0,01mm/division (0,0004"/div)

Keep in mind that a single scale tick is half a division...


Setup:
axis.0.motor-pos-cmd --(position)--> scale PID using only an I term for disturbance rejection --(position)--> servomotor PID ---(torque)--> motor.

Thus, the scale PID gets a position as input, the scale as feedback, and it outputs position. It's effect is limited to +/-0,15mm. The position from this PID is then fed into the servo loop.

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

More
23 Jun 2014 15:14 #48196 by DaBit
Replied by DaBit on topic Step/Dir or Analog?
Let's post a bit more information here; the 'can I correct the position using a glass scale' topic comes up from time to time.

I also mounted a 1um resolution glass scale on the stepper-driven Z axis.

A homing sequence going up 100mm with rapid speed (4500mm/min), then down with 120mm/min, scale is 0,01mm/vertical division:



With these rapid moves I am unable to get rid of the under/overshoot. A stepper motor needs a few microsteps to develop the required torque and there is not enough margin between stepper maximum velocity/acceleration (5100mm/sec, 1200mm/sec^2) and trajectory planner allowed maximum velocity (4500mm/sec, 1000mm/sec^2) to build up this electrical angle advance quickly enough.
With lower (milling) speeds there is plenty of headroom and the over/undershoots disappear. Also visible is the lowspeed portion of the graph above.


Next, given the new insights I retuned the torque-mode servo driven X-axis. Graph is a 12000mm/min move, still with slightly bent Chinese $20 ballscrew:



I re-tuned the servo-PID by starting with a low P value, center the response using FF1/FF2, and then increase P and D. Without I I got a little bit of hunting, so I used a tiny bit of I to stop that. If I could have left the I at zero I would have done so.
The rest of the integral was carried over to the scale-PID, which runs with a fairly large I only. No P, no D, no FFx.

No undershoot, no overshoot, low following error for such a high speed and inaccurate ballscrew.

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

More
03 Jul 2014 04:00 - 03 Jul 2014 04:10 #48395 by vre
Replied by vre on topic Step/Dir or Analog?
I have the same problem.
I want to drive servos (step+dir mode or analog velocity mode) from linuxcnc with outer closed loop.
My servos are 3000rpm get 500khz step-dir signals and output differential signals from its quadrature incremental rotary encoders (ABZ) 2500ppr (10000 with quadrature)
the signals from rotary encoder goes to servo drivers and servo drivers has an output of these signals for the controller.
I want to use the servos in a lathe cnc retrofit so i want at least 2 servos for Z and X axis.
Also i want quadrature encoder input for the spindle (threading operation), 0-10V for vfd spindle speed control and misc I/O (for limit switches)
What hardware from mesa will be suitable for this case ?
thank you.
Last edit: 03 Jul 2014 04:10 by vre.

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

Moderators: PCWjmelson
Time to create page: 0.099 seconds
Powered by Kunena Forum