Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

quadrature encoder

Hi,
I'm trying to make an position measurment with a quadrature encoder.
My hardware is a6031E card, and I 'm using DAQmx 7.4.0.
I read the AN84. So I connected Channel A to Ctrl0_src (PFI8) and Channel B to ctrl0_up-down (Port0.6). I used the "quad_encoder_with_E-series_(STC)-daqmx.vi".
It first didn't work : il was counting up and not down or the opposite whether I was couting rising or falling edge.
Then it worked (I cannot see what I changed, I think I did not change anything but it's impossible).
And now, it doesn't work anymore. Even when I create a global channel and test it in MAX, it counts up good, but when irotate the shaft the other sense, it stays at his level and doesn't count down.
Can somebody telle me where I made a mistake and what I forgot.
Thanks.
0 Kudos
Message 1 of 3
(3,988 Views)

Hello,

If you want to count up and down, you should configure your counter as "externally controlled" with DAQmx Channel Property Node.

Look at the web page : http://digital.ni.com/public.nsf/websearch/86EBA05BC4D586AD86257082007C5744?OpenDocument

Hope this help.

Isabelle
Ingénieur d'applications
National Instruments France
0 Kudos
Message 2 of 3
(3,972 Views)
Merci de me répondre.
J'avais bien configuré mon compteur en "controllé de manière externe" mais ça ne marchait pas.
J'ai trouvé la réponse ce matin : mon codeur disposait de sorties totem-pole, et je l'alimentait en 12Vdc. J'ai vérifié la doc ce matin, et le fabricant garantit un niveau bas maximum de ... 2 Volts. En fait, des fois, il descendait en dessous du niveau d'acceptation bas TTL et souvent non ! Du coup, avec 2 volts sur mon entrée count up-down, je me trouvais souvent dans une sorte d'idle state, puisque mon signal sur cette broche était plus haut que le niveau d'acceptation bas TTL et plus bas que le niveau d'acceptation haut TTL.
J'ai changé de compteur pour un avec des sorties TTL directes, et tout marche parfaitemement bien.
Merci encore de vous être intéressée à mon problème,
Bonne fin de journée,
Olivier Quillard
0 Kudos
Message 3 of 3
(3,967 Views)