Go to Post When I mentor other people in programming... they either get pointers or they don't. - JamesTerm [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 02-03-2010, 02:41 PM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Can't see any values on dashboard

Quote:
Originally Posted by Kyledoo View Post
Thank You!! Everyone kept saying MODIFY THE DASHBOARD!! but I am having enough trouble figuring out the encoders right now, and we have more sensors we want to set up. Where is the diagram though, I see the project explorer and it lets me open of the GUI. Other than figuring that out, I have never used labview. Since you have been so helpful, would you mind me asking you about an Encoder Example, maybe even one that sends it to the dashboard? If you could point me to something that would be very helpful. WPI documentation seems to be very lacking in the encoder area.
Here's some code for unit testing the Encoder class:

Code:
	double position4x, position2x, position1x;
	DigitalInput qA(5); // Digital I/O 5 on slot 4
	DigitalInput qB(6); // Digital I/O 6 on slot 4
	Encoder encoder4X(qA, qB, true);
	Encoder encoder2X(qA, qB, true, Encoder::k2X);
	Encoder encoder1X(qA, qB, true, Encoder::k1X);
	// 6 inch wheel (pi*d) is 18.85 inch circumference; 24:40 tooth sprockets; 250 pulses per rev.
	encoder4X.SetDistancePerPulse(18.85 * 0.6 / 250.0);
	encoder2X.SetDistancePerPulse(18.85 * 0.6 / 250.0);
	encoder1X.SetDistancePerPulse(18.85 * 0.6 / 250.0);
	Jaguar rightMotor(2);
	rightMotor.Set(-1.0);
	Wait(2.0); // wait for motor to get up to speed
	encoder4X.Reset();
	encoder2X.Reset();
	encoder1X.Reset();
	encoder4X.Start(); // start counting
	encoder2X.Start();
	encoder1X.Start();
	Wait(5.0); // wait for some distance to be covered
	position4x = encoder4X.GetDistance(); // get position in inches
	position2x = encoder2X.GetDistance();
	position1x = encoder1X.GetDistance();
This code is only interested in position, not speed. Hope this helps.

-Joe

Last edited by jhersh : 02-03-2010 at 02:46 PM. Reason: Make it a bit more interesting...
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
LabVIEW Video Tutorial: Customizing The FRC Dashboard To See Your Data LVMastery NI LabVIEW 0 02-10-2009 01:50 PM
Dashboard View of Pan and Tilt Servo Values JoeXIII'007 Programming 1 02-02-2005 10:34 PM
Bug? Can't seem to delete any of my PMs DanL CD Forum Support 2 12-15-2003 11:12 PM
You can't see through an untouched starting wall of boxes Digo General Forum 31 01-11-2003 12:01 PM


All times are GMT -5. The time now is 09:35 AM.

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