From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Things a LabVIEW Programmer must know

Solved!
Go to solution

Hello guys..

 

I am working on labVIEW for last 1 year on my own.

If I get any difficulties I post my questions on the NI Forum.

But I only know a small drop of the sea water..

 

So what should a labview programmer must know??

0 Kudos
Message 1 of 10
(4,627 Views)
Solution
Accepted by topic author Nayan

In short, how to avoid 10 screen wide spaghetti code full of sequence structures, local variables and race conditions 🙂

 

Also I advice you to have a look on the NI Certificates and the "learning curve":

http://www.ni.com/white-paper/13120/en/

http://www.ni.com/training/certification/

http://forums.ni.com/t5/Certification/bd-p/Certification

 

edit: maybe I would just add a few points which I usually keep in mind during planning phase of a new project:

  • choose the right framework or template based on the requirements
  • Keep in mind how to get and set values - indicators and controls. If it is possible, use the wire to pass data. Keep in mind what is OK to do with local variables (for example update a control), and what should be (usually) avoided (read/write indicators for example). If you cannot use the wire to directly pass info (parallel loops), learn proper use of Notifiers, Queues, UserEvents, etc...
  • who will use the code (this is very important, you need totally different approach if you develop for only yourself, or for others who are not programmers and maybe even do not know the hardware part of the system...)
  • GUI most be always responsible. Avoid bad habits (longer time running things in GUI Event loop).
  • Avoid overcrowded Front Panel: use pop up windows for settings, etc. Which the user do not need to see always.
  • Error handling! It is very important to make a robust proper error handling strategy: for example if one of your HW component creates an error, your application cannot just stop simply. Handle the error, properly close all HW and File references (remember if you do not close a File properly, you can lose LOTS of data: file writing is buffered from RAM). Also log the error info in a log file.
  • If you need to make an EXE or installer: use a configuration file to store user changes: if the user changed the colours (width, etc.) of a Graph/Chart, store this info in a config file which you load at the next application start.
  • Autodetect hardware (or give the user the option to change port/channel settings): what happens if your application moves to another PC (COM port numbering changes, etc...)? Your application need to adapt to HW changes.

 

 

 

 

Message 2 of 10
(4,607 Views)
Solution
Accepted by topic author Nayan

Have you taken the on line introductory courses (which are freely available I believe if you have a current LabVIEW licence)? If you work through those taking time to understand what you are doing rather than go through the motions, you should end up knowing a fair bit about LabVIEW.

Message 3 of 10
(4,573 Views)
Solution
Accepted by topic author Nayan

@Nayan wrote:

Hello guys..

 

I am working on labVIEW for last 1 year on my own.

If I get any difficulties I post my questions on the NI Forum.

But I only know a small drop of the sea water..

 

So what should a labview programmer must know??


All of the things already mentioned here are nice to know but I think a few fundamentals are missing.

 

1. Understanding parallel data flow is essential in ever being able to get to grips with programming in LabVIEW.  Knowing what is executed when (and especially recognising cases where you can't predict the execution order!) is very important and will automatically eliminate a lot of problems you will otherwise have (race conditions).

 

2. Use wires as variables, not property nodes and not local or global variables instead.  Try to code so that you can use a wire directly as the source of your information instead of creating lots of locals or porperty nodes just for reading / writing values.  There ARE cases where this is required, but it tends to be massively over-done in beginner-level code.

 

3. Learn how to debug.  This actually applies to every programming language but knwoing how to find out what is wrong with your code gives you essential tools to improve your skill.  Use execution highlighting, never use the continuous run button, check the execution properties of your VIs etc.

 

For me these are the three very essential building blocks of any good LabVIEW programmer.

 

Other things such as which function does what will come with time.  A word of warning on jumping into patterns (I might get some angry responses on this point).  Patterns are perhaps best for at least intermediate users since using a pattern without understanding it is probably going to slow you down more than it will help.  Of course if you feel you HAVE understood a pattern, then fire away.  Some patterns are a lot easier than others to learn such as the state machine, queued state machine and so on.  Start with these.

 

Shane.

Message 4 of 10
(4,556 Views)

Thanks to all of you guys.. 

I think this post is very usefull to all the newbies out there.. 

It will show a proper direction to them..

Message 5 of 10
(4,556 Views)
Solution
Accepted by topic author Nayan

I recall when I learned about Action Engines/FGVs early on in my LabVIEW career, that is when things really clicked for me in fully understanding how LabVIEW works/executes.  Here is Ben's (who I was actually fortunate enough to learn from first hand) nugget on them:

 

http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801 

Message 6 of 10
(4,431 Views)
Solution
Accepted by topic author Nayan
A good programmer needs to know how to think clearly and methodically. You need to be familiar with the language you are using. You need to understand that you can't proclaim that a program "works" simply because it gave you an answer you were expecting. You need to take the long view and consider how an application's requirements might grow and change in the future.

Be willing to try things and make mistakes, and never, never, never stop learning.

I realize that the preceding might be seen as not being very concrete, but these are the things that I have seen to be truly important. This is why in my writing I never concentrate on just showing some neat trick. I explain why you would want to do things in a given way, what the alternatives are how to decide what to do next.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 10
(4,386 Views)

hie..

ToeCutter said

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

Have you taken the on line introductory courses (which are freely available I believe if you have a current LabVIEW licence)? If you work through those taking time to understand what you are doing rather than go through the motions, you should end up knowing a fair bit about LabVIEW.

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

can share a link for that course?

0 Kudos
Message 8 of 10
(4,373 Views)

you can find training under "my NI". Everyone who has active LV licence can access the self paced learning material. Including student versions too. Just google for it if you cannot find it. 

If a NI stuff reads this, since this question comes up every day, there should be a visible link on the forum website stating the available learning material and the way how you can reach it...it looks like people cannot find this info easy...

Message 9 of 10
(4,367 Views)

@d_2014 wrote:

hie..

ToeCutter said

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

Have you taken the on line introductory courses (which are freely available I believe if you have a current LabVIEW licence)? If you work through those taking time to understand what you are doing rather than go through the motions, you should end up knowing a fair bit about LabVIEW.

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

can share a link for that course?


3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 10
(4,323 Views)