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: 

Top LabVIEW Rookie Mistakes

It is mentioned briefly in your article section on flat sequence structures, but error handling in general is a big one -  not wiring error terminals, or just wiring simple error handlers in subVIs. Basic error handling can really help with troubleshooting and enforcing data flow.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments 

Message 11 of 47
(2,830 Views)

Documentation. Documentation. Documentation. Guilty as charged.Smiley Sad

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 12 of 47
(2,827 Views)

Jeff,

 

     I completely agree. Error handling is one of those conversations I have with many new LabVIEW users. Just using the error wires and a simple error handler, like you said, is the first stepping stone to an actual strategy.

0 Kudos
Message 13 of 47
(2,818 Views)

Open/close functions INSIDE THE WHILE LOOP! I see this daily, and then people ask "why is it taking so long to write to my file, the VISA connection etc.

Message 14 of 47
(2,814 Views)

@for(imstuck) wrote:

Open/close functions INSIDE THE WHILE LOOP! I see this daily, and then people ask "why is it taking so long to write to my file, the VISA connection etc.


Absolutely agree, I see this all the time. Related to that - not managing loop timing correctly to avoid hogging the CPU.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments 

0 Kudos
Message 15 of 47
(2,810 Views)

One more common mistake... My very personal memory (luckily, without the red colored text) Cat Embarassed


shiftreg.png

 

Generally, shift register are often misunderstood.

Message 16 of 47
(2,805 Views)

@PiDi wrote:

One more common mistake... My very personal memory (luckily, without the red colored text) Cat Embarassed


shiftreg.png

 

Generally, shift register are often misunderstood.


Yeah, I think all of us who have been using LabVIEW for more than a few years have ran into this problem, usually self-inflicting.  I sure remember when I found that in my code.


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 17 of 47
(2,801 Views)

It's funny you mention NOT using projects... I am no expert (just finished Core3) and am about 20% grayer struggling with "code re-use" vs. projects.  I know C/C++, VB, etc; and design circuit boards.  In those cases, I can write a nice re-usable module (say a driver). As mentioned, copy & paste in Windows is all I need to re-use.  I am trying to "pull together" existing code here at the lab that is literally sitting in numerous folders across a couple different letter drives (I feel you wincing). But that's another story for now.

 

I am running into nightmares trying to re-use code (in projects).  A simple save-as to the new location doesn't work 90% of the time because of all the sub-vi's break.  Another example is a driver I downloaded for stepper motors. It consists of a few folders, and I made a nice .lvlib wrapper. I had to move this project in it's entirety to a different location, and a bomb went off, even doing the "save-as" moves.

 

One thinig that I feel wasn't covered well in CORE2 / CORE3 was say "implementing" or "heres how to" implement good strategies for code-reuse.  I asked a question and the instructor said to save and rename everything so there aren't naming conflicts. But that seems counter-intuitive.

 

In another simpler example, I wrote a module (call it ModuleA) that I want to use in many different applications. ModuleA has a few subVI's.  If I want to add it to new project in another location, how can do it without breaking it? On simple VI's to reuse I copy the code and paste it into another VI and give it a new name, seems like all I can do.

 

Anyways, sorry for the book, but a good lesson with examples and how-to's on code reuse with respect to the above (say code with many subVIs) would be great!! Worth many Kudos!!

 

Thanks,

 

Steve

Message 18 of 47
(2,791 Views)

 


@PiDi wrote:

One more common mistake... My very personal memory (luckily, without the red colored text) Cat Embarassed

 

Generally, shift register are often misunderstood.


The following is somewhat off topic...sorry...

I actually have this as an interview question. Notice the for loop with the empty array. Gets um every time, although the clear errors and the split queue reference wire should be a hint...Smiley Very Happy

 


 

 

Message 19 of 47
(2,790 Views)

@PaulG. wrote:

Documentation. Documentation. Documentation. Guilty as charged.Smiley Sad


Well I'm not guilty of that at all!

 

Shane

 

Spoiler
I've never documented code in my life..  Oh wait... Smiley Sad

 

Message 20 of 47
(2,781 Views)