LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Message 141 of 361
(1,983 Views)

@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

 

 


"Should be" isn't "Is" -Jay
Message 142 of 361
(1,965 Views)

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

Message 143 of 361
(1,963 Views)

@JÞB 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!
0 Kudos
Message 144 of 361
(1,911 Views)

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

Message 145 of 361
(1,897 Views)

@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? 😄 Keep it scaleable!

 

 

0 Kudos
Message 146 of 361
(1,864 Views)

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:

 

 

Message 147 of 361
(1,853 Views)

The example VI is not mine, it's NI's! Smiley Surprised 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 Smiley Wink 

 

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

Message 148 of 361
(1,849 Views)

Yes, maybe it was used to emphasize the multiple outputs to even the untrained eye unfamiliar with arrays. 😄

 

0 Kudos
Message 149 of 361
(1,841 Views)

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--
0 Kudos
Message 150 of 361
(1,818 Views)