Go to Post This is what happens when a couple of whackos get an idea at 2 am. - Rich Kressly [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 14-01-2015, 22:57
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Strange instance with Arcade Drive

Whenever we deploy our code to the robot, the axises on our joystick are reversed. As a result, we have to feed the X axis on the joystick into the Y value of arcade drive and vice versa. Is this a normal occurrence? We convert the array value of the joystick axises to a cluster like in years past so that we could unbundle them by name.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2015, 23:46
Kevin Phan's Avatar
Kevin Phan Kevin Phan is offline
College Student
FRC #0357 (Royal Assault)
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2010
Location: PA, United States
Posts: 95
Kevin Phan will become famous soon enoughKevin Phan will become famous soon enough
Re: Strange instance with Arcade Drive

This is not a normal occurrence. This year though there has been a small change from last year with how you get out the joystick values now, the joystick get vi now has two output terminals, one for the joystick axis values and one for the buttons. This means now the values are stored in arrays rather than clusters. This should imply that the vi index array should be used to determine which input to use. However, I would like you to look into the joystick configuration settings on the computer you have the joystick plugged in, there might be something off with its calibrations or how it is determining its axes. If you are still having issues with the joystick, take a screenshot of the LabVIEW code and maybe the configuration settings of the joystick.
__________________
VEX & FRC Student Team Member #357 Royal Assault 2010-2014 "Dare Mighty Things"
2014-2019 Attending Drexel University Major:Electrical Enginnering
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2015, 06:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Strange instance with Arcade Drive

Anytime you cast types, this can happen. From looking at the template code, the assumption is that the joystick's first axis is X and second is Y. Check the cluster element order, and if you don't find the issue, post code or a screenshot.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2015, 11:07
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,113
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: Strange instance with Arcade Drive

If one side's motors are running in the opposite direction from what the code expects, you'll end up with the robot going straight when you want it to turn and vice versa. This will make you think that the X and Y axes are swapped.

Double-check the Invert inputs on the Motor Open. Typically, the right side motors need to be inverted.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2015, 16:41
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: Strange instance with Arcade Drive

I might have to check the cluster list order. I'm assuming 0 is X and 1 is Y from the cluster. Thank you.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote
  #6   Spotlight this post!  
Unread 16-01-2015, 21:51
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: Strange instance with Arcade Drive

Even in default drive code, I'm having to invert the axes to get a normal drivetrain moving. What is with that?
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
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:19.

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