Movement adjustment based on feedback from encoder

More
18 Jan 2013 17:53 #28800 by belegnar
Is it possible in linuxcnc to adjust 2-axis movement on the ground of actual position recieved from linear encoders? Direct me to the link where i can read about such setup, please.

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

More
18 Jan 2013 19:30 #28802 by cncbasher
this is known as a Closed Loop System mosty used with servo motors , although this can also be added to Steppers which are a open loop system , depending on the type of encoder scales used this can be usefull
but this does raise the cost and is it worth it for the type of machine use etc ..

you would probably need to use a Mesa or pico Interface due to the fact that you will need quite a few more pins than a parrell port can give you
as well as being able to interrogate the pulse stream efficiently .
The following user(s) said Thank You: belegnar

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

More
20 Jan 2013 22:48 #28873 by belegnar
Certainly, closed loop system raises cost of instrument in whole, but also it increases precision, which is bottle neck of a ball-screw gear w/ stepper motor.

Why can't i use second lpt port to increase amount of input pins?

And the question is still open - is it possible to setup closed loop system drived by linuxcnc and where can i read about it?

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

More
20 Jan 2013 23:26 #28874 by cncbasher

Certainly, closed loop system raises cost of instrument in whole, but also it increases precision, which is bottle neck of a ball-screw gear w/ stepper motor.

Why can't i use second lpt port to increase amount of input pins?

And the question is still open - is it possible to setup closed loop system drived by linuxcnc and where can i read about it?


yes this can be done in linuxcnc
no amount of electronics can increase precision , that is inherent in the machine build mostly in the mechanics
encoders are used to keep the path requested within a margin of error or to indicate if you are outside of tolerance ( ferror )
as this is all dependant of time and speed in realtime , a good read ahead and other factors , the faster you can read the pulse from encoders and process the required result
their is a great dependence on hardware and speed , the faster your moving the axis the faster you need to read and process the encoders , Parrell port can do it , but not to close enough tolerances
the faster you go .. this becomes quite a process hog , and is better served using using off board electronics such as FPGA etc

and depends on the type and quality of the encoder used of course . will all have an effect on the result obtained
The following user(s) said Thank You: belegnar

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

More
21 Jan 2013 00:05 #28878 by PCW
Just to add my 2 cents, you _can_ create a feedback control system with parallel ports reading encoders and step motors running in velocity mode, but you have to consider the maximum rate that you can read the scale and the scale resolution. I know of LinuxCNC users who have done this, one application is a rotary table, but this has quite a slow encoder count rate.

For example with a 1 u resolution linear scale. somewhere around 25 mm/s is about as fast as you will be able to move without losing count with a parallel port system (25 KHz reliable count rate assuming 50 % headroom and 20 usec basethread)

Also for a feedback system you need more scale resolution than control accuracy (a reasonably well tuned system may only keep within 5 counts or so)
The following user(s) said Thank You: belegnar

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

More
21 Jan 2013 00:12 #28880 by belegnar

yes this can be done in linuxcnc


can you help me find manual?

no amount of electronics can increase precision , that is inherent in the machine build mostly in the mechanics


definitely so

encoders are used to keep the path requested within a margin of error


this is what i need - to keep requested path within a margin of 50 µm

sorry for my poor english :-)

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

More
21 Jan 2013 00:16 #28881 by belegnar

Just to add my 2 cents, you _can_ create a feedback control system with parallel ports reading encoders and step motors running in velocity mode, but you have to consider the maximum rate that you can read the scale and the scale resolution. I know of LinuxCNC users who have done this, one application is a rotary table, but this has quite a slow encoder count rate.

For example with a 1 u resolution linear scale. somewhere around 25 mm/s is about as fast as you will be able to move without losing count with a parallel port system (25 KHz reliable count rate assuming 50 % headroom and 20 usec basethread)

Also for a feedback system you need more scale resolution than control accuracy (a reasonably well tuned system may only keep within 5 counts or so)


Yes, i've realized mesa card inevitability, thx.

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

More
21 Jan 2013 00:44 - 21 Jan 2013 00:56 #28884 by cncbasher

yes this can be done in linuxcnc


can you help me find manual?

no amount of electronics can increase precision , that is inherent in the machine build mostly in the mechanics


definitely so

encoders are used to keep the path requested within a margin of error


this is what i need - to keep requested path within a margin of 50 µm

sorry for my poor english :-)


to add encoders is simply a few lines additional to the hal file
and then tuning the pid for the encoders , there is some comments on the forum and the wiki.

linuxcnc.org/docs/html/man/man9/encoder.9.html

note: following and correcting the path is open to interpretation as to the accuracy and the form of action taken
i.e ferror for example will just stop the machine if outside the tolerance value .
Last edit: 21 Jan 2013 00:56 by cncbasher.
The following user(s) said Thank You: belegnar

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

More
22 Jan 2013 00:27 #28922 by belegnar
i've read about encoders earlier, but still can not imagine how to tell linuxcnc keep the path up-to-date with encoders data.
will it do this automatically w/o addition setup?

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

More
22 Jan 2013 03:13 - 22 Jan 2013 03:30 #28929 by PCW
Almost all LinuxCNC configurations require some customization
This customization is done in HAL (xxx.hal) and initialization (xxxx.ini)
files.

Most closed loop configurations use encoder feedback, the PID component and PWM or analog output schemes to drive the motor.

Probably the best way to get a feel for this is to look at some existing closed loop configurations: (etch-servo, hm2-servo, ppmc, motenc are good places to look)

git.linuxcnc.org/gitweb?p=linuxcnc.git;a...9fa424b55dc4;hb=HEAD
Last edit: 22 Jan 2013 03:30 by PCW.
The following user(s) said Thank You: belegnar

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

Time to create page: 2.784 seconds
Powered by Kunena Forum