Go to Post It definitely looked like a penalty, but in FRC if it looks like a penalty and smells like a penalty, well, unfortunately it might not be. - Basel A [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 04-03-2014, 22:39
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Lint for LabView

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
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #2   Spotlight this post!  
Unread 04-03-2014, 22:51
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: Lint for LabView

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
Reply With Quote
  #3   Spotlight this post!  
Unread 04-03-2014, 23:21
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Lint for LabView

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
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #4   Spotlight this post!  
Unread 05-03-2014, 07:58
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: Lint for LabView

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
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 04:31.

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