|
Re: Progamming Encoder
Here is an example of the code for initializing and reading from a quadrature encoder(a quadrature encoder provides support for lowering the encoder count if the motor spins "backwards" from the encoder positive). If you were to initialize in begin.vi (as you should) you would use an Encoder RefNum Set in begin.vi and then feed a RefNum Get through the Dig Src to the Encoder Open and then to the Encoder Get. Keep in mind that without the DistancePerCount parameter (the double constant wired to the Encoder Open) the encoder will read in counts, not distance. The constant attached to the DecodingType input is dependent on the encoder you are using, as is the DistancePerCount.
-Ti00
|