How to get better (advanced programming) LABVIEW

Hi everyone,

Im a high school teacher and fourth year mentor of a FRC team. As soon as I joined the team, I was in charge of the programming despite having little to no experience with programming (only 2 courses in university). I learned to use Labview by studying past codes made by old students and watching countless hours of youtube videos. Im at a point where I want our team to be more competitive, but for this I will need to take a huge step in the programming of the robot.

Here’s what I know how to code:

  • DriveTrain
  • Shooter/Lifts
  • Solenoid
  • Limit switch and potentiometer
  • Using time in autonomous mode

Here’s what I would like to achieve next year:

  • Coding swerves (we have them, I just don’t know how to code them…)
  • Vision processing (maybe limelight?)
  • Coding autonomous mode that doesn’t work with time…

So finally, here are my questions:

  1. How should I go about learning these notions? Haven’t been able to find lots of information when it comes to advanced programming.
  2. Is Labview a good tool for what I want to achieve? Should I switch to JAVA or CPP before learning all these news things?

I would really like to know what helped you take the next step!

Thank you very much,

P.S We have a mechanical engineer helping us with the construction of the robot, but no one regarding programming. We’re located in Montreal/Quebec/Canada.

GitHub - jsimpso81/FRC_Secret_Book_Of_FRC_LabVIEW_2: Secret book of FRC LabVIEW version 2.x is a good place to look if you haven’t seen it yet.

Actually all of jsimpo’s github repositories are worth a look, he’s got some phenominal resources and libraries for labview teams.

1 Like

Switching to Java will almost certainly make this stuff way easier to do, if only because there are many many times as many teams using Java as there are using LabView so help is much more easily-accessible.

You may want to join the FRC discord, which has a very active programming channel.

4 Likes

Switch to Java.

There aren’t enough C++ & Labview examples out there to reasonably “learn from others”. You need to do a lot of it on your own. Which is fine if that’s what you are into and want to learn. But if you are prioritizing results, Java is the way to go currently.

As for learning, browse github repos posted by teams. A lot of great teams post their code which you can use to learn from. (Primarily Java, so stick with that stack.)

This is coming from a C++ team who had to “roll their own” as well as trial and error a lot more than necessary due to the lack of good code examples.

2 Likes

Python.

Do it.

I have found these videos really helpful when starting on the same path you are.
State machines using the case structures helped advance my programing.

Vision with a limelight is just reading a value from the network data tables, processing is handled by the limelight os

For swerve drive I relied on the videos and example code released by 4265

1 Like

You can check out my team’s GitHub to see how we implemented those features.

1 Like

First time I see this! Thank you very much, seems like there’s alot of great information!

1 Like

The doc @gerthworm posted is your best bet to really push LabVIEW as far as you can, but I’ll echo the recommendations to explore other languages. We used LabVIEW from 2009-2020 and by the end we were jumping through hoops to do more advanced. Our 2018 and 2019 code implemented many features including arm kinematics, path planning, and motion profiling. However, doing this required a lot more effort than using Java/C++ plus we weren’t able to take advantage of the ever-growing WPILib.

We made the jump to C++ in summer 2021 because the majority of our software mentors use C++ at work and this has helped us by:

  • Easier to attract more mentors in our local area
  • Mentors are more effective teachers because they can draw from experience outside of FRC
  • Local employers (namely Caterpillar, our primary sponsor) have internship opportunities for students and C++ gives students a leg-up in snagging those positions
  • Code organization is way cleaner than LabVIEW
    • Anyone who’s tried doing git merges with LabVIEW for hours after every team meeting will appreciate moving to any text-based language
    • Also wpiformat/clang-format and GitHub actions have made administering our projects far more pleasant
  • Implementing advanced features is easier with text-based languages over LabVIEW’s graphical model in any case where LabVIEW’s standard library doesn’t include what you need already

This is at the expense of:

  • Onboarding new students takes more effort as learning basic syntax and development practices is more complicated
  • As others have said, C++ does not have nearly the same community as Java, so you’ll be on your own more often in developing solutions

We also don’t have a strong AP CS pipeline to train students, so C++ was an easier path for us than piggy backing on the Java instruction from school.

1 Like

Use Java, imo its easier to learn than labview and 80% of frc teams or more uses it

Just to add on to this, we really need to update our video series — fingers crossed that we’ll get to it this summer, I think we’ve got a group of students who will want to take up the task!

Our circa 2020 LabVIEW swerve implementation had quite a few limitations and we’ve made some significant improvements. So if, @mattsini you do end up continuing the LabVIEW route, I’d encourage you to also take a look out our newer releases: Releases · secret-city-wildbots/2023-Robot · GitHub

And of course we’re happy to answer any questions!
-Luke

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.