Go to Post Having the foolish belief that you can win a match in which you are completely outgunned will drive you to develop a winning strategy. - OZ_341 [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 05-05-2008, 09:05
Los Frijoles's Avatar
Los Frijoles Los Frijoles is offline
Stormin' Mormon
AKA: Kevin Cuzner
FRC #2062 (C.O.R.E.)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Waukesha, WI
Posts: 27
Los Frijoles has a spectacular aura aboutLos Frijoles has a spectacular aura about
Send a message via AIM to Los Frijoles
Labview: A Ballsorter

Well, I just finished off my first working robot program with LabView and I do have to say: I am now converted. It was really really easy in the whole picture of things and I see some real possibilities for next year. I only wish I was not going off to college next year so I could program the robot this way.

I used a FischerTechnik RoboPro module and building set along with a couple libraries that my teacher pulled out of nowhere to create a marble sorter.

As I was programming, the possibility occoured to me that this might possibly introduce the possibility for a psuedo-multithread-esque program since the NI controller uses something of an FPGA I believe (correct me if I am wrong). I also found that there are some things which I believe to be quite inefficient:
  1. I had to use Case statements to simulate an if () {} sequence
  2. The equivilent of var++ was an add 1 to a value sequence which involved several numeric constants
  3. Sometimes the wires get tangled and are hard to distinguish...is there any way to change the color? Right now it is based on the type of the variable being passed down the wire (green = bool, blue = #)
  4. The control/tools/modules/whatever panel got in the way of programming in the block diagram view and got quite frustrating with having to move it around. Is there any way to circumvent this?

I will probably have video of the marble/ballsorter on youtube tomorrow when I remember to bring my camera to school...
__________________
Community Of Robotic Engineers 2062





Blender totally pwns 3DS Max...

My life is here and here.

Cuznersoft Hardware and Software Development
Reply With Quote
  #2   Spotlight this post!  
Unread 05-05-2008, 10:59
TDohse TDohse is offline
Registered User
AKA: Thomas
no team (NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 39
TDohse is an unknown quantity at this point
Re: Labview: A Ballsorter

Quote:
Originally Posted by Los Frijoles View Post
As I was programming, the possibility occoured to me that this might possibly introduce the possibility for a psuedo-multithread-esque program since the NI controller uses something of an FPGA I believe (correct me if I am wrong).
Whether using a PC or the cRIO multithreading is possible. If you place two loops side by side on your block diagram, they will both execute in parallel in their own thread/task. In many cases, you may naturally end up using multiple threads without really focusing on the issue.
Quote:
  1. The equivilent of var++ was an add 1 to a value sequence which involved several numeric constants
  2. Sometimes the wires get tangled and are hard to distinguish...is there any way to change the color? Right now it is based on the type of the variable being passed down the wire (green = bool, blue = #)
There is an "Increment" block under the "Numeric" palette which would probably have solved your var++ issue more easily. As to the wires, if you right click on a wire and select "Clean Up Wire" LabVIEW will automatically move the wire to a better path.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-05-2008, 11:21
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Labview: A Ballsorter

I typically "close" the function and controls panels and simply right-click (in any white space) to temporarily open them up and find the function/control that I'm looking for. I never leave those panels open but I've seen many LabVIEW programmers with different preferences and styles (all configurable via preferences).

It might make sense to leave a copy of the functions palette open when doing specific tasks (eg the LabVIEW for NXT toolkit since you spend a lot of time in that "directory" when programming for NXT).

I also disable automatic tool selection and use the TAB key to cycle between tools. Maybe newer LabVIEW programmers like to use auto tool selection? Whatever it takes...

When in doubt, right-click. There is a LOT of functionality that is exposed via right-clicking (in white space, on the edges of structures, on terminals, anywhere).

Russ
Reply With Quote
  #4   Spotlight this post!  
Unread 05-05-2008, 16:37
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Labview: A Ballsorter

Quote:
Originally Posted by Los Frijoles View Post
[*]Sometimes the wires get tangled and are hard to distinguish...is there any way to change the color? Right now it is based on the type of the variable being passed down the wire (green = bool, blue = #)
...

I will probably have video of the marble/ballsorter on youtube tomorrow when I remember to bring my camera to school...
Nope, there is no way to change the wire colors. As far as the wires getting jumbled... I believe there is a "Clean Up" button or something to that effect somewhere in the menus... but I'm not sure how far that will get you.

The other thing I've found... wow I wish there was a zoom on Lab View.

Please do take a video!

What controller are you using? Compact RIO?

If so, how'd you get your hands on one?

Cool!

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
Reply With Quote
  #5   Spotlight this post!  
Unread 05-05-2008, 17:14
Sunshine's Avatar
Sunshine Sunshine is offline
Mr. S
FRC #2062 (C.O.R.E)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Wisconsin
Posts: 482
Sunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to behold
Re: Labview: A Ballsorter

The controller that Kevin is using is from Fischertechniks. Kevin is in our Engineering Academy where we use Project Lead The Way (PLTW) equipment.

I wanted Kevin to explore LabVIEW and see if he could help us teach the software during the offseason to other students before he leaves for college.

Kevin has been our lead student programmer the last 2 seasons using C+. Our intent is to use existing hardware that we have available to learn the software. If others would like to try this and have the Fischertechniks Intelligent Interface, This toolkit allows you to control the Fischertechniks Robo Interface and the Fischertechniks Intelligent Interface through LabVIEW..

Good Luck and report back.

Nice work Kevin!
__________________
C.O.R.E. Community Of Robotic Engineers
2015 Wisconsin Regional Champs, Safety Award
2015 Midwest Regional Champs, Safety Award, Industrial Controls Award
2014 Midwest Regional Judges Award
2013 Lake Superior Champs
2012 World Championship Safety Award, World Finalist for the Autodesk Award
2011 Wisconsin Regional - Website Award 10,000 Lakes - Innovation in Control, Safety Award
2010 World Championship - Archimedes Semi-Finalists -World Finalist for the Autodesk Award
2010 10,000 Lakes Regional Champs, Entrepreneurship Award; Wisconsin Regional- Entrepreneurship Award, Safety Award
2009 WI Regional- Quality Award, Safety Award 10,000 Lakes - Safety Award, Motorola Quality Award, Animation Award
2008 World Championship Safety Award
2008 Wisconsin Regional Champs, Safety Award
2008 St. Louis Regional Entrepreneurship Award, Safety Award, Website Award
2007 Wisconsin Regional All-Star Rookie Award
Reply With Quote
  #6   Spotlight this post!  
Unread 05-05-2008, 21:18
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,748
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: Labview: A Ballsorter

Quote:
Originally Posted by Los Frijoles View Post
...
  1. I had to use Case statements to simulate an if () {} sequence
  2. The equivilent of var++ was an add 1 to a value sequence which involved several numeric constants
  3. Sometimes the wires get tangled and are hard to distinguish...is there any way to change the color? Right now it is based on the type of the variable being passed down the wire (green = bool, blue = #)
  4. The control/tools/modules/whatever panel got in the way of programming in the block diagram view and got quite frustrating with having to move it around. Is there any way to circumvent this?
Congrats on your first LV program. You already have some responses, but let me add my own.

1. Case statements aren't really inefficient. They are a more structured, but equivalent way of doing conditional code. You might want to try switching out on numbers, or enums, errors, or strings. All of those work and quickly simplify code used to turn stuff into booleans. You build the ranges of values in the case such as (1..3, 6) and (default) for numbers.
2. As Thomas mentioned, the +1 node will help a bit, but also be sure you aren't using local variables and UI elements on your panel as programming storage. One of the trickier things to unlearn when trying LV, is to avoid naming things and referring to them by name. So, A-->+1-->X, is better than reading A, incrementing, storing back into A, then assigning X from A.
3. The color is tied to the type, similar to syntax coloring in other tools. Using white space to separate and group the wires is usually a more effective technique. Also, if you have many wires, bundle them into a cluster, then unbundle them again later.
4. Currently, LV has many windows, floaters, and menus. It soon becomes second nature to control them, but it can be intimidating at first -- kinda like vi or emacs, or any other editor that has accumulated features over a couple decades.

If you have more specific LV questions, fire away, here or on the ni.com/community/first site.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 06-05-2008, 16:57
Los Frijoles's Avatar
Los Frijoles Los Frijoles is offline
Stormin' Mormon
AKA: Kevin Cuzner
FRC #2062 (C.O.R.E.)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Waukesha, WI
Posts: 27
Los Frijoles has a spectacular aura aboutLos Frijoles has a spectacular aura about
Send a message via AIM to Los Frijoles
Re: Labview: A Ballsorter

Here is the video from it:

http://www.youtube.com/watch?v=4_tsjY-YiPE
__________________
Community Of Robotic Engineers 2062





Blender totally pwns 3DS Max...

My life is here and here.

Cuznersoft Hardware and Software Development
Reply With Quote
  #8   Spotlight this post!  
Unread 13-08-2008, 15:00
stalepretzel59 stalepretzel59 is offline
Registered User
FRC #2129
 
Join Date: Aug 2008
Location: Minneapolis
Posts: 1
stalepretzel59 is an unknown quantity at this point
Re: Labview: A Ballsorter

Frijoles,

Could you please post your source?

For next year's competition, I want to use C, but the captain insists upon LabVIEW. I'd really like to see some quality, working robot code, because so far, I think LabVIEW seems pretty worthless.

Would you mind doing that?

Thanks a bunch!
Reply With Quote
  #9   Spotlight this post!  
Unread 14-08-2008, 14:32
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Labview: A Ballsorter

Mr. Pretzel,

Welcome to Chief Delphi!! You will find many helpful resources here, and tons of people willing to help you out. PM me if you have any questions.


Quote:
Originally Posted by stalepretzel59 View Post
For next year's competition, I want to use C, but the captain insists upon LabVIEW. I'd really like to see some quality, working robot code, because so far, I think LabVIEW seems pretty worthless.
Just curious, what makes you think LabVIEW is worthless? It's the industry standard, and time-wise, can be much more efficient than C. Also, LabVIEW can provide simple ways of doing things that would be much more difficult to do in C. C is old and very basic, while LabVIEW is new and very complex. I don't think that judging it as 'worthless' without even using it is a very wise decision.

Also, while C will be supported now, I believe that in the near future, LabVIEW will be the preferred language, and perhaps even C support could be dropped in the long run. LabVIEW, in many ways, is a more practical programming education for students entering the workforce. I wouldn't be so set in your ways (imho).

Happy Coding!
Jacob
Reply With Quote
  #10   Spotlight this post!  
Unread 14-08-2008, 17:43
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Labview: A Ballsorter

Quote:
Originally Posted by whytheheckme View Post
It's the industry standard, and time-wise, can be much more efficient than C.
I'm really getting frustrated with statements like this. While Labview may be AN industry standard, it is not THE industry standard. Go onto any job hunting website and search positions requiring Labview expertise. Now compare that to what you find for C++. I'm very confident that you will have a large discrepancy in the number of hits you find.

You're certainly entitled to your opinion, but mine is that a good programmer will be able to write circles around someone using Labview. Another engineer on the team I (both skilled programmers) tried the demo at Championship and was amazed at how ridiculously complex it was to do something simple like do a direct mapping of joystick to motor that we could have done in one line of C code (ignoring all of the libraries since both languages have them).

I also think that all of these hoops that you guys are jumping through to post images/videos of your code is ridiculous. Sharing, collaborating, and requesting help should be a simple task. Text based languages are inherently set up for this.

Also, has anyone considered version control? How do you diff two diagrams? How exactly do you plan on having multiple people working on the same file at the same time and then merging them together? If this is industry standard, a solution must exist. Will this be provided to teams using Labview?

I will go so far as to say that version control is more industry standard than Labview. Why isn't there a push to educate teams on this subject?

I'm sure there are teams that are going to do some wonderful things with Labview, but you won't see it coming from us.
Reply With Quote
  #11   Spotlight this post!  
Unread 14-08-2008, 17:46
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Labview: A Ballsorter

After posting, I want to be sure to not hijack this thread. I think that Frijoles did a nice job on his project and don't want to take away from that. I would encourage him and others to continue to educate themselves on Labview and its relevant uses.
Reply With Quote
  #12   Spotlight this post!  
Unread 14-08-2008, 18:07
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Labview: A Ballsorter

Quote:
Originally Posted by Dave Scheck View Post
I'm really getting frustrated with statements like this. While Labview may be AN industry standard, it is not THE industry standard. Go onto any job hunting website and search positions requiring Labview expertise. Now compare that to what you find for C++. I'm very confident that you will have a large discrepancy in the number of hits you find.
Someone else brought this issue up with me over PM. I didn't intend for my statement to sound like LabVIEW is REPLACING C (or any other language for that matter), but in the industry of data acquisition (which is a major part of the robotics industry), NI and LabVIEW is a leading technology. My point wasn't that LabVIEW beats out C or any other language, but that LabVIEW isn't some simpleton's tool. LabVIEW has awesome potential to do many things, and because it's so widely used, it's not 'worthless'.

I'm sorry if I made it sound like LabVIEW replaces any language in the global job market; what I intended to say was that for it's field (data acquisition), it is a leader, and in many ways, can be superior.

Sorry for the confusion,
Jacob
Reply With Quote
  #13   Spotlight this post!  
Unread 14-08-2008, 18:56
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Labview: A Ballsorter

Quote:
Originally Posted by whytheheckme View Post
I'm sorry if I made it sound like LabVIEW replaces any language in the global job market; what I intended to say was that for it's field (data acquisition), it is a leader, and in many ways, can be superior.
No worries. I also apologize if you took any of that personally. It wasn't my intention to jump on you or your opinions. I just don't want people to get the idea that Labview is the magic bullet that will solve programming woes.

To be fair, I did poke around on YouTube and watched a few tutorials and saw some cool data acquisition demos. I personally still think there are too many cons to do the rapid development that we're accustomed to with the FIRST program, but that's just me.

Like I said before, if this works for you great. Do some cool things with it and be proud of your accomplishments. After all, that's really what this program is about, right? Inspiration and education (although some may disagree).
Reply With Quote
  #14   Spotlight this post!  
Unread 14-08-2008, 19:32
Michael Hill's Avatar
Michael Hill Michael Hill is offline
Registered User
FRC #3138 (Innovators Robotics)
Team Role: Mentor
 
Join Date: Jul 2004
Rookie Year: 2003
Location: Dayton, OH
Posts: 1,567
Michael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond repute
Re: Labview: A Ballsorter

You think programming a robot is bad, try writing software for data acquisition and review for a research facility. This is some stuff I've helped "write". (btw, I put "write" in quotes because I don't believe LABView is actually writing code...it's just me.) Of course the code is some proprietary stuff, but I can show you the end result. What the first one is doing is part of our facility data acquisition system. It monitors our test environment from the temperature outside to the pressures, etc. The second one allows us to plot and view data that's already been taken. Also, if anyone here ever needs help with LABView, I can help. Just PM me or get a hold of me on AIM: mahill2006. AIM is probably faster.



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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labview tseres Programming 2 23-05-2007 00:27
Labview GUI Booger NI LabVIEW 3 11-08-2006 11:05
LABView Error TuaMater LabView and Data Acquisition 1 20-01-2006 02:58
Labview Phreakuency LabView and Data Acquisition 6 14-01-2006 01:14
LabVIEW 8 Serial? amateurrobotguy National Instruments LabVIEW and Data Acquisition 2 13-01-2006 00:33


All times are GMT -5. The time now is 08:34.

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