Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use daqmx to get encoder direction/count on M-series board?

I  have a linear encoder and wish to get distance/direction.  The motor has an encoder with phase A and B .  I tried to connect the lines according the the E-series, ctr 0 and P0.6, and ground to digital ground.  I tried to get the readings from the encoder but it does not work.  I run the Labview first and laster run the motor first but still some error coming out. It gives the eorr 200284.
 
2 questions:
How do I use daqmx to get encoder direction/count on M-series board?


Thanks,
Zibin Song
0 Kudos
Message 1 of 2
(3,236 Views)

Hi Zibin

 

Error 200284 is a time out error, you might be able to get around this by dropping the sample rate to about 100 (default is 1000) it really depends how big your pulse is. Or by increasing your wait time (default 10s).

 

You need to find your PFI pin numbers to know what to wire A,B and Z to on your m-series board, to do this go into max right click NI-DAQmx Tasks click Create New DAQmx Task >> Counter Input >>Position>>Linear, and setup the task for your measurement. It will tell you what the PFI lines are. You then need to look at the wiring diagram and connect it to the correct pins.

 

Hope this helps

 

Any further problems drop us another message.

 

Tim M

 

NI UK

0 Kudos
Message 2 of 2
(3,225 Views)