Go to Post Our opponents didn't know where our robot was going and neither did we! - ReapersRule [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 28-02-2011, 11:41
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Button conundrum

We are using joytick buttons to toggle our intake rollers. Our programming team has put together the VI attached, but only one set actually works. To the naked eye, they appear that they should work, but don't. I'm hoping another set of eyes can find the problem. Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	buttons 2.JPG
Views:	53
Size:	45.0 KB
ID:	10297  
Reply With Quote
  #2   Spotlight this post!  
Unread 28-02-2011, 11:50
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Button conundrum

Shouldn't the bottom right Motor output be Motor C instead of Motor B?

The other issue is you appear to have lots of potential race conditions, because you set the same motor in multiple places.
Typically, you should have only one Motor Set Output for each motor and the Case statements just decide on the final value being sent to the motors.

Yiou need to enforce a precedence.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-02-2011 at 11:54.
Reply With Quote
  #3   Spotlight this post!  
Unread 28-02-2011, 11:54
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: Button conundrum

You can't use multiple Motor Set Output functions for the same motor at the same time and expect consistent results. One of them will "win", though predicting which one gets executed last is generally not possible.

What you need to do is find a way to choose among the possible motor output values and feed them to a single Set Output. You can use Case blocks in series, or use cascaded Select functions (my personal preference).
Reply With Quote
  #4   Spotlight this post!  
Unread 28-02-2011, 12:21
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

Thanks! Just made that change and deployed. Button B works like a champ (always has), but the rest produce at best, a sputter, as if they are working against each other.
Reply With Quote
  #5   Spotlight this post!  
Unread 28-02-2011, 12:23
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

May I ask the favor of assuming my programmers are neophytes and how (hopefully in pictures) you would program this? Programming is not my area of expertise and my kids like pictures! They do most of their work learning on the fly with examples.

Again, many thanks.
Reply With Quote
  #6   Spotlight this post!  
Unread 28-02-2011, 12:34
porterma64's Avatar
porterma64 porterma64 is offline
Registered User
FRC #0815 (Advanced Power)
Team Role: Electrical
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Allen Park
Posts: 14
porterma64 is an unknown quantity at this point
Re: Button conundrum

I know that I'm responding a request with a question, but is the button control the only way the kids can can control the intake direction? Do you have a joystick that could be utilized?
Reply With Quote
  #7   Spotlight this post!  
Unread 28-02-2011, 12:36
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

Yes, we have a fourth and I have suggested we run that in arcade mode, but they adamantly want to use the buttons to intake, expel and rotate the tubes.

If push comes to shove and we have to have something that works, we can go with joystick four.
Reply With Quote
  #8   Spotlight this post!  
Unread 28-02-2011, 12:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Button conundrum

Here's one way.

P.S.
Double-check the values. I may have mistyped some of them...
Attached Thumbnails
Click image for larger version

Name:	Sample.jpg
Views:	37
Size:	37.0 KB
ID:	10301  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-02-2011 at 12:56.
Reply With Quote
  #9   Spotlight this post!  
Unread 28-02-2011, 13:31
porterma64's Avatar
porterma64 porterma64 is offline
Registered User
FRC #0815 (Advanced Power)
Team Role: Electrical
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Allen Park
Posts: 14
porterma64 is an unknown quantity at this point
Re: Button conundrum

Joystick 3 is an Xbox Controller. You should be able to reassign to your inputs.
Axis 5 is the Y component of a joystick. Moving foward or rearward on the joystick results in expelling or pulling-in the tube.
Throttle 3 (a trigger) which reverses one motor direction to roll the tube in either direction.
Also, better to use motor vi(s) than drive vi(s) for this.
Attached Thumbnails
Click image for larger version

Name:	Claw.JPG
Views:	20
Size:	72.0 KB
ID:	10302  
Reply With Quote
  #10   Spotlight this post!  
Unread 28-02-2011, 13:38
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

Very interesting! From the best I can tell, your VI is a single pivot arm?
Reply With Quote
  #11   Spotlight this post!  
Unread 28-02-2011, 13:55
porterma64's Avatar
porterma64 porterma64 is offline
Registered User
FRC #0815 (Advanced Power)
Team Role: Electrical
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Allen Park
Posts: 14
porterma64 is an unknown quantity at this point
Re: Button conundrum

Not part of the subject matter, but for our Arm Control, yes, yes it is. We are using an elevator mechanism to manage the gross movement and the arm pivot for fine adjustment.

For your intake system, you should have enough options to choose from.
Reply With Quote
  #12   Spotlight this post!  
Unread 28-02-2011, 14:13
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

The only reason I asked is because we are utilizing a two-pivot arm with the X and Y controlling the shoulder and elbow joints. Don't know if we can control the pivots and use the 360 buttons without seriously confusing a driver.
Reply With Quote
  #13   Spotlight this post!  
Unread 28-02-2011, 14:28
porterma64's Avatar
porterma64 porterma64 is offline
Registered User
FRC #0815 (Advanced Power)
Team Role: Electrical
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Allen Park
Posts: 14
porterma64 is an unknown quantity at this point
Re: Button conundrum

From my limited experience as a mentor, the kids are more adapatable than you think. Ask them! Xbox controllers are favored from our drive teams becasue of their familiarilty. Buttons are accessible as well as the dual joystick feature, but is food for another thread.
Reply With Quote
  #14   Spotlight this post!  
Unread 28-02-2011, 15:09
fhobart's Avatar
fhobart fhobart is offline
Team leader
FRC #2197 (Las Pumas)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2007
Location: New Carlisle, IN
Posts: 35
fhobart is an unknown quantity at this point
Re: Button conundrum

Mark,
I put together the button structure exactly as you indicated; however, now the only button to repsond is the last one on the list/cascade, button 5. I am at a loss. Any ideas?
Reply With Quote
  #15   Spotlight this post!  
Unread 28-02-2011, 15:34
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: Button conundrum

Quote:
Originally Posted by fhobart View Post
Mark,
I put together the button structure exactly as you indicated;...
Did you wire each input directly through to the associated output in every "false" case, as shown in the grayed out block?
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 04:33.

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