LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Naming conventions

Are there any official naming convention for LabVIEW files, such as VI, proj, lvlib, etc?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 19
(5,278 Views)

Hi,

well in the LabVIEW style guide, there are some guidelines (http://www.ni.com/pdf/manuals/321393d.pdf#labview_style_guide p6-2 for example "When naming VIs, VI libraries, and directories, avoid using characters that are not accepted by all file systems, such as slash (/), backslash (\), colon (:), and tilde (~). Most operating systems accept long descriptive names for files, up to 31 characters on Mac OS 9.x or earlier and 255 characters on other platforms.")... but I do not think there is any convention...

 

Aurelie

Message 2 of 19
(5,267 Views)

@jyang72211 wrote:

Are there any official naming convention for LabVIEW files, such as VI, proj, lvlib, etc?  Thanks!


Not official.  But you would be well served by keeping to a Fully Qualified Naming convention similar to "Verb <Adverb> Noun.xxx in yyy.lvlib on zzz.lvproj"

 

eg " Write XML File.vi in Calibration.lvlib on MyTestSystem.lvproj"

 

Avoid overdecorating with outdated conventions!  For example the same file might have once been "MTS_Cal_XMLFileWrite.vi"( in Calibration.lvlib on MyTestSystem.lvproj) Before FQNs were fully supported and text programmers brought bad habits into LabVIEW Development.


"Should be" isn't "Is" -Jay
Message 3 of 19
(5,259 Views)
I name by category - kind of go "backwards", if you will.
Power-Take Measurement.vi
Power-Battery-Enable Charger.vi
Power-Battery-Connect Battery.vi
Config-Read Config.vi
Config-Write Config.vi

With instruments I start with the model number.
Used to prefix the top-level with a "!", that'd kick it to the top of the file list. Now I keep it in the top-level directory per the style guide.
Message 4 of 19
(5,252 Views)

Mike,

I'd argue against that convention and tell you to use libraries and projects.

 

"Connect.vi in Battery Charger.lvlib" is a lot more discriptiveSmiley Surprised


"Should be" isn't "Is" -Jay
Message 5 of 19
(5,247 Views)

I am a fan of the libraries as well.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 19
(5,229 Views)

I think library is great, but sometime, I am too lazy to add a new vi into the library, and my library become a mess. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 7 of 19
(5,205 Views)

I have seen people using ! to move their file up in the directory.  The problem is everybody started doing the same thing.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 8 of 19
(5,209 Views)

What did you mean by "Avoid overdecorating with outdated conventions!  For example the same file might have once been "MTS_Cal_XMLFileWrite.vi"( in Calibration.lvlib on MyTestSystem.lvproj) Before FQNs were fully supported and text programmers brought bad habits into LabVIEW Development."? 

 

What bad habits are you referring to?  Is using "_" a bad habit?  If so, why?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 9 of 19
(5,209 Views)

This question is about a library that consists of reusable VIs with the structure below.  Library is the main folder that consists of subfolders that store subVIs with different types of functionalities.  Should I create one *.lvproj at the main folder level and one *.lvlib at each subfolder level (1 lvproj and 3 lvlib total)?  Or should I create a *.lvproj and a *.lvlib inside such subfolder (3 lvproj and 3 lvlib total)?  Or is there a better way?

 

 

Library main folder

- vis with function type 1 subfolder

- vis with function type 2 subfolder

- vis with function type 3 subfolder

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Message 10 of 19
(5,181 Views)