Go to Post I'm a zit. - Andy Baker [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 06-07-2015, 19:52
burde1jb's Avatar
burde1jb burde1jb is offline
Registered User
FRC #4327 (Q Branch)
Team Role: Coach
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Battle Creek, MI
Posts: 46
burde1jb will become famous soon enough
Unhappy Encoder programming help needed.

Hey CD! So our lead programmer graduated and his understudy moved back to Germany...

So working on a summer bot left us with very little LabView know-how. I'm coming to you as I have exhausted other sources and I will lay them out as we go.

Here's what we would like to do. We have the AndyMark Hall Effect Encoder on the back of a PG71 with RS775 motor attached. This is then attached to a 16 tooth gear which runs an 84 tooth gear (5.25:1 gear reduction). That 84 tooth gear spins our turret on our t-shirt cannon robot. Yes, this is basically our version of Shockwave. Mad props to Team 254.

Okay, we would like to use the encoder to enable us to push a button, have the motor spin just enough to move to the next barrel to help us get to the next shot. So the disc is 14 inches in diameter. There are 10 barrels all together, so we want the disc to move 14 * pi / 10 inches.

I've attached pictures of our Begin.VI and Teleop.VI

When this code was deployed, the motor would only spin on holding the button down and would not stop when it got to the next barrel. In fact, when the button was suppressed, the turret just kept spinning until we let go of the button. We checked the PWMs to be sure we were not mixing up which button did what.

So here is what we modeled the code and our work after:
Wiring
Block Diagram
Other sources

TL;DR Want a 14 in diameter plate to be moved 1/10th of the way on the press of a button. 84:16 and 71:1 gear reduction with 7 pulses per revolution. Robot runs motor while holding down button and does not stop until we let go of the button.

I'm thinking we did something wrong with the DistancePerCount in Begin.VI or Distance in the Teleop.VI. I'm just not sure where we went wrong.

Any help would be appreciated. Many thanks from Team 4327. Please take a look.
Attached Thumbnails
Click image for larger version

Name:	Team4327BeginVI.jpg
Views:	65
Size:	105.3 KB
ID:	19182  Click image for larger version

Name:	Team4327TeleopVI.jpg
Views:	54
Size:	156.0 KB
ID:	19183  
__________________
Fail fast. Fail often.
Grow team, grow!
www.qbranchrobotics.com
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


All times are GMT -5. The time now is 10:23.

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