09-14-2007 12:41 PM
09-14-2007 08:08 PM
09-19-2007 01:02 PM
09-19-2007 01:49 PM
Hi Wdkng_24,
I don't completely understand what you are doing in your VI. If the actual count is less than 20,000 you subtract 65535, if it isn't then you leave it alone.
So if your input is 0-20,000 you get -65,535 to -45,535, but 20,001 and above would be 20,001 to ......... (this is all before invert and divide by 10,000)
Why the disjointed output?
09-19-2007 01:52 PM
09-19-2007 03:17 PM
You're right. I flipped the logic in my mind. I usually set up the true case to be the "Do something" case and the false case to be the "Do nothing case". And the fact that it never exceeds two inches is significant.
The key thing for MyKat is to determine what are the possible encoder outputs, what they physically mean, and what engineering value they should be. Then it is just a matter of determining the correct math. The possible range of encoder readings, whether the encoder can wrap around in count, or whether the physical device can exceed some predetermined limits would all come into play.