Go to Post Cant get hair and nails done and still run a robot. - wendymom [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2011, 23:09
CRLS97 CRLS97 is offline
Registered User
FRC #0097
 
Join Date: Jan 2011
Location: Cambridge
Posts: 28
CRLS97 is an unknown quantity at this point
Using an Encoder to Measure Forklift Height

Hi,

This is Team 97 and we're all new programmers:

We have an idea to use an encoder on a motor which lifts and brings down a forklift. Is it possible to use an encoder to measure how many rotations the motor shaft makes and then of course subtract the measurement when the shaft moves in the opposite direction (thus bringing the lift down)...?

The purpose is to get a forklift height reading on the driver station.

Could anyone provide us any leads? We're using labview and we're a bit lost on how to get started. Our build team will have the encoder's on the motor shaft in a day or two.

Any leads appreciated,
thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2011, 01:22
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Using an Encoder to Measure Forklift Height

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.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2011, 09:44
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,752
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: Using an Encoder to Measure Forklift Height

Have you looked at the encoder examples?

The examples are great for testing out the electrical connections before you put your code into the mix. They are also good for learning to copy/paste or base your code on how an example does it. This is really useful for gaining understanding of how the sample code works, and how to modify it.

Greg McKaskle
Reply With Quote
  #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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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