Codeur de broche

More
28 Jan 2015 02:21 - 28 Jan 2015 13:46 #55397 by finemeca
Codeur de broche was created by finemeca
Bonsoir,

J'ai acheté un codeur incrémental, 360 impulsions, index, phase A et Phase B.
Avec stepconfig, la valeur de setp encoder.0.position-scale est de 1440.0

A la page www.linuxcnc.org/docs/html/examples/spindle_fr.html --> Section 6. Vitesse de broche avec signal de retour.

Un codeur est monté sur la broche et délivre 100 impulsions par tour sur son canal A.

setp encoder.0.position-scale 100


Finalement, que dois je mettre dans setp encoder.0.position-scale ?

Ma config pour l'axe Z est :

moteur : 200 pas
driver micropas : 8
poulie moteur : 18
poulie vis : 36
pas vis : 5 mm

Avez-vous une formule de calcul ???


Merci d'avance, Pierre
Last edit: 28 Jan 2015 13:46 by finemeca.

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

More
28 Jan 2015 17:38 #55413 by ArcEye
Replied by ArcEye on topic Codeur de broche
Hi

All depends if you are going to use quadrature mode or not.

Your encoder is notionally 360 ppr, but the stepconf figure is 4x, ie quadrature mode.
This will be too high for a software encoder component, the reading will go haywire once the speed gets above a couple of hundred rpm.

Something like this should work
loadrt encoder num_chan=1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread

setp encoder.0.position-scale 360
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position-interpolated => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable

net spindle-index parport.N.pin-NN-in-not => encoder.0.phase-Z
net spindle-pulse parport.N.pin-NN-in => encoder.0.phase-A

You set it for single mode and just use the index and phase A

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

regards

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

More
28 Jan 2015 18:35 #55414 by finemeca
Replied by finemeca on topic Codeur de broche
Bonjour ArcEye,

Merci, j'essaie demain.

Bonne journée,

Pierre

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

More
30 Jan 2015 04:12 #55465 by finemeca
Replied by finemeca on topic Codeur de broche
Bonsoir,

C'est parfait. Merci.

Bonne soirée,

Pierre

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

Moderators: darty367
Time to create page: 0.084 seconds
Powered by Kunena Forum