Go to Post I'm 5'5", and I'm our team's drive coach. Our drivers are nearly always taller than me. In my case, it's not the driver's station that needs to be made of lexan...it's our drivers. - StephLee [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 10-01-2013, 21:42
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
Re: General LabVIEW questions from a VERY new user

Quote:
Originally Posted by propionate View Post
I am not 100% sure as to why the axes information is being put into another array, but it looks like unnecessary code to me. I haven't opened up LabVIEW 2013 yet - is this code part of the default project, or did you add it in from a tutorial online?
That was the actual code it starts with when you make a new cRIO project. I didn't edit it in any way, just moved some things around, screenshot, and edited in paint.
What is it even putting INTO an array? The axis values? If so, I'll just delete and ignore that part of the provided example code

Quote:
Once again, I haven't looked at the vision processing VI, but typically it just holds the code for getting the video input from the camera and sending it to the driver's station. You can add in vision tracking code here - usually we are given this (basically all the work is done for you) in a separate VI, but I'm not sure where it is. Some teams choose to do their vision tracking on a separate onboard computer, or send the video data to the driver's station and do the vision processing there.
If there is a vi that already does this (or even has SOME code to get started like all the other vi's) I'd DEFINITELY get that. I'll look around for it

Thanks to both of you guys for the help. Right now I'm just trying to work my way through all of the example code provided by making a new cRIO project. As I slowly come to understand it all, I'm modifying it to fit my situation this year, like changing it from 2 joysticks each with 2 axes, to 1 joystick with 4 axes

Which brings me to my Third question:
When working with the axes of a joystick, how do I change the 3rd and 4th axes to "Axis 3 (x)" and "Axis 4 (y)" instead of the default "Axis 3 (Throttle)" and "Axis 4"? The reason I need to do this is because I'm using the controller linked in the OP, which LabVIEW picks up as ONE joystick, but it has 2 analog sticks, so the left will be Axes 1 and 2, and the right will be Axes 3 and 4.

Question 4:
So I know a cRIO Robot Project is the code you make, deploy to the cRIO, then run on a computer that's in communication with the cRIO.
But what would I need to use a Dashboard Project for? Would that just be for if I wanted to add another feature to the dashboard/driver station windows?
__________________
Team 3753 BulahBots
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2013, 21:57
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: General LabVIEW questions from a VERY new user

Quote:
Originally Posted by ctccromer View Post
That was the actual code it starts with when you make a new cRIO project. I didn't edit it in any way, just moved some things around, screenshot, and edited in paint.
What is it even putting INTO an array? The axis values? If so, I'll just delete and ignore that part of the provided example code
It is putting the axis values of the joystick into a SmartDashboard array which is sent to the dashboard.

Quote:
If there is a vi that already does this (or even has SOME code to get started like all the other vi's) I'd DEFINITELY get that. I'll look around for it
Documentation on the Vision Processing example is here (I highly recommend reading all of it except the C++/Java code part, don't just skip to the LabVIEW code section): http://wpilib.screenstepslive.com/s/3120/m/8731

Quote:
Which brings me to my Third question:
When working with the axes of a joystick, how do I change the 3rd and 4th axes to "Axis 3 (x)" and "Axis 4 (y)" instead of the default "Axis 3 (Throttle)" and "Axis 4"? The reason I need to do this is because I'm using the controller linked in the OP, which LabVIEW picks up as ONE joystick, but it has 2 analog sticks, so the left will be Axes 1 and 2, and the right will be Axes 3 and 4.
You can't easily change those labels, but the parenthetical is informative, it doesn't effect program operation. As a note, on many controllers (X-box controllers and at least some Logitech controllers) the second stick is not axis 3 and 4 because of things like the D-pad and/or analog triggers. You may have to experiment here, or put some indicators on the values for all the axes then run your program from your PC to figure out what maps to what

Quote:
Question 4:
So I know a cRIO Robot Project is the code you make, deploy to the cRIO, then run on a computer that's in communication with the cRIO.
But what would I need to use a Dashboard Project for? Would that just be for if I wanted to add another feature to the dashboard/driver station windows?
Correct, a dashboard project is if you want to create a modified version of the dashboard program that runs on the PC. You cannot modify the Driver Station software.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2013, 22:08
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
Re: General LabVIEW questions from a VERY new user

I added the vision processing walkthrough to my favorites already and will look at that as soon as I get our camera up and running (have another thread about that)

And I was not aware about the axis thing. When I tested the buttons (booleans) today, the following parts of the controller did not register:
The left and right analog sticks obviously, the left and right triggers, and the d-pad.
Does it consider the left and right triggers as 1 axis each then?
And what does it consider the 8-way D-pad? My teacher and I were discussing it today and were kind of surprised it didnt show up as any of the 12 buttons. It seems like it would be a button/boolean value rather than a full axis
__________________
Team 3753 BulahBots
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2013, 22:22
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,795
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: General LabVIEW questions from a VERY new user

The triggers on game controllers are axis.
You can depress them halfway for half power.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 10-01-2013, 22:26
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: General LabVIEW questions from a VERY new user

Both directional pads and analog triggers usually show up in strange ways.

Analog triggers are typically mapped to a single axis for both. The axis will read 1 for 1 trigger fully depressed, -1 for the other and 0 for both. Partial depression of a single trigger will read a value between 0 and the extreme (1 or -1). Partial depression of both triggers will read something, or 0 (I recommend not having a control scheme that does this).

D-pads show up in different ways depending on the controller, but also typically map to an axis. This thread has a mapping for the F310 in it: http://www.chiefdelphi.com/forums/sh...ighlight=d-pad
Reply With Quote
  #6   Spotlight this post!  
Unread 10-01-2013, 23:13
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,751
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: General LabVIEW questions from a VERY new user

Most of the questions seem to have been answered, but as to the incomplete description of the various functions, the diagram of Robot Main contains a large string constant with just such a description.

If you really decide you need to change the name of a cluster element, you cast it to a different cluster. The Cast function looks like forcing a square peg through a round hole. As noted, this is largely a cosmetic thing. Names of elements serve as documentation and little else.

Greg McKaskle
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 10:44.

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