Is there a lint tool for LabView out there?
Next best, is there a library of access routines for Python or Perl that I could use to write some FRC/WPI specific checks? Or maybe a scriptable interface (TCL?) into the tool? Or even Labview itsself; I’ve seen some VI’s lying around that sound like they manipulate projects?
Example rules:
Every DIO Open is connected to a unique DIO
Every Motor Open is connected to unique pwm’s
Every GetDevRef maps to a SetDevRef
Thanks,
Tim
The tool that fits your description is called the VI analyzer. It is written in LV and parses LV code to test against certain patterns.
Another reasonable way to discover the issues you list is to run against a simulated robot. If you make it through each mode of auto, tele, and disabled with no error messages, that should exercise a good portion of the code. Other code would depend on button presses and sensor values.
Greg McKaskle
Hi Greg,
Goodness, do you ever sleep?
I’ll go look at the analyzer.
As you see on another thread, I’m having a little trouble with the simulator.
What worries me about the sim solution is the problem with accessing non-existent hardware. Does the simulator send the robot code into orbit when the robot is trying to access stuff that doesn’t exist? This seems to be a primary cause of pegging cpu usage at 100% and sending the robot open loop.
Thanks,
Tim
I’m not sure if the VI Analyzer is included. To be honest, I rarely use it myself. It is great to help enforce coding conventions across a large team, but if I find that I’ve done something wrong, I generally just make a list of things to search for and plow through the code looking at the search results until I’ve verified things.
The simulator will almost certainly not match your robot’s construction, but I don’t think the robot will matter that much. The simulator will give your code a place to run, and the address checking for duplicate opens, bad names for the registry, etc, is done in WPILib. The FPGA and other elements have no knowledge of that. I don’t know if I’ve seen the other thread about simulation issues. If you can, run your code there and see if it reports the same errors and gives you a place to track them down.
Greg McKaskle