Go to Post You cannot change people, you can only change yourself. - KenWittlief [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 05-02-2014, 16:56
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Xbox 360 controls will this work ?

ive been working on my labview xbox 360 controller just wanted to know if this will work
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2014, 17:01
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

here the telop pics
Attached Thumbnails
Click image for larger version

Name:	telop pic 1.png
Views:	69
Size:	169.0 KB
ID:	16109  Click image for larger version

Name:	telop pic 2.png
Views:	40
Size:	187.9 KB
ID:	16110  
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2014, 17:32
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

I would use a greater than or less comparison sub.vi than for your triggers. Your button code will not work because you have multiple pieces of code sending conflicting information to the robot. If you pressed a button to turn a relay on, other parts of your code will still be telling to be off. You can only have one going on at a time.
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2014, 17:49
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

alright thanks ill make the corrections now
Reply With Quote
  #5   Spotlight this post!  
Unread 05-02-2014, 18:49
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

hows this and for the xbox control the value for the left trigger is 0 -1 and i couldn't figure how two do that one because every time i deployed it an error message came up
Attached Files
File Type: vi Teleop3.vi (57.5 KB, 7 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2014, 19:25
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,833
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: Xbox 360 controls will this work ?

As Owen mentioned, you should have only one Relay Set instead of the multitude that you've got now.
It needs restructuring along the line of this example where the values you want cascade through your button choices, but the Set happens only once at the end. Each of your Relay Cases gets replaced with a Select and the values you choose in your true and false cases.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-02-2014 at 19:28.
Reply With Quote
  #7   Spotlight this post!  
Unread 05-02-2014, 19:42
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

how did you get the "off" constant
Reply With Quote
  #8   Spotlight this post!  
Unread 05-02-2014, 19:45
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

never mind i found it
Reply With Quote
  #9   Spotlight this post!  
Unread 05-02-2014, 19:46
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,833
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: Xbox 360 controls will this work ?

Just Create->Constant on the input to the Relay Set, then copy and paste the constant wherever else you want to use it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #10   Spotlight this post!  
Unread 05-02-2014, 19:51
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

Quote:
Originally Posted by Mark McLeod View Post
Just Create->Constant on the input to the Relay Set, then copy and paste the constant wherever else you want to use it.
yea i found it i also have a question
what i wanted to do was if button 1 and button 2 are pressed at the same time a certain action happens and if only button one is pushed a different action happens with that code that you pasted says is if button 2 and 3 are pressed then the relay will run forwards and if only button 2 is pressed then it'll run the relay reverse am i correct ? just to make sure i understand this ^.^
Reply With Quote
  #11   Spotlight this post!  
Unread 05-02-2014, 20:08
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,833
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: Xbox 360 controls will this work ?

A little different:
  • No button pressed = OFF
  • Button 2 pressed = Reverse (unless Button 3 is pressed at the same time)
  • Button 3 pressed = Forward (it overrides button 2 if it is pressed at the same time)
Part of what it's doing is saying which button wins if there are two commanding different actions.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #12   Spotlight this post!  
Unread 05-02-2014, 20:16
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

Quote:
Originally Posted by Mark McLeod View Post
A little different:
  • No button pressed = OFF
  • Button 2 pressed = Reverse (unless Button 3 is pressed at the same time)
  • Button 3 pressed = Forward (it overrides button 2 if it is pressed at the same time)
Part of what it's doing is saying which button wins if there are two commanding different actions.
what im trying to do is make like a "condition" per say. if button 5 is pressed relay 1 will move forward however if button 2 and button 5 are pressed relay 1 will move reverse
Reply With Quote
  #13   Spotlight this post!  
Unread 05-02-2014, 20:41
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,833
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: Xbox 360 controls will this work ?

Quote:
Originally Posted by gerry View Post
what im trying to do is make like a "condition" per say. if button 5 is pressed relay 1 will move forward however if button 2 and button 5 are pressed relay 1 will move reverse
Just replace your button 5 with my button 2.
and your button 2 with my button 3, and you get exactly what you stated above.

if button 5 2 is pressed relay 1 will move forward however if button 2 3 and button 5 2 are pressed relay 1 will move reverse
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-02-2014 at 20:45.
Reply With Quote
  #14   Spotlight this post!  
Unread 05-02-2014, 21:19
gerry gerry is offline
Registered User
FRC #4144
 
Join Date: Jan 2013
Location: inglewood
Posts: 19
gerry is an unknown quantity at this point
Re: Xbox 360 controls will this work ?

Quote:
Originally Posted by Mark McLeod View Post
Just replace your button 5 with my button 2.
and your button 2 with my button 3, and you get exactly what you stated above.

if button 5 2 is pressed relay 1 will move forward however if button 2 3 and button 5 2 are pressed relay 1 will move reverse
alright now if i wanted two bring in another button to that same circumstance say button 6 then i would have if button 5 is pressed relay 1 will move reverse if button 5 and 2 is pressed then relay 1 will move forward now if button 6 is pressed relay 2 will move reverse and if button 2 and button 6 is pressed the relay 2 will move forward
using the same logic for circumstance 1 how will i wire the two outcomes of both circumstances two only one wiring point would io use a (and) function ?
Reply With Quote
  #15   Spotlight this post!  
Unread 05-02-2014, 21:47
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,833
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: Xbox 360 controls will this work ?

Just have two separate decision trees for the two different relays.
Don't try to combine them if they don't have to be. That just makes the code confusing to understand.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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 20:59.

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