NI Home > Community > NI Discussion Forums
Reply
Knight of NI
RavensFan
Posts: 15,010

Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

Am I the only one to feel this way?  Has this message thread gotten off track?

 

The original purpose of this thread was the subject line list above.  But the past page and a half has been conversations on shift registers, feedback nodes, different loop constructions, and alternative types of global variables.

 

All of this really should be in as separate message thread in the LabVIEW forum.  Let's return this thread back to its original purpose which was a list of interesting things you might not know about LabVIEW that are too small to devote a full fledged nugget of there own.

Proven Zealot
Jeff·Þ·Bohrer
Posts: 6,924

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em


Ravens Fan wrote:

 Let's return this thread back to its original purpose which was a list of interesting things you might not know about LabVIEW that are too small to devote a full fledged nugget of there own.



In that spirit- A micro-nugget that might bite ..(your co-worker yesterday).

 

No you are not insane, and that sequence of prompts in not skipping every other call,  Your OK boolean Mechanical action is  "Switch until released" so its firing two Value Change events one causes the prompt to exit and the second is nicely queued up waiting for you to call the prompt again so it can hurry up and exit as fast as possible.

 

Much chuckling was heard far and wide

 

 

8-Ball Consulting advertising banner

Certified LabVIEW Consultant. The partner you can bank on when you're behind the 8-ball.
Trusted Enthusiast
Darin.K
Posts: 3,789

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

I don't really have any preconceived notions about what this thread (or most threads) is about other than discussions about some of the finer points of LV.  Some points are simple, some more interesting ones are nuanced.  What 15 page thread is not going to wander to and fro?  Fewer rules keeps more people engaged and have made this a relatively active thread.  As long as the content is LV-related, it works for me.  As for separating the wheat from the chaff, that is what tags and kudos are for.

 

Oh and don't forget that String to Number takes clusters and arrays and arrays of clusters of strings.  Helps with some regexing to extract numbers (sparing the long and ugly regex this found sets of 3D points in a dxf file).

 

StringToNumberExample.png

Knight of NI
Knight of NI
tst
Posts: 10,703
0 Kudos

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em


Jeff·þ·Bohrer wrote:

No you are not insane, and that sequence of prompts in not skipping every other call,  Your OK boolean Mechanical action is  "Switch until released" so its firing two Value Change events one causes the prompt to exit and the second is nicely queued up waiting for you to call the prompt again so it can hurry up and exit as fast as possible.


Another fun version - a user complaining that the dialog sometimes appears and immediately disappears, even though there should be no good reason for that, because the only thing stopping it is a value change event on the OK button. What could cause that?

 

Well, once you figure it out, it's easy - the users are double clicking the button. The first click is processed and ends the VI and because the event structure is still in memory, it also remembers the second click and processes it the next time the VI is opened, thus immediately closing it. There are a number of ways of fixing this, although I don't remember which one we used at that time.

 

Oh, and there's an idea for handling something like this - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Option-to-discard-any-user-actions-outside-an-event-ca...


___________________
Try to take over the world!
Active Participant
PhillipBrooks
Posts: 1,158

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

The String to IP Function has a right-click option to output all workstation IP addresses!

 

 

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Knight of NI
altenbach
Posts: 26,078
0 Kudos

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

[ Edited ]

PhillipBrooks wrote:

The String to IP Function has a right-click option to output all workstation IP addresses!


Yup, I used to use this all the time.

 

But why would you limit yourself to only two outputs? :smileyvery-happy: Keep it scaleable!

 

 


LabVIEW Champion . Do more with less code and in less time .

Knight of NI
altenbach
Posts: 26,078

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

[ Edited ]

It is actually most useful and revealing for external web sites. Many big sites back translate to several addresses for load balancing and redundancy reasons. Here's ni.com from my geographic location:

 

 


LabVIEW Champion . Do more with less code and in less time .

Active Participant
PhillipBrooks
Posts: 1,158

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

The example VI is not mine, it's NI's! :smileysurprised: I knew when I used it I would be appropriately scolded (should have made my own).

 

The best part is the duplicate 'Index Array' nodes when a single one would do fine :smileywink: 

 

http://digital.ni.com/public.nsf/allkb/B668D57C2E96C96C862572F40078FC96

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Knight of NI
altenbach
Posts: 26,078
0 Kudos

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

Yes, maybe it was used to emphasize the multiple outputs to even the untrained eye unfamiliar with arrays. :smileyvery-happy:

 


LabVIEW Champion . Do more with less code and in less time .

Member
taper
Posts: 152
0 Kudos

Re: Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

I see multiple index array functions a lot in older code here.  Wasn't resize added relatively recently?(A few years may seem like a long time to some people, we still use LV6 for a few things here.)


--Using LV8.2, 8.6, 2009, 2012--