Go to Post FIRST MANTRA: When Lawyer-ism fails, Gracious Professionalism Prevails! - sanddrag [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 13-02-2011, 20:16
dahlboy15 dahlboy15 is offline
Vice President
AKA: Dyson Dahl
FRC #3290 (Robo-Bears)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Baudette, MN
Posts: 14
dahlboy15 is an unknown quantity at this point
Re: servo

I hooked up your simplified version to the buttons. I've attached the vi below. It still does nothing. No servo moves at all when I press a button. I replaced a couple (+) vis with (-). I want to control up with 3, down with 2, left with 4, and right with 5. What's wrong with the program?
Attached Files
File Type: vi Teleop.vi (26.5 KB, 10 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2011, 23:04
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: servo

Quote:
Originally Posted by dahlboy15 View Post
What's wrong with the program?
Perhaps nothing is wrong with the program.

Did you remember to install the 6v servo power jumper next to the PWM output pins on the Digital Sidecar? Without that jumper in place, the servo won't be powered and won't be able to move at all.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2011, 02:38
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: servo

Quote:
Originally Posted by dahlboy15 View Post
I hooked up your simplified version to the buttons. I've attached the vi below. It still does nothing. No servo moves at all when I press a button. I replaced a couple (+) vis with (-). I want to control up with 3, down with 2, left with 4, and right with 5. What's wrong with the program?
I can see your problem, but I'm not sure how to describe it. My code either told the servo to go to the position it's already at or go to the position it's at +5 degrees. You have two commands, one saying to go to the one it's at and one telling it to go up 5 degrees. This means that several microseconds after it sends the signal to go to one position, it's already telling it to go to another.

I could give you a few ways to make it either go +0, +5, or -5, but it looks like you really want to be able to hold down the button and have the camera move down. In that case, you can just have a selector or case structure with the input wired to the joystick button; the true case wired to "add five" and the false case have another identical case structure but with a "subtract five" in the true case and a "say the same" in the false case. Remember to use a feedback node to have the servo remember its current position.

Sorry I can't give you another example, but I really have to do my homework and get to bed.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 08:28
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
Re: servo

I think this thread is getting more complicated then it needs to. The way I understand your question is that when a button is not pressed you want a servo to be at angle X, and when it is you want it to be at angle X+5. Is this right?

The way I would do this is by having a true/false case statement with the numeric constant X in the false case and X+5 in the true case. I would then feed this value in to the WPI servo .vi called "Set Angle". This code would make the servo go to one angle (in this case X) while the button is not pressed and another (in this case X+5) when it is.

If you still don't see any movement try changing the values from X and X+5 to 0 and 170, it could just be to small a change to see. If there is still no servo movement after that, respectfully suggest to electrical it's their fault, calmly double check your code, then yell at electrical.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
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 09:21.

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