LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scary LabVIEW images

Solved!
Go to solution

@tst wrote:

Sorry. 11, 31 or 291 uses of the clear errors VI are not a problem in themselves. You need to see how they're used in the context of the code to see if that usage was reasonable (although I admit I would probably be concerned if I saw 291).

 


This was exactly my thought when I first read the post, which is too bad because tst is clearly the voice of reason and I find it much more fun to be unreasonable.  I have no doubt that the code is scary, but I also would not flinch at seeing that many Clear Error uses.  Using it 7 times in the Get Sample Rate vi might be a bit concerning.  This sounds like code dealing with hardware, and those errors (IMO) should be taken seriously.
We all know that Clusters and Enums are datatypes and not UI elements.  Sometimes for convenience sake we do it anyway.  Likewise, the Error In/Out terminals are meant to communicate errors and warnings to other parts of the code that need to take specific actions (notification, logging, power cycling).  They are not really meant to simply enforce execution order between two otherwise unrelated pieces of code.  There is a certain structure (two actually) whose job is to enforce such order, but who is really going to go there?  The price for avoiding the structures-that-shall-not-be-named is the occasional-to-frequent need to sift potential error messages. 
Those terminals are like BNC connectors, every piece of hardware has a few it seems.  Just because the plugs are compatible however...
At least Clear Errors is searchable, what would scare me is 31 or 291 or 1723 instances of 'Use Default if Unwired' tunnels on case structures.
You want scary code?  I came across this a week or so ago.
Signal Processing -> Waveform Measurements -> Extract Single Tone Information.vi
Open the BD and Check out the Extract Single Tone From Hann Spectrum subVI.
SingleTone.PNG
Message 21 of 30
(3,371 Views)

Thanks Darin!

 

I hadn't looked at that before- I feel "dirty" and now I need to go wash my eyeballsSmiley Tongue


"Should be" isn't "Is" -Jay
Message 22 of 30
(3,340 Views)

@Jeff Bohrer wrote:

Thanks Darin!

 

I hadn't looked at that before- I feel "dirty" and now I need to go wash my eyeballsSmiley Tongue


 

Every LabVIEW programmer needs emergency access to one of these in case of exposure to such code. I just love the picture on the sign.

 

eyewash.jpg

=====================
LabVIEW 2012


Message 23 of 30
(3,325 Views)

@SteveChandler wrote:

 

Every LabVIEW programmer needs emergency access to one of these in case of exposure to such code. I just love the picture on the sign.

 

 


Clearly graphical communication is failing.  The point of the sign, and the eyewash, is that your eyes must be OPEN.  Smiley Surprised

0 Kudos
Message 24 of 30
(3,319 Views)

Looking at the sign, I immediately thought this device is a collector for tears. 😮

 

(This is also equally needed when looking at some programs. :D)

Message 25 of 30
(3,311 Views)

The part that amazed me about extract singal tone.vi was how long it took to drop onto a BD.  I assume the DFIR and optomizer had to go into emergency mode and make a few additional passes on that vi.


"Should be" isn't "Is" -Jay
0 Kudos
Message 26 of 30
(3,290 Views)

Thanks for making us aware of this (Extract Single Tone Information).  We'll look into updating this diagram in a future release.  We've created a CAR for this task.  For your reference, the CAR ID is 302256.

Message 27 of 30
(3,243 Views)

@MDC wrote:

We'll look into updating this diagram in a future release.


I think just putting lipstick on the same algorithm is a waste of time and always has the potential of breaking things by accident. The VI works fine!!!

 

I would only consider maintenance if the algorithm should be modernized, either for better performance or better stability in edge scenarios. Is there a better algorithm? Even in this case it might be dangerous to upgrade because existing code might rely on some flaws of the existing code.

 

Over the last 15 years, I've done many "minor and apparently inconsequential" code edits that bit me later. 😄

0 Kudos
Message 28 of 30
(3,156 Views)

@altenbach wrote:

@MDC wrote:

We'll look into updating this diagram in a future release.


I think just putting lipstick on the same algorithm is a waste of time and always has the potential of breaking things by accident. The VI works fine!!!

 

I would only consider maintenance if the algorithm should be modernized, either for better performance or better stability in edge scenarios. Is there a better algorithm? Even in this case it might be dangerous to upgrade because existing code might rely on some flaws of the existing code.

 

Over the last 15 years, I've done many "minor and apparently inconsequential" code edits that bit me later. 😄



Those floating point array indexes scare me as well.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 29 of 30
(3,147 Views)
0 Kudos
Message 30 of 30
(3,131 Views)