View Single Post
  #4   Spotlight this post!  
Unread 20-03-2014, 06:02
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote