LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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


@Steve Chandler wrote:
Can it really hurt anything by putting a constant on the front panel?

Future version might have more sanity checks, so the code might break or refuse to open in LabVIEW 2020, i.e. at a time when the original programmer has long left the company. 😄

Message 181 of 368
(2,862 Views)

Are your boolean constants boring?  Try coloring them to match your company's colors.

Use this.

Message 182 of 368
(2,768 Views)

Now make the FALSE value show a "T" and the TRUE value show a "F". 😄

0 Kudos
Message 183 of 368
(2,750 Views)
Message 184 of 368
(2,697 Views)

We all know that block diagram combobox typedefs constants aren't updated when the typedef is.  http://digital.ni.com/public.nsf/allkb/46CC27C828DB4205862570920062C125

 

If you do have a bunch of them on you BD, make your change to the typedef, then use the Find All Instances and Replace All with the newly updated typedef.  I highly recommend going to each one after this using the Find All Instances box and making sure you still have the value you want.


--Using LV8.2, 8.6, 2009, 2012--
Message 185 of 368
(2,635 Views)

That is a nice tip but you should really be using typedefed enums instead. As it says in the article you can use format value to get the string for the enum value. But yes that function can take up some room. If that is the concern then just put it in a subVI and make a neat little icon. I always enjoy making icons like the one below for single input single output VIs.

 

Example_VI_BD.png

 

The subVI is just this

 

typedeftostring_BD.png

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


Message 186 of 368
(2,603 Views)

Steve,

 

With a small effort you could qualify for the Obfuscated Code thread with that.

 

Someone was looking for a disappearing wire recently. A modification of Steve's idea allows this:

 

Buried wire.png 

 

The Forum appearently will not allow an image with a "?" in the filename.  I had called that image "Buried wire?.png" when I created it but the Froum rejected that as an invalid file type.

 

Lynn

Message 187 of 368
(2,591 Views)

@johnsold wrote:

The Forum appearently will not allow an image with a "?" in the filename.  I had called that image "Buried wire?.png" when I created it but the Froum rejected that as an invalid file type.



The question mark  "?" is often used as a wildcard for a single character and is thus not a good choice in a file name. 🙂 While your file system might allow it, many utilities will choke on such a file.

0 Kudos
Message 188 of 368
(2,579 Views)

Christian,

 

I suspected that it was something like that.

 

One could argue that a question mark or a wildcard of any type might be appropriate for such silly code.

 

Lynn

0 Kudos
Message 189 of 368
(2,558 Views)

I've been thinking of this some time, but now i did something of it. Sometimes you just want to swap to wires places and the 90 degrees angles can make it problematic to do cleanly, thus the polymorphic Swaparoo! See how you like it. 😄

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 190 of 368
(2,543 Views)