12-07-2014 09:03 PM
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.
12-07-2014 11:30 PM
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?
12-08-2014 02:57 AM
12-08-2014 03:18 PM
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.
12-09-2014 01:14 AM - edited 12-09-2014 01:14 AM
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
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…