Go to Post Read the manual. Know the manual. Love the manual. - Koko Ed [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 27-01-2016, 17:41
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 5
Benson3292 is an unknown quantity at this point
Help please!

We are a team that has never really done well in programming. We have went through and programmed some and wondering if we are doing it right. Would you please look at the programming and see if it will work!

Benson First Robotics

Begin VI
Attached Thumbnails
Click image for larger version

Name:	Begin VI.png
Views:	60
Size:	115.6 KB
ID:	19890  Click image for larger version

Name:	Teleop VI.png
Views:	46
Size:	142.3 KB
ID:	19891  Click image for larger version

Name:	Finish VI.png
Views:	39
Size:	133.7 KB
ID:	19892  
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2016, 17:44
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Help please!

I don't immediately see anything wrong, are you having problems?
__________________
2015 MAR District Champions




Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2016, 21:44
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 5
Benson3292 is an unknown quantity at this point
Re: Help please!

We haven't been able to run our program yet. Hoping to try on the simulator tomorrow. We have set our goals high this year to have a working robot before we go down to the competition and it seems like it is going too easy. We are concerned because on the teleop vi we had orange dots show up on the t/f indicator.
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2016, 10:20
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Help please!

The orange (red) dots mean you're forcing a TypeCast. They serve as a warning of "Hey, I'll convert this data for you, but it might not be right in the end."

How did you create those Forward and Reverse Enums?

You should right click on the Solenoid Set and click Create -> Constant.

From there, copy and paste to the left of your T/F selector and then select the constant you want.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2016, 11:22
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 123
aeastet is an unknown quantity at this point
Re: Help please!

The dot mean that the program is converting from one data type to another. They are compatible but something is different. It was developed to make you aware because this conversion takes time for executing the code. If you have coercion dots it will take longer for your code to execute.

Here is what the help file from NI says:

Eliminating Coercion Dots to Maintain Accuracy and Optimize Memory Usage
Coercion dots can affect memory usage or overall performance of a VI in the following ways:

Type definition coercions—If you wire an instance of a type definition to an object that does not link to the same type definition, the VI may generate inaccurate results.
Scalar numeric coercions—If you manipulate different numeric types, LabVIEW coerces the data types to match. When this coercion occurs, the VI may generate inaccurate results.
Large array coercions—If you coerce the data type of a very large array, the VI may use a large amount of memory and take longer to execute.

If you have more questions we are here to help.
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2016, 11:55
Thoth_1 Thoth_1 is offline
Registered User
FRC #2373
 
Join Date: Jan 2016
Location: Oklahoma
Posts: 3
Thoth_1 is an unknown quantity at this point
Re: Help please!

Right now you have an arcade drive programmed with a tank drive name on it. It will still work if you want arcade drive (at least I think so) but if you want tank drive you will need to open another joystick in the begin.vi as well as program the joystick in the teleop.vi, for tank drive you will only need the second axis from the dropdown (this is the y-axis value of the joystick whereas the first axis is the x-axis) here are some screenshots for how I did it for my team.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	18
Size:	52.0 KB
ID:	19900  Click image for larger version

Name:	Capture 2.PNG
Views:	16
Size:	22.5 KB
ID:	19901  
Reply With Quote
  #7   Spotlight this post!  
Unread 28-01-2016, 12:05
Thoth_1 Thoth_1 is offline
Registered User
FRC #2373
 
Join Date: Jan 2016
Location: Oklahoma
Posts: 3
Thoth_1 is an unknown quantity at this point
Re: Help please!

Also, your left side motors are inverted while your right ones are not, again not really sure if that is intentional or not but if you don't want them to be inverted just toggle the t/f box on the inversion.
Reply With Quote
  #8   Spotlight this post!  
Unread 28-01-2016, 14:04
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Help please!

Quote:
Originally Posted by Thoth_1 View Post
Right now you have an arcade drive programmed with a tank drive name on it. It will still work if you want arcade drive (at least I think so) but if you want tank drive you will need to open another joystick in the begin.vi as well as program the joystick in the teleop.vi, for tank drive you will only need the second axis from the dropdown (this is the y-axis value of the joystick whereas the first axis is the x-axis) here are some screenshots for how I did it for my team.
I have a feeling they're using a game pad. Not too many joysticks have over 3 axes (X,Y, Throttle, Twist are the most common I know of). Good catch though, you might have caught something.

Quote:
Originally Posted by Thoth_1 View Post
Also, your left side motors are inverted while your right ones are not, again not really sure if that is intentional or not but if you don't want them to be inverted just toggle the t/f box on the inversion.
That's very common if you wire your motor controllers with red motor lead going to M+ and black motor lead going to M-. All this does is invert the output. Probably not a mistake.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #9   Spotlight this post!  
Unread 28-01-2016, 16:37
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 5
Benson3292 is an unknown quantity at this point
Re: Help please!

We are going to try and use an Xbox 360 controller to run the robot.
Reply With Quote
  #10   Spotlight this post!  
Unread 28-01-2016, 17:03
Benson3292 Benson3292 is offline
Registered User
FRC #3292
 
Join Date: Feb 2015
Location: Benson
Posts: 5
Benson3292 is an unknown quantity at this point
Re: Help please!

We were able to fix the coercion dots. Thank you all for the help! I know there is a way to test the code on the simulator. Is there a way to do this?

Thank you all again!
Reply With Quote
  #11   Spotlight this post!  
Unread 29-01-2016, 12:37
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Help please!

Quote:
Originally Posted by Benson3292 View Post
We were able to fix the coercion dots. Thank you all for the help! I know there is a way to test the code on the simulator. Is there a way to do this?

Thank you all again!
Maybe. The LabVIEW simulator is pretty limited in what you can add and remove to your robot without digging in to XMLs, CAD, etc...

Check out Tutorial 10 - Robot Simulation on the Tutorials tab of the LabVIEW Getting Started Window.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
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:26.

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