Go to Post I think we have officially reached the stage of having too much time on our hands. - 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-02-2012, 17:01
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
Team Fusion 364 2012 Code

Here's our code for this year. I've striven for good, well documented code that is highly efficient this year. Of course with the build season rush, we didn't document it very well at the time, but now that we've had some time to relax, we've documented it, color coded it, and changed a few small things. Now we are in the position to test it to make sure everything still works.

Anyway, here's the code if anyone is interested. I was a LabVIEW Developer (not certified) for my internships over the past few years, so I'm pretty experienced at this point.

2012 Robot Code (Cleaned) 2-24-12.zip

I'd love to hear feedback, or questions regarding the code.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #2   Spotlight this post!  
Unread 27-02-2012, 20:11
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Team Fusion 364 2012 Code

Wow! Your code is quite professional and certainly highly sophisticated at first glance. I'll be taking a closer look tonight and seeing if I can't learn anything from it!
Reply With Quote
  #3   Spotlight this post!  
Unread 29-02-2012, 15:08
Doc Wu's Avatar
Doc Wu Doc Wu is offline
Registered User
AKA: Al Gritzmacher
FRC #1507 (Warlocks)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Lockport NY
Posts: 207
Doc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant future
Re: Team Fusion 364 2012 Code

Very impressive code. I'm hoping to learn a lot from it.

You use a lot of flat sequences in both begin.vi and teleop.vi. They are single frames that seem to group subsystems together and make the code very easy to read, but is there more to them than that? Why not just a decorative frame? Or do you want each subsystem to execute together?

Our teleop.vi, for example and most others I've seen, are just one big mess of code.

I'd be interested to hear your reasons behind this.
__________________
-= Mentor Lockport Warlocks -=- Team 1507 =-
Amateur Radio Callsign: AE2T

2016 Robot Inspector - Fingerlakes, Pittsburgh
2015 Robot Inspector - Pittsburgh, Champs. Judge Observer - Champs
2014 Robot Inspector - Tech Valley, Fingerlakes, Buckeye, Championship
2013 Robot Inspector - Fingerlakes, Buckeye, Championship
2012 Robot Inspector - Fingerlakes, Buckeye, Championship - Website Evaluator - Fingerlakes, Buckeye, Championship
2011 Robot Inspector - Fingerlakes 2011 Safety Advisor - Fingerlakes

Reply With Quote
  #4   Spotlight this post!  
Unread 29-02-2012, 19:16
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: Team Fusion 364 2012 Code

Quote:
Originally Posted by Doc Wu View Post
Very impressive code. I'm hoping to learn a lot from it.

You use a lot of flat sequences in both begin.vi and teleop.vi. They are single frames that seem to group subsystems together and make the code very easy to read, but is there more to them than that? Why not just a decorative frame? Or do you want each subsystem to execute together?

Our teleop.vi, for example and most others I've seen, are just one big mess of code.

I'd be interested to hear your reasons behind this.
The flat sequences serve no purpose other than to just separate subsystems, which could be done with decorative frames. I generally don't like using decorative frames as they aren't as modular as the flat sequence. I can simply click and drag flat sequences to move them. Nothing wrong with using decorative blocks though. It probably adds a little overhead, but it's not much.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #5   Spotlight this post!  
Unread 29-02-2012, 19:35
plnyyanks's Avatar
plnyyanks plnyyanks is online now
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Team Fusion 364 2012 Code

I'm impressed with your code. It looks really well done (and well documented, which is almost as important). Kudos to your team for some nice software. One question: in your autonomous, was there any reason for using a bunch of sequential while loops instead of using a state machine(s)? Maybe it's just me, but I tend to prefer state machines for this kind of thing - we have many in our code....
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #6   Spotlight this post!  
Unread 01-03-2012, 00:18
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: Team Fusion 364 2012 Code

Quote:
Originally Posted by plnyyanks View Post
I'm impressed with your code. It looks really well done (and well documented, which is almost as important). Kudos to your team for some nice software. One question: in your autonomous, was there any reason for using a bunch of sequential while loops instead of using a state machine(s)? Maybe it's just me, but I tend to prefer state machines for this kind of thing - we have many in our code....
The student that did it went off of the demo autonomous code. It's in multiple while loops because of the safety configuration for the drive motors. If a value is not fed within 100ms, the motors will cut off. Since we're driving the motors for longer than 100ms in each pass, the motors would error out and cease to work. It's easier to see sequentially like the way it's done. State machines are often hard to follow in LabVIEW since they will most likely involve a case structure, which will hide code from you.

He could have just disabled the safety config on it, but in the long run, it doesn't matter either way.
__________________
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 11:23.

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