Thread: Java vs Labview
View Single Post
  #38   Spotlight this post!  
Unread 11-05-2016, 22:55
Landonh12's Avatar
Landonh12 Landonh12 is offline
270 points
AKA: Landon Haugh
FRC #0364 (Team Fusion)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Gulfport, MS
Posts: 211
Landonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud of
Re: Java vs Labview

We have used LabVIEW since it was available for FRC. We tried to make the switch to Java this year, but with my limited experience with it coupled with the fact that I was the only mentor for programming, it didn't go so well. We switched back to LabVIEW in the last week of the season this year, and all of the main functions of the robot were done within a day or two.

The thing about LabVIEW is that it is extremely easy to do parallel processing. You can literally open up Periodic Tasks.vi and run several loops in parallel without having to worry about starving the main loop of your code. (This is probably because of my novice experience with Java and written languages in general, but I couldn't figure out how to run control loops in Java to save my life. I was naive enough to write Thread.delay() in my Java code. Silly me.) In LabVIEW it's also easy to sequence commands using Notifiers and Sequence structures to make it really easy on the drivers.

Also, debugging and looking at data from the robot is super easy in LabVIEW as well. You can run the code from Robot Main.vi and then open up any file and see what value is being passed through a wire at any given time using probes. This makes debugging extremely easy. Graphs and Indicators are nice, too.

For programming a robot, LabVIEW is great. It has its cons, such as slow deploy and compile times, but all of the other pros make up for it.

For programming a robot AND learning more real-world coding habits, use Java or C++ (and Python!). Java and C++ compile and deploy quickly and you can still debug pretty easily by publishing variables to the SmartDashboard. You can also print to the roboRIO console and Driver Station. But it isn't as easy as LabVIEW.
__________________
Team Fusion 364 - Driver/Programmer 2012-2015; Controls Mentor 2016-Present
Reply With Quote