Go to Post Please think before you speak. - Cory [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 08-02-2017, 17:21
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 9
Benson3292 is an unknown quantity at this point
Help please!

We our very inexperienced programmers and came up with the following code. When we deploy the code it all seems to work except for teleop mode. We will go to run teleop and our two victors on our left side lights will either both shut off or one will blink and the other will shut off, depending on the time. We also are having an issue with our right joy stick of our xbox 360 controller. It will not control that side of the motor. When we go to look on the FRC dashboard it does not show that we are moving that joystick. Any thoughts or issues with our coding that I have attached?
Attached Thumbnails
Click image for larger version

Name:	Begin.PNG
Views:	27
Size:	20.0 KB
ID:	21747  Click image for larger version

Name:	Teleop.PNG
Views:	20
Size:	10.7 KB
ID:	21748  Click image for larger version

Name:	Finish.PNG
Views:	15
Size:	16.8 KB
ID:	21749  
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2017, 17: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,948
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: Help please!

You have two joysticks declared for USB 0, that won't work.
One game controller per USB port, no duplicates.

How come you skipped using PWM 3 (just curiosity)?
No PWM cable is plugged into PWM 3 is it?

What joysticks do you have attached? Is it just an xbox controller?

Teleop is not setup properly to use an xBox controller to tank drive.
xbox tank control that uses the left/right sticks to control the left/right of the robot looks like the attached.
Attached Thumbnails
Click image for larger version

Name:	xbox-tank-drive.png
Views:	20
Size:	19.2 KB
ID:	21750  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2017 at 17:49.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2017, 11:33
JeffB JeffB is offline
Registered User
FRC #5052 (RoboLobos)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Austin
Posts: 67
JeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to behold
Re: Help please!

If you want an explanation of why Mark's code handles the process with a single "joystick," take a look at the LabVIEW Joystick Help thread towards the top of these forums.

In LabVIEW, "joystick" refers to the controller itself rather than the joysticks on the controller. A single Xbox controller is one joystick. The different knobs on the Xbox controller are different axes rather than different joysticks. You'll want to read the desired axis from the joystick rather than create a new joystick.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2017, 11:55
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,948
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: Help please!

Here's an example of how a single USB xbox game controller breaks down into different Axis and buttons inside our user code.

__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2017, 13:23
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 9
Benson3292 is an unknown quantity at this point
Re: Help please!

We skipped PWM 3 because we had originally thought we were having issues with that PWM connection. We jumped to four and found that we were having the same issues. Right now we do not have any PWM's plugged into 3.

We just have an xbox controller. I will try that for the joysticks tonight!

Thank you very much!
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 00:28.

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