Go to Post I want to help them to get what's made such a difference to me... - Beth Sweet [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 11-02-2012, 12:05
2829ron 2829ron is offline
Registered User
FRC #2829
 
Join Date: Jan 2009
Location: USA
Posts: 92
2829ron will become famous soon enough2829ron will become famous soon enough
Re: paper: LabVIEW Mecanum Programming

Thanks for all your help. I've got a few more questions here, and then I think I'll have it.

Do I need to create a global variable called "header"? If so, what properties does it need to have?

And... what is connected to the PID on page 15?

Thanks again,

David
Reply With Quote
  #17   Spotlight this post!  
Unread 11-02-2012, 22:04
Jogo Jogo is offline
Registered User
FRC #0353 (Pobots)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2007
Location: NY
Posts: 83
Jogo is on a distinguished road
Re: paper: LabVIEW Mecanum Programming

Hello David. You do need to add a global variable called "header" (numeric), which is used to store the gyro angle each time rotate_mode changes to "straight".

For tuning the PID function, first right click on the "PID gains" terminal and add a control or a constant, and follow the instructions on page 16. There are plenty of good resources around the web for PID tuning specifics: http://zone.ni.com/devzone/cda/tut/p/id/3782.

If you have more implementation-specific questions, feel free to PM me.
Reply With Quote
  #18   Spotlight this post!  
Unread 29-02-2012, 11:53
Ernesto Ernesto is offline
Registered User
FRC #4349
 
Join Date: Feb 2012
Location: Oklahoma City
Posts: 1
Ernesto is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

Ok My names Ernesto
I am still stuck on the global header and would like to ask if you could explain more on how to make it.
Reply With Quote
  #19   Spotlight this post!  
Unread 03-04-2012, 13:19
mjgard's Avatar
mjgard mjgard is offline
Michael
AKA: Michael Gard
FRC #2844 (Stampede Robotics)
Team Role: Teacher
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Laveen,AZ
Posts: 74
mjgard will become famous soon enough
Re: paper: LabVIEW Mecanum Programming

I am also trying to figure out the global variable header. I wasnt sure where to create it or how. So i created a numeric and then create a local variable from the numeric and called it header and used that within my teleop code. Will this work or do i need to create a global somehow?
__________________
Michael
Stampede Robotics Mentor
FRC 2844

2012 Arizona Regional --Judges' Award
2012 Las Vegas Regional -- Regional Winners
2012 Las Vegas Regional-- Coopertition Award
2009 Arizona Regional -- Rookie All Star Award
Reply With Quote
  #20   Spotlight this post!  
Unread 03-04-2012, 13:41
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: paper: LabVIEW Mecanum Programming

The Robot Global Data.vi is where you create global variables (if you need them). It's only a front panel, with no block diagram. Place (or paste) a control of the appropriate type on the front panel, then right-click it and make its label visible if it isn't already. Change the label to whatever name you want the global variable to be.

To use a global variable, you can either copy one from elsewhere, or use the "Select a VI" item in the function palette to pick the Robot Global Data. You'll end up with something on your block diagram with a popup menu that lets you choose among all the globals. You can use the right-click menu to make it a "read" or a "write".
Reply With Quote
  #21   Spotlight this post!  
Unread 15-05-2012, 19:18
xule xule is offline
Registered User
no team
 
Join Date: Mar 2008
Location: long beach
Posts: 9
xule is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

I followed the directions (somehow I must have missed something).







Last edited by xule : 15-05-2012 at 19:25.
Reply With Quote
  #22   Spotlight this post!  
Unread 15-05-2012, 21:05
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: paper: LabVIEW Mecanum Programming

Quote:
Originally Posted by xule View Post
I followed the directions (somehow I must have missed something).
If you double-click on the error, it should take you to the Case structure having the missing cases.

There are only two Case structures, right? The inner Case structure (inside the outer Straight case) should contain the True case you showed, along with an empty False case. The outer Case structure should contain a case for every possible value of the Rotation_mode enumeration. You're only showing us the Straight and L1 cases. Are any of the others missing?
Reply With Quote
  #23   Spotlight this post!  
Unread 15-05-2012, 23:49
xule xule is offline
Registered User
no team
 
Join Date: Mar 2008
Location: long beach
Posts: 9
xule is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

L2,R2,and R1 are there as laid out in Step 4, same structure as L1 just different constant for rotation.

[IMG][/IMG]

[IMG][/IMG]

double clicking highlights the whole structure.
Reply With Quote
  #24   Spotlight this post!  
Unread 16-05-2012, 07:44
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,825
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: paper: LabVIEW Mecanum Programming

Is there a blank in the enumeration list?
Sorry, I can't see your posted images. They get blocked where I am.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-05-2012 at 08:01.
Reply With Quote
  #25   Spotlight this post!  
Unread 16-05-2012, 07:57
xule xule is offline
Registered User
no team
 
Join Date: Mar 2008
Location: long beach
Posts: 9
xule is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

Thanks, that was it. A blank space in the enumerated list.
Reply With Quote
  #26   Spotlight this post!  
Unread 16-05-2012, 08:06
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: paper: LabVIEW Mecanum Programming

Quote:
Originally Posted by xule View Post
double clicking highlights the whole structure.
You mean the outer Case structure, the one having Rotation_mode as its selection input, right?

Double-check the list of possible values of Rotation_mode. Make sure there are only the five you expect. You might accidentally have inserted an unnamed value at the end.
Reply With Quote
  #27   Spotlight this post!  
Unread 16-05-2012, 08:33
xule xule is offline
Registered User
no team
 
Join Date: Mar 2008
Location: long beach
Posts: 9
xule is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

Thanks, that was it. Program runs.
Reply With Quote
  #28   Spotlight this post!  
Unread 22-11-2012, 16:18
Priyesh69 Priyesh69 is offline
Registered User
FRC #3988
 
Join Date: Nov 2012
Location: montreal
Posts: 46
Priyesh69 is an unknown quantity at this point
Re: paper: LabVIEW Mecanum Programming

Quote:
Originally Posted by Alan Anderson View Post
It's not exactly obvious how to place a reference to an existing global variable. Here's how to do it:

Right-click on an empty spot in the block diagram to call up the function palette. Choose "Select a vi..." and navigate to the folder containing your robot project. Open "Robot Global Data.vi" and you'll have a global variable attached to your cursor (it will likely be named "Enable Vision" -- don't worry about it). Click to place that variable on the block diagram. Now you can click on the middle of the variable to bring up a list of all the globals that are part of the Robot Global Data vi. Choose the one you want.

The default is to make a "write" reference. To change it to "read", right-click on the variable and choose "Change To Read".
I dont get how we do the stuff for the 9th slide, I mean i can't do ctrlE on the Gobal robot data. I'm accessing it by the projet explorer. I can acces the front panel but not the block diagram

Last edited by Priyesh69 : 22-11-2012 at 16:22.
Reply With Quote
  #29   Spotlight this post!  
Unread 22-11-2012, 18:27
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,825
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: paper: LabVIEW Mecanum Programming

There is no Block Diagram for Global Data, so ignore that.
  1. Open the Global Data.vi (front panel) since you already discovered how from the Project Explorer.
  2. Right-click to get the front panel menu, choose an Enum control and place it on the Global Data.vi front panel.
  3. Follow the rest of the powerpoint directions.
Here is a simple step-by-step guide to adding global variables in general: CreateGlobal.PDF
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-11-2012 at 18:39.
Reply With Quote
  #30   Spotlight this post!  
Unread 13-08-2014, 12:10
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: LabVIEW Mecanum Programming

We purchased a Mecanum kit as an off-season project and played with the code last night. I believe there are some errors in the code, that I thought I would post here in case others also did not get the results expected.

First, let me thank you for taking the time to develop this, it was a huge asset with trying to get students to get the code working.

Now to the issues.

On page 14, I believe the feedback node needs to be outside of the case structure for "Straight"... What we saw is that the only way you can get into the "Straight" structure is for the rotate_mode to be equal to "Straight" and therefore the feedback node can only be equal to "Straight" and since they never not equal each other, you never update the "Header" value.

When you add the PID on page 15, the PID now will unwind whatever rotation you do, because the Header is not updated, and stuck at the default, which we set to 0. So spin the bot 3 times CCW, and the let go of the sticks, the PID runs the 3 times CW and stops.

The simple fix for this is to move the feedback node out, and the header updates correctly.

On slide 17, when you add the case structure to make sure the rotate momentum is less than 10, this also breaks Header updating. As written the Header can only update the first loop after you took your finger off the sticks, so if you are spinning faster than the 10, the Header will not update, and if spinning slower than 10, you really didn't need this case anyways....

I have not fixed this one yet. It seems we almost need another enumeration state.. Say the joysticks put you in a "WaitingForStraight" and the case structure for WaitingForStriaght would check that rate less than 10 while sending 0 to the rotation, once the rate is less than ten we would write Straight to the "Rotate_Mode"

I'll post back in a couple weeks on this fix, and debugging of page 21.
__________________
The sooner we get behind schedule, the more time we have to catch up.

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 05:45.

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