LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I get an encoder signal into a number or pearks through a USB 6009 Daq?

how can I get an encoder signal into a number or pearks through a USB 6009 Daq?

 

 

The readings I get are inaccurate and it has to be perfect?

 

Can someone please help need this for school project that due ASAP.

 

 

Thank you.

0 Kudos
Message 1 of 5
(2,517 Views)

Define inaccurate.  Are the readings entirely wrong?  Are they always wrong?  If so, do they appear to be scaled?  Is it possible the values are right, but you're reading too slowly?

 

What have you tried?  Where's the code you've already put together?

0 Kudos
Message 2 of 5
(2,491 Views)

Other questions:

Which kind of encoder?

Which kind of encoder signal?

Which inputs of your USB6009 did you use?

 

Hint:

Use the PFI0 input of the USB6009 it can handle (or: count up) digital signals of upto 10 MHz…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,473 Views)

I'm acquiring a signal through an Al of a usb 6009. The signal corresponds to a rotary encoder. I am trying to get the number of pearks so that i can calculate the angular displacement of the shaft as well as it speed.

 

The problem is while trying to count the peaks using a peak count vi. The results are very inaccurate meaning they dont even nearly describe what is actullay happening.

 

I also tried a counter that counts up every time the signal crosses a certain range of values, but also had a problem, its either none of the data points acquired happens to fall in to that range although it;s almost a sine wave crossing that range with every cycle, or if the specified range is too large the signla will statisfy that condition for a longer period of time this leading to several iterations in the counter.

 

my frequency range is approximated to be 0-15Hz.

 

Above is what i have already did and the problems i had. Please advise any other way to fix this problem, also can you please provide with a link to use PFI0 I'm unforunately not famililar with it.

 

thank you.

0 Kudos
Message 4 of 5
(2,431 Views)

Hi omeza,

 

Above is what i have already did

Sorry, but there is no VI…

 

had a problem, its either none of the data points acquired happens to fall in to that range…

Then either your range or your checking algorithm is wrong…

 

please provide with a link to use PFI0

Manual of the USB6009

 

Rotary encoder usually output TTL-like signals. In case it's a sine wave (as it seems to with your own) you could use a simple Schmitt trigger circuit to create a TTL signal from it. Use the PFI0 counter to count those TTL pulses…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,399 Views)