Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 251352

Forum Post: RE: RTOS/TM4C129ENCPDT: quadrature encoder Issue

$
0
0
My friend - you announce "doubts!" Are you not (almost) alone (ship-wrecked) upon a deserted south-sea island - and arrives a sleek craft - and one offering "food & water." And you have doubts? 1. In QEIVelocityConfigure(uint32_t ui32Base, uint32_t ui32PreDiv, uint32_t ui32Period ) Last Parameter " ui32Period " Is in milli seconds or seconds. NEITHER! (doubt slayer #1) That last parameter is "System Clock ticks." Thus - both your mS & S "assertions" fail. 2. In QEIConfigure(uint32_t ui32Base, uint32_t ui32Config, uint32_t ui32MaxPosition ) Last Paramete "ui32MaxPosition" Is affected In Velocity Measurement? If Yes , How it affect velocity? This time you correctly noted that (pesky) last parameter. And that parameter should specify the, "Number of Encoder Pulses arriving during one complete motor revolution." You must understand (or at least accept, that.) (doubt slayer #2) Thus, "To calculate velocity" - you may note that "true velocity" is calculated by: "QEIVelocityGet()'s returned value (which is the number of pulses detected in the time-frame specified by "QEIVelocityConfigure()" followed by several math operations - which "normalize" the velocity calculation.) Read this several times if "unclear." For "extra credit" - why don't "you" (now) supply the "few" remaining math operations to convert, "QEIVelocityGet()'s returned value into (either) RPS or RPM. (so that myself/others - may bask in "doubt.") Your kind award of "Verified Answer" may avoid my presence on a major Chicago street-corner - seeking "donations." (some funds are required to "sail far" from your deserted island...)

Viewing all articles
Browse latest Browse all 251352

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>