Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder initialize using DAQ

I need to know how I can initialize an encoder using Labview and DAQ. I need to set each of the digital input lines to 0 and then build upon that, like a counter.
0 Kudos
Message 1 of 6
(3,883 Views)

Hi Farmington,

Can you elaborate on what you're trying to do? Are you trying to use digital input with your encoder as suppose to your counter (are you still counting events)? Is there a reason for doing so? Also, what DAQ device are you using?

If you're trying to count events from your encoder output, below is helpful link:

Using Quadrature Encoders with E Series DAQ Boards

There are LabVIEW shipping examples to count events which you can access through Help >> Find Examples
Navigate to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events

Thanks,
Lesley Y.

0 Kudos
Message 2 of 6
(3,867 Views)
I'm using the digital outputs of the encoder (11BITS) connected to the digital inputs of my DAQ device. The value of the bits in decimal go from 0 to 4095(One revolution).
0 Kudos
Message 3 of 6
(3,857 Views)
Hi Farmington,

Typically, a port size is a multiple of 8. Since you're working with 11 bits, you can group 2 ports together (to get 16 digital lines), and ignore 5 of the bits. Using a LabVIEW shipping example such as the "Read Dig Port" VI, you can indicate the two ports (11 lines) connected to your encoder, and read the encoder output. You can then manipulate the logic level of these digital lines to calculate the value of the encoder.

Hope this helps.

Thanks,
Lesley Y.
0 Kudos
Message 4 of 6
(3,842 Views)
You can't set the state of inputs, only read them. You will have to read the bit pattern of the encoder initally and use that value as an offset to subtract from subsequent readings to determine change in rotation. Be sure you null out 4096 counts per revolution. Also, if you do not read fast enough you may miss revolutions.

What is the upper rpm you expect to encounter? If it is high, you may want to consider a counter/timer card.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 6
(3,839 Views)
I figured out what i needed to do. Thank you.
0 Kudos
Message 6 of 6
(3,831 Views)