Showing results for 
Search instead for 
Did you mean: 

NI VB-8012 + Absolute Rotary Encoder (Parallel interface)

Hello All,


I would like to ask you, if it is possible to use absolute rotary encoder with parallel interface (10 bits) with NI-VB 8012 and LabVIEW for measuring current shaft position and speed? The ouput information from encoder is coded in Gray code.


I am newbie for LabVIEW.


Thank you very much

0 Kudos
Message 1 of 4



Depending on how fast you want to sample the information, this is a task NI-VB 8012 should be suited for.  You can wire the 10 bits into the MSO digital channels and do a short acquisition to read the state of each bit.  From there you can write logic that will convert from the gray code to a position using the rotary encoder's data sheet.


There is some overhead in doing an MSO acquisition which means there will be some down time for which you won't receive data.  Depending on your application specifics, this down time will likely not be a major concern.

0 Kudos
Message 2 of 4



First of all thank you for reply me. Encoder should be connected with motor, which has got maximal 2730 rpm, so I would prefer maximal sampling rate. The ouput of encoder has got 12 wires (2 wires for power supply + 10 wires for bits). Do I mean correctly, that in incialization in LabVIEW is each of bit initialized separetly?


Here is attached datasheet of absolute rotary encoder.


Thank you

0 Kudos
Message 3 of 4



This example may help you get up and running faster (download both files, take a look at ReadEncoder).  I have not attempted to convert your specific gray code output to a position, but provided a VI stub for doing that part. 


You can see in the example that all of the inputs can be initialized together.  The order the channels are specified when initializing will determine the order of the bits that are an input to the GrayCodeToPosition VI.


You mention that you would like to have a maximal sample rate.  With this device, you can do acquisitions that sample very fast (100MHz maximum input frequency) but where your maximum speed is around 2730 rpm, you don't need it that fast.  My suggestion would be to run at a relatively low sample rate for the instrument (maybe 20kHz) and run the acquisition for a as long as it will allow you to (I believe this is just over 4 seconds).  The timing between acquisitions is not known which may result in inaccurate speed calculations when calculating between the acquisitions.


With the sample rates you are looking at and the number of digital I/O you need, you may find it more intuitive to work with a digital I/O device that has more digital input channels like the USB-6001 (  With this, you could do a read using a software-timed loop which would give you more predictable timing overall. I hope this helps you get set up for your application.

Download All
0 Kudos
Message 4 of 4