LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 03/06/2006

I have an icon nugget and a connector pane nugget this week:
 
Icon - When you're creating a new icon for a VI, how do you start with a blank, bordered icon?  Here's what I used to do...I would double-click the selector rectangle in the icon editor to select the whole icon, press my delete key to delete everything, then double-click the hollow rectangle to create a black border.  Turns out there's a much quicker way to create a blank icon in the icon editor.  Just double-click the *filled* rectangle (it's right next to the hollow rectangle), and assuming your default colors in your icon editor are black/white, this single double-click will create a blank icon with a black border.  I just found out about this one recently, so I'm still trying to remember it when editing icons.
 
Connector Pane - Here's another reason to upgrade to LabVIEW 8.0.  In LabVIEW 7.1.x and earlier, whenever you create a new VI, if you show the connector pane, it "autosizes" to contain exactly the same number of terminals as you have controls and indicators on your front panel.  This inherent behavior was in direct contradiction to the common LabVIEW style rule dictating that you should always have extra terminals on your connector pane.  Well, in LabVIEW 8.0, when you create a new VI, it defaults to have the familiar 4x2x2x4 connector pane whenever you show the connector.
 
-D
Message 1 of 15
(13,216 Views)

Good info!

 

One thing I missed when starting out programming in LabVIEW is that anything outside of your border is transparent, so if you want to make a VI with a custom-sized icon (say something like the triangle of the + primitive), you can just create the icon with a smaller border.  This is useful for really small VIs which will perform well known, simple, and highly modular tasks like the primitive mathematics functions.

Message Edited by Travis M. on 03-06-2006 11:03 AM

Travis M
LabVIEW R&D
National Instruments
Message 2 of 15
(13,198 Views)

Is there a way to specify a default connector pane size in LV 8.0 other than the 4x2x2x4?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 15
(13,184 Views)

many thanks to the style upgrade on connectors in LV8

I sure like this connector. It has enough pins to connect a lot of parameters, and still is easy to select with the mouse.

The next one in the line already has too many connections to remember let alone the two at the lower left corner of patterns.

If you need more than 12 connections, yu should stop and rethink what you should bundle in a typedef!

(maybe some genius also connects the errorin and errorut to the correct plug!

greetings from the Netherlands
0 Kudos
Message 4 of 15
(13,180 Views)

Heh, I figured when I wrote this nugget that somebody would ask about changing the default con pane.  Yes, it's possible, but undocumented.  Consider this post your documentation.  You can add a line to your LabVIEW INI file that says the following:

defaultConPane=[number]

Where [number] is the numeric identifier of the connector pane you wish to use.  How do you find out this number, you ask?  Simple...run the VI I've attached to this post (saved in 8.0 format).  So, as an example, if you wanted all new VIs to have the 5x3x3x5 pattern instead of 4x2x2x4, you would put defaultConPane=4833 in your LabVIEW INI file.

Oh, and if, for whatever reason, you prefer the LabVIEW 7.x and earlier behavior, where the pattern is autoselected to match the number of front panel controls/indicators, you can use defaultConPane=-1.

Hope this helps,
-D

Message Edited by Darren on 03-06-2006 01:23 PM

Message 5 of 15
(13,168 Views)

Hi Darren,

      Nice, thanks!  That's easier than selecting/deleting everything except the default border. Smiley Wink

Seems appropriate to mention that icons can be copied/pasted too (ctrl-C, ctrlV.)

Cheers.

 

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 6 of 15
(13,144 Views)
Thank you for documenting how to change the default connector pane.  That will come in very handy!  Some companies prescribe connector pane size for "ease" of integration and standardization across projects.
 
Ryan
Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 7 of 15
(13,138 Views)
Hello Darren,
I read somewhere another very interesting issue about VI-icons. It is possible, to create a 32x32 pixel Bitmap with the graphical program of your choice (even MS Paint ist good enough), and then drag the file from the Win-Explorer onto the the icon of the front panel. If you drop it there, LV then creates all three icons (256 cols, 16 cols & b/w) on the basis of this .bmp.
So when I start a new project, one of the first do's is creating a new bmp, e.g. in the style of the "probability and statistics"-VIs, with a framed heading and a blank field below. Then you can draw something different for every VI with the LV- icon-editor.
David
Greets, Dave
Message 8 of 15
(12,898 Views)

Thanks a lot, David...you stole one of my future nugget ideas!  😛

Seriously though, the file dragging into the icon is indeed a nifty feature.  We use it internally at NI all the time whenever we get icon image files from our "icon designer" for our new VIs.

-D

0 Kudos
Message 9 of 15
(12,864 Views)

"icon designer" ?

Wow! Now there is a job for you. Just draw pictures and the code does not even have to run. Smiley Wink

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 15
(12,854 Views)