In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: PeteUK, I do not know if I can state it more clearly than Bean already has but you want to focus on the [B]total time[/B] it takes to complete [B]one sensor cycle[/B]. You can either look at the sensor on plus sensor off time or the time it takes between each sensor on detection event. They measure the same thing and convey how long it took the shaft to rotate. Suppose I tell you to place reflective tape on a motor shaft and use a reflective sensor to measure the RPM. How much of the shaft would you cover with reflective tape? 1/16? 1/8? Half? More than half? Would it even matter? All that really matters in this case is that some signal goes high for a while and then goes low for a while exactly and only once for each revolution of the shaft. The duration of the high signal plus the duration of the low signal equals the total time it took to complete a single revolution. In short, the sensor can only be high for a while and then low for a while one time for each state during every revolution (or partial revolution if you are measuring gear teeth). If the sensor is closer it might be on longer and off shorter for a given RPM than it would if it were farther away where it would be on for a much shorter duration and off for a much longer one. Still, one on duration plus one off duration equals one total cycle duration and the total cycle duration is what tell you how fast your object is rotating. I hope that helps explain a little more why on and off time variances will not affect the determination of the total cycle time. If this is still not clear feel free ask some more questions. - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=201140#m201255 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)