Go to Post its kind of a bad idea to implement traction control when you have no traction in the first place. - Uberbots [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 29-12-2013, 20:50
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
20 Minute LabVIEW presentation

I am giving a LabVIEW presentation at kickoff. I was wondering what you guys think I should add to my presentation that I can cover in 20 Minutes. How have you guys seen LabVIEW presentations done? Most of the teams will be completely new to programming and some have had some experience.

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 30-12-2013, 01:22
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: 20 Minute LabVIEW presentation

During my time as a FIRST student our team used C/C++ and never really bothered with LabVIEW. This was mainly due to ignorance on our part. The only graphical programming anyone had seen was either EasyC or Mindstorms.

The coolest featured that I have seen in LabVIEW so far (this my first year playing with LabVIEW for FRC) is the ability to quickly run code in memory, and how easy it is to write quick test code with graphical feedback. Having a chart or two on the front panel to test and plot real time sensor data is quite powerful.

Having some sort of autonomous routine with a fancy front panel could be a good demonstration, and may even convince some teams to take a second look at LabVIEW as an option.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-12-2013, 01:43
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: 20 Minute LabVIEW presentation

Quote:
Originally Posted by kgzak View Post
I am giving a LabVIEW presentation at kickoff. I was wondering what you guys think I should add to my presentation that I can cover in 20 Minutes. How have you guys seen LabVIEW presentations done? Most of the teams will be completely new to programming and some have had some experience.

Thanks
A few points you could try to touch on. These are more of the finer points of labview, not actually really concepts that apply to other languages.

1) Local variables (and global to an extent) are made of pure evil. They seem fast and fun when writing code, but they aren't. Each write and read clones the value in memory (at least in Windows/Linux/OSX), I don't know about cRIO but its just a 'best practice thing''. They're bad, don't use them. They make debugging your code harder, and cause extra memory usage (also sometimes labview just doesn't track where locals and global are being read/write, so you may have a errant write in an unexpected location).

3) SubVI's, and why you should you them. Don't make a huge mess of spaghetti code. SubVI's help keep you organized.

3.5) Comments, graphics may seem simple compared to some of the magic that languages like haskell or perl can do, but you NEED TO HAVE THEM.

4) Different forms of SubVI execution. This is VERY important since sometimes just leaving normal execution will prevent recursion and sometimes cause weird behavior.


Normal Execution, this slightly sucks, and may under some circumstances clone the output of a previous calls to this subVI again. So yes you call this VI in 2 difference places with 2 difference inputs and it will output the same thing twice... Not particular handy. But it does limit the function to existing once in memory.

Shared Clone is used if you want to call a sub-VI recursively. It allows for a VI to be self referencing, if you don't execute like this the VI will break the block diagram if you nest it recursively.

Pre-Allocated is generally the way to go (sorta, not completely the best memory efficiently). This (I believe) creates a separate instance of each function in memory so it means you'll never run into the rare normal execution cloning error.
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 31-12-2013 at 01:47. Reason: included comments.
Reply With Quote
  #4   Spotlight this post!  
Unread 31-12-2013, 11:46
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: 20 Minute LabVIEW presentation

Quote:
Originally Posted by XXShadowXX View Post
1) Local variables (and global to an extent) are made of pure evil. They seem fast and fun when writing code, but they aren't. Each write and read clones the value in memory (at least in Windows/Linux/OSX), I don't know about cRIO but its just a 'best practice thing''. They're bad, don't use them. They make debugging your code harder, and cause extra memory usage (also sometimes labview just doesn't track where locals and global are being read/write, so you may have a errant write in an unexpected location).
Be careful when giving this advice. I agree, with one exception. When you are coding in the WPILib framework, you need to use global variables and can't be afraid of them. The reason for this is that if you are coding the right way, you will be doing a lot of communicating between Teleop.vi and Periodic Tasks.vi. By far the most practical way of doing this communication is via globals. There are also other good uses for globals, such as using one to create a sort of fake enum for all of your refnum names.

Also, 20 minutes is not a lot of time to teach a bunch of beginners about LabVIEW, and things get even more complicated when you have some experience in the mix that you don't want to bore. My recommendation would be to not even bother trying to touch upon how to actually code, instead just link them to guide that will teach them how like this one. Your time would be better spent talking about the LabVIEW environment and WPILib framework. Talk about some good overarching principles like data flow and documentation and good debugging practices. Make sure they know how important it is to establish a good way to share code, giving SVN, GitHub, and email/flashdrives as examples. And most importantly, make sure they know where to look for help when they need it (Chief Delphi would probably be a good place).
Reply With Quote
  #5   Spotlight this post!  
Unread 02-01-2014, 17:54
mrscience21's Avatar
mrscience21 mrscience21 is offline
Joe Sandoval
AKA: Joe S.
FRC #3859 (Wolfpack Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Elk Grove, CA
Posts: 14
mrscience21 is an unknown quantity at this point
Smile Re: 20 Minute LabVIEW presentation

I agree with Paul T, 20 minutes is not a lot of time for a labVIEW tutorial. I have been teaching a set of new programmers and have found that in order to do it well you need a much longer amount of time, allowing questions to be answered along the way. In any case, if you are mainly reaching out to new programmers, please make sure you cover a couple of things (Hopefully without repeating someone in the comments above, sorry if I do.):

1. Type Defs, Clusters, and Arrays: I have found that these specifically confuse new programmers quite often. That's a big problem too, since these data forms are used frequently, especially in WPI Lib Functions. Not to mention they are very useful once mastered and can minimize memory usage.

2. Robot Data Flow: This one is critical. A good understanding of Data flow through out RobotMain.vi, the robot and dashboard, and even the flow between the C-RIO and other components can save tons of headaches later. ( This can be as simple as ensuring they understand begin operates before teleop and etc.)

3.Construction of a basic drive system: From "begin" to "finish", this may be the most important thing you can do.

4. Disable.vi and safety configurations: I frequently see new programmers leave these alone, resulting in a flood of errors that can very easily be avoided.

If you wouldn't mind the suggestion, I would hold off on doing an autonomous program but instead demonstrate the construction of a basic drive program from start to finish. Autonomous may be more interesting to watch but it is Teleop new teams will have to worry about. Plus, construction of a complete drive system is capable of demonstrating how the all the subVI's in the system work together to accomplish a single task - moving that robot. In the short amount of time given, I realize you wouldn't be able to do a full explanation of how the system works, but I've found that giving them a basic over view of how and why it works provides them a foundation from which they can expand their knowledge.

If you have more time, please also consider talking a bit about sensors and how to use them. From personal experience I realize the demonstration alone could eat up all your time but this is yet another topic I see a lot of younger programmers over complicate or mess up entirely. Good Luck!
__________________
Joe Sandoval
Wolfpack Robotics FIRST Team 3859
Department of Programming and Electrical Engineering


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 21:01.

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