Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Button conundrum (http://www.chiefdelphi.com/forums/showthread.php?t=93019)

fhobart 28-02-2011 11:41

Button conundrum
 
1 Attachment(s)
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.

Mark McLeod 28-02-2011 11:50

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.

Alan Anderson 28-02-2011 11:54

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).

fhobart 28-02-2011 12:21

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.

fhobart 28-02-2011 12:23

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.

porterma64 28-02-2011 12:34

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?

fhobart 28-02-2011 12:36

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.

Mark McLeod 28-02-2011 12:44

Re: Button conundrum
 
1 Attachment(s)
Here's one way.

P.S.
Double-check the values. I may have mistyped some of them...

porterma64 28-02-2011 13:31

Re: Button conundrum
 
1 Attachment(s)
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.

fhobart 28-02-2011 13:38

Re: Button conundrum
 
Very interesting! From the best I can tell, your VI is a single pivot arm?

porterma64 28-02-2011 13:55

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.

fhobart 28-02-2011 14:13

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.

porterma64 28-02-2011 14:28

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.

fhobart 28-02-2011 15:09

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?

Alan Anderson 28-02-2011 15:34

Re: Button conundrum
 
Quote:

Originally Posted by fhobart (Post 1032704)
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?


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

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