![]() |
Find Encoder Value in Teleop
To speed up our shooter aiming, we are incorporating an encoder on the tilt axle to automatically find the angle of the mechanism (and through logic adjust the shooter up or down as necessary). We have successfully found the output, and "transformed" it mathematically into an angular reading, but we can't access the value in our teleop program (where we need it) only in the periodic tasks program. Help!
|
Re: Find Encoder Value in Teleop
What's keeping you from reading the encoder output in Teleop?
|
Re: Find Encoder Value in Teleop
Quote:
|
Re: Find Encoder Value in Teleop
I suspect that the periodic is not only reading the encoder, but controlling the elevation. One approach is to share the calculated value, via a global variable. The RobotGlobal is a reasonable place to put a named numeric for this purpose.
An alternative is to call a shared subVI that reads the encoder refnum by name, reads the raw value, and calculates the angle. The subVI would be shared by Periodic, auto, tele, or wherever. Greg McKaskle |
Re: Find Encoder Value in Teleop
Quote:
|
| All times are GMT -5. The time now is 08:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi