View Single Post
  #4   Spotlight this post!  
Unread 06-02-2011, 13:34
CRLS97 CRLS97 is offline
Registered User
FRC #0097
 
Join Date: Jan 2011
Location: Cambridge
Posts: 28
CRLS97 is an unknown quantity at this point
Smile Re: Using an Encoder to Measure Forklift Height

Quote:
Originally Posted by WizenedEE View Post
In begin.vi:
1) Digital input Open
2) DevRef to "Counter to digital Source"
3) DevRef to encoder open
4) Repeat 1 - 3 for second input of encoder
5) DevRef to encoder set RefNum
In teleop.vi:
6) Encoder get RefNum
7) DevRef to Encoder Get

The encoder get can return a ton of very useful things. If you set the encoder open.vi correctly, you could get the get function to return the direct height of the arm! You can also get the direction, if it's stopped, etc.

Thanks! Just to clarify: in begin I should initialize one encoder but have two inputs for the dio using two seperate initializers but wire them into one to have in memory and in teleop I will access them and then have them get values.

However I'm confused by where the results of the get values would appear. Will they show somewhere in the DS? (I haven't been able to experiment yet, and won't be able to until tomorrow).

Once again, thanks!

and @Greg: thanks! I'll definitely take a look at that before experimenting ^^ tomorrow!

Last edited by CRLS97 : 06-02-2011 at 13:59.
Reply With Quote