LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to certify LabVIEW VI Program/Block Diagrams

Hi all,

 

Good day. By the way, I am currently working on a medical field company, and is currently developing some LabVIEW programs

to be used for our ongoing development devices.

 

We have purchased a LabVIEW 2018 Professional. And our package includes the following tools below:

1) VI Analyzer (please refer to screenshot attached for reference)

2) VI Tester(please refer to screenshot attached for reference)

 

My questions are the following:

1) Are these 2 Tools mentioned above(VI Analyzer, VI Tester) enough to qualify/certify our LabVIEW VI programs/diagrams?

2) Is there any specific (LabVIEW Code Reviewer/Analyzer) tools/software  which we can purchase and use to qualify/certify our LabVIEW VI programs/diagrams?

3) Do you have any suggestions/inputs/thoughts on how to qualify/certify our LabVIEW VI programs/diagrams?

 

Your help are very much appreciated regarding this very important matter.

 

Thanks for your all your help in advance! 🙂

 

Cheers!

 

Download All
0 Kudos
Message 1 of 14
(3,378 Views)

Hi StayHappy,

 

VI Analyzer can give you some hints about ways you could optimize your code, like pointing out where a for loop could be parallelized. It is also good for making people on your team use similar coding styles.

I have not used VI Tester but I believe that is a unit test tool. So you can test your VI with certain inputs and known outputs and see if it behaves accordingly. This is good practice so that when you make changes you can test your VI easily to make sure it still behaves correctly. JKI makes another framework called Caraya that you can look at.

 

These tools can be very useful, but most good LabVIEW programming practices are similar to programming in other languages. Use source code control. Hold code reviews. Build up your re-use library with reliable subVIs over time. Go through as much online training as you can with your SSP.

0 Kudos
Message 2 of 14
(3,337 Views)

I think that the Unit Test Framework is much more of what you're looking for.

 

 

Message 3 of 14
(3,334 Views)

Hey Gregory,

 

Many thanks for these useful pieces of information and notes man. Much appreciated.

Ok. Will have a look on this Caraya framework.

 

And yeah agree, making most of the online training. That's what I'm doing right now. 

 

Cheers!

StayHappy

0 Kudos
Message 4 of 14
(3,315 Views)

Hey Kyle,

 

Many thanks for your inputs as well man. Much appreciated as well.

Well check about this Unit Test Framework thing.

Anyways, we also have a TestStand included in our package so looking also on using TestStand

for LabVIEW sequences.

 

By the way, have you tried before or do you have any experience using this Unit Test Framework thing to certify LabView codes?

 

Thanks,

StayHappy

0 Kudos
Message 5 of 14
(3,311 Views)

Hey Gregory,

 

By the way, have you tried before or do you have any experience using Source Code Control or this Caraya Unit Test Framework thing to certify LabView codes?

 

Anyways, I've found the Caraya Unit Test Framework. I have attached the link below for anyone who may want to check this out.

It looks like it is free open source tool. We'll play around with this.

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/215909

 

Thanks again! 

 

Cheers!

0 Kudos
Message 6 of 14
(3,303 Views)

Any serious Software Developer should know about (and use) some form of Version Control System (what you are calling "Software Control".  One that is reasonably popular with LabVIEW Developers is called "Subversion", and consists of two parts -- a Subversion "Server" (which is maintained by your company, or by an outside vendor) and Subversion Clients on the Developer's machines.  A very popular (and free) client can be downloaded from TortoiseSVN.net.  I'm pretty sure that everyone who has responded to you has extensive experience with Version Control, and may even be using TortoiseSVN.

 

Bob Schor

0 Kudos
Message 7 of 14
(3,294 Views)

@StayHappy123 wrote:

Hey Kyle,

 

Many thanks for your inputs as well man. Much appreciated as well.

Well check about this Unit Test Framework thing.

Anyways, we also have a TestStand included in our package so looking also on using TestStand

for LabVIEW sequences.

 

By the way, have you tried before or do you have any experience using this Unit Test Framework thing to certify LabView codes?

 

Thanks,

StayHappy


The unit test framework is a way to test that a single VI, with a given set of inputs, produces a set of outputs that match what it's been determined that you're looking for.  You can set up a bunch of these, and then have LabVIEW run all the tests every time you do a code change to make sure the outputs are still good.  I haven't used it to do any "official" certification, but I have used it.  It's most useful for checking purely mathematical operations that have a defined input and output that you can check with 100% confidence.  It's not as useful for checking code that communicates with an instrument, which is a lot of what LabVIEW does, but I don't know your particular use case.

 

Is there a particular certification goal you're looking to accomplish?  A particular standard to meet, maybe?

0 Kudos
Message 8 of 14
(3,287 Views)

NI has also put together a very nice resource here. Check out the "Engineer Good Software" tab.

Message 9 of 14
(3,276 Views)

An interesting, but very difficult question!

 

There is no tool that can 'certify' your LabVIEW program as 'safe'. This all comes down to the standards that you are trying to meet and their requirements for software coding/testing.

 

A lot of certifying the software to a particular standard comes down to producing a huge amount of paperwork & documentation to demonstrate:

- The requirements of the software in terms of the specification of what it should do

- That the software has been designed to meet the requirements

- A test plan of how you will ensure the software meets the requirements (as above) and also the software coding standards

- Results of the software testing in a report

 

If you look at something like MISRA C (https://en.wikipedia.org/wiki/MISRA_C) - it specifies the coding guidelines you need to follow to write robust software for embedded products. As far as I know, there is no such standard for LabVIEW but following the NI Style Guide and doing the training/certifications helps to ensure you write software that is free of defects.

 

Testing of the software can be done in numerous ways:

Static Analysis: This involves using a tool to inspect the source code to look for - VI Analyser but it is more for checking minor/style issues and will not pick up on any advanced language pitfalls - but it can be extended and custom VI analyser tests written.

Code Review: Having another human to review the code to check that it meets the requirements and to look for any programming issues/bugs.

Unit Testing: Testing individual functions/VIs in the program to give a wide range of inputs and check that the outputs are correct - things like the Unit Test Framework, Caraya, VI Tester etc. can help you with this.

Integration Testing: This involves testing how modules of your program interact with each other - for example testing APIs and communication between VIs. System Testing: Testing the overall system functionality according to a test plan

Code Coverage: Code coverage involves trying to execute every possible branch of the software (e.g. using unit tests). The goal is to reach 100% coverage with your testing but sometimes this may not be possible. Some languages have automatic code coverage tools, but AFAIK there is nothing for LabVIEW.

 

You will likely need to write a test plan and then pick the appropriate testing method(s) from the list above to confirm that it performs as expected.

 

Hopefully that gives you pointers in the right direction.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 10 of 14
(3,247 Views)