Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Single Channel Encoder (http://www.chiefdelphi.com/forums/showthread.php?t=144363)

Bpk9p4 02-21-2016 05:48 PM

Single Channel Encoder
 
i was wondering if anyone has an example how to code a single channel encoder. This is for are shooter wheel so we do not need direction and we would like to save the DIO for other sensors

Alan Anderson 02-22-2016 12:22 AM

Re: Single Channel Encoder
 
For our purposes, "encoder" almost always means "quadrature encoder" which requires two channels. For a single channel digital sensor, open it as a simple counter.

Bpk9p4 02-22-2016 12:54 AM

Re: Single Channel Encoder
 
so how would i go about finding the speed then?

Alan Anderson 02-22-2016 01:10 AM

Re: Single Channel Encoder
 
Compute the speed as the number of counts divided by the amount of time. You can read both the current count and the current time. Do that periodically, subtract the previous values from the new values, and divide the differences to yield a rate of counts per time.


All times are GMT -5. The time now is 06:00 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi