m3nth Posted July 12, 2005 Report Share Posted July 12, 2005 Alright... I'm starting a post to vet what becomes common wisdom once you've been using LabVIEW forever, but which newbies are sometimes uninformed of. The thought behind this post was that I just discovered something "new" the other day that I have never seen mentioned anywhere and have never stumbled upon before. I wound up asking myself, "How come I never knew this?" So having found myself in the newbie category once again, hopefully people will share their favorite insights here and maybe this thread will become a quick and dirty list of tips, shortcuts and techniques that can help the newcomer quickly become a masterful LabVIEW programmer! :thumbup: What are your favorites? I'll start with these: - My personal favorite is probably Ctrl+Double-Clicking to go straight to the block diagram - My second favorite technique is the LV2 functional global - The "new" thing I stumbled across the other day was double clicking the font in the icon-editor. This brings up a dialog to set the font you want if you don't like the default. Quote Link to comment
Barrie Posted July 12, 2005 Report Share Posted July 12, 2005 Alright... I'm starting a post to vet what becomes common wisdom once you've been using LabVIEW forever, but which newbies are sometimes uninformed of. The thought behind this post was that I just discovered something "new" the other day that I have never seen mentioned anywhere and have never stumbled upon before. I wound up asking myself, "How come I never knew this?"So having found myself in the newbie category once again, hopefully people will share their favorite insights here and maybe this thread will become a quick and dirty list of tips, shortcuts and techniques that can help the newcomer quickly become a masterful LabVIEW programmer! :thumbup: What are your favorites? I'll start with these: - My personal favorite is probably Ctrl+Double-Clicking to go straight to the block diagram - My second favorite technique is the LV2 functional global - The "new" thing I stumbled across the other day was double clicking the font in the icon-editor. This brings up a dialog to set the font you want if you don't like the default. 5297[/snapback] I'll chip in! In the same category of the icon editor: Double-clicking the "Selection Box" selects the entire icon. (+del key =A fast way to delete the Default Icon) Double-clicking the "Rectangle Box" puts a rectangle around the icon perimeter. Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside. BTW, it wasn't until some months with 7.0 that I discovered the font trick myself, but it was only after I fought with the itty bitty font default that came with 7.0 Barrie Quote Link to comment
Riceman Posted July 13, 2005 Report Share Posted July 13, 2005 2 of them that I use a lot, besides the Ctrl + Double Click on subVI. 1) Ctrl + Drag'n'Drop a Block (or a selection of blocks) duplicates it, even if it is a variable, property node, reference or whatever (and does not create a new one as with Ctrl+C, Ctrl+V) 2) This one I discovered accidentally while performing an operation in 1). If you hold down Ctrl + Turn the Mouse Wheel Up/Down inside Structures like Case, Event, etc. (where there may more than one case), LabView will loop through the structure showing each case as you move the wheel. Please, notice that I use LabView 7.1. Don't know for other versions. Quote Link to comment
Ed Dickens Posted July 13, 2005 Report Share Posted July 13, 2005 With the Auto Tool turned on, press and hold 'Shift+Ctrl'. This brings up the Scroll Window tool (the open hand). Now you can click and drag (anywhere on a blank area) the window contents around on the either the front panel or block diagram. Of course none of us should ever need this short cut because none of our diagrams ever get larger than a single screen. Ed Quote Link to comment
FLX Posted July 13, 2005 Report Share Posted July 13, 2005 Drag and drop VI icon over string control to get the VI name into the control. Quote Link to comment
Riceman Posted July 14, 2005 Report Share Posted July 14, 2005 Another very good tip is to check out in the LabView Help Contents, under the QuickTips Heading. In there, are a lot of good practice tips and shortcuts separated in many categories. Quote Link to comment
smenjoulet Posted July 14, 2005 Report Share Posted July 14, 2005 Always leave some extra open (unused) connections on the connector pane. You'll save yourself a lot of time and pain :headbang: on that inevitbale day when you need to add some more I/O to a VI you swore you'd never need to expand. You have to choose a new connector pane, possibly rearrange your control/indicator connections, and start relinking (and possibly rewiring) every instance where you call the subVI... Quote Link to comment
maximus Posted July 15, 2005 Report Share Posted July 15, 2005 Of course none of us should ever need this short cut because none of our diagrams ever get larger than a single screen. 5306[/snapback] We work with a 21' monitor Quote Link to comment
Rolf Kalbermatter Posted August 12, 2005 Report Share Posted August 12, 2005 I'll chip in! In the same category of the icon editor:Double-clicking the "Selection Box" selects the entire icon. (+del key =A fast way to delete the Default Icon) Double-clicking the "Rectangle Box" puts a rectangle around the icon perimeter. Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside. BTW, it wasn't until some months with 7.0 that I discovered the font trick myself, but it was only after I fought with the itty bitty font default that came with 7.0 Barrie 5299[/snapback] In the icon editor category: If you have entered text and before you select another tool use the cursor keys to move the text around pixel by pixel to make it center nicely etc. Quote Link to comment
Yair Posted August 12, 2005 Report Share Posted August 12, 2005 You can swap the inputs on most double input functions (comparison, numeric...) by holding ctrl down and hovering over the function. If both inputs are wired, you will see the arrow change to a sort of double loop and a click will swap the inputs. This is useful if you wired something to the wrong input (like in the divide function) or if you want to make your diagram cleaner after writing the code and you want to move the function above or below other wires\functions. Shift+mouse scroll causes the scrolling to happen in large jumps. This is useful in case you have large diagrams (not that I have any, of course) and let's you have even less exercise. Positioning the cursor over the horizontal scroll bar and scrolling the mouse causes the display to scroll left and right. Not exactly hidden, but something that's easy to miss - right clicking a subVI and entering SubVI Node Setup allows you to immediately set some of the window appearance properties. For those who have office help installed - If you have an ActiveX property or method, you can right click it and select Help For property name and it will take you straight to the relevant place in the office help files. A select function accept an error cluster, just like a case structure does. Quote Link to comment
tengels Posted August 15, 2005 Report Share Posted August 15, 2005 2 of them that I use a lot, besides the Ctrl + Double Click on subVI.1) Ctrl + Drag'n'Drop a Block (or a selection of blocks) duplicates it, even if it is a variable, property node, reference or whatever (and does not create a new one as with Ctrl+C, Ctrl+V) 2) This one I discovered accidentally while performing an operation in 1). If you hold down Ctrl + Turn the Mouse Wheel Up/Down inside Structures like Case, Event, etc. (where there may more than one case), LabView will loop through the structure showing each case as you move the wheel. Please, notice that I use LabView 7.1. Don't know for other versions. 5303[/snapback] An extra thing I miss here is the Ctrl + E to switch between Block diagram and front panel :thumbup: Quote Link to comment
Neville D Posted August 15, 2005 Report Share Posted August 15, 2005 Two tips: 1 To make more space on the block diagram press Ctrl and drag. 2 For icon editing, you can drag a picture file or another VI's icon over (with the arrow tool) and automatically update the icon picture. Enjoy! Neville. Quote Link to comment
FZJ_Teststand Posted August 16, 2005 Report Share Posted August 16, 2005 ...my favorite is still the ctrl-B for cleaning up unconnected / loose wires ... Quote Link to comment
RaviPaike Posted August 16, 2005 Report Share Posted August 16, 2005 Hi All, Want to see help content for any instrument just click on the Instrument and then press Cntrl + H will bring the help for that instrument. Ravi Quote Link to comment
Michael Aivaliotis Posted August 22, 2005 Report Share Posted August 22, 2005 Well, speaking of Icon editing: If you pick the font called: SMALL FONTS and use CAPS with size 8 then this looks great in the icon regardless of what you type. Quote Link to comment
m3nth Posted August 22, 2005 Author Report Share Posted August 22, 2005 Well, speaking of Icon editing: If you pick the font called: SMALL FONTS and use CAPS with size 8 then this looks great in the icon regardless of what you type. 5749[/snapback] Wow. I use a custom font that I have developed myself for icons which I usually do by hand (I have it memorized) but I wind up using the default sometimes for speed even though I don't think it looks nearly as nice. The small font with caps is veryyyyyy similiar to the custom font I draw though--that should make a good (new) default font for me. Excellent tip. Quote Link to comment
m3nth Posted August 22, 2005 Author Report Share Posted August 22, 2005 Here's another thing that's the most obvious in the world but which I never found for a long time: If you view the radix of a numeric on a control or indicator you can change the formatting by clicking the radix and selecting a new one (hex/oct/bin/decimal/etc). This comes in really handy sometimes while debugging since you can change the radix on the fly without having to stop everything and start over. Speaking of which, a 'p' is used for SI notation... anybody know what 'p' is for? Quote Link to comment
baturin Posted August 22, 2005 Report Share Posted August 22, 2005 Speaking of which, a 'p' is used for SI notation... anybody know what 'p' is for? I think this should be pico (1e-12)... Quote Link to comment
Anu Kalidas Posted September 3, 2005 Report Share Posted September 3, 2005 Select SHIFT + right click to get the tools pallete on FP or block diagram. Quote Link to comment
m3nth Posted September 3, 2005 Author Report Share Posted September 3, 2005 I think this should be pico (1e-12)... 5760[/snapback] No, not what 'p' is in SI, but why it is used to represent SI: d = decimal o = octal x = hex b = binary p = SI?? Quote Link to comment
Jeffrey Habets Posted September 3, 2005 Report Share Posted September 3, 2005 I know there are quite some folks who disable the autowiring feature because they want to stay in control of the wires (of course). But did you know you can very easily toggle the autowiring on and off with the 'a' key? This in combination with the space-bar for changing the wires' direction (which y'all probably knew already) makes a quite powerfull combo and certainly saves me some mouseclicks now and then. Quote Link to comment
peteski Posted September 8, 2005 Report Share Posted September 8, 2005 Conditional Breakpoints My all time favorite debugging trick is setting "conditional breakpoints." In the pre-labview 7 days, I would put a case structure and set at least one of the cases with a breakpoint, and the other(s) without. This is good for capturing a complex setup in a "snapshot" when suspect value(s) slip down the pipeline. In a simple case, let's say a double precision number turns up with a "NaN" value, you could test for the "NaN", and if true, execute the true condition of a case statement which holds nothing but a breakpoint - unless, of course, you want something in the case statement beside the breakpoint. In Labview 7.1.1, it appears that in the custom probes there is a "conditional * probe" (* = datatype probed) which does the same thing, although I would say that the nice thing about the previous example is that rather complex conditions can be selectively probed quite easily, the hard part being *knowing* the complex condition you want to probe. Of course, True Labview Zen Masters would NEVER need probes, breakpoints, or debugging now, would they... -Pete Liiva Quote Link to comment
jpdrolet Posted September 8, 2005 Report Share Posted September 8, 2005 Yeah but for your specific example (testing for NaN) the native Conditional Double Probre doesn't work since (anything == NaN) will always return False, even (NaN == NaN). You have to wire your own custom probe to test for NaN using Not A Numbe/Path/Refnum. OK I'm picky. Quote Link to comment
peteski Posted September 8, 2005 Report Share Posted September 8, 2005 Yeah but for your specific example (testing for NaN) the native Conditional Double Probre doesn't work since (anything == NaN) will always return False, even (NaN == NaN). You have to wire your own custom probe to test for NaN using Not A Numbe/Path/Refnum. OK I'm picky. 6044[/snapback] Nice catch! I didn't realize that, although I hadn't really worked with the native conditional probes much yet. It also now occurs to me that one advantage to the "old school" method over the "new native" is that you can save your breakpoint in the diagram and close up the sub-vi. As far as I've seen it in the past, probes always seem to need the diagram they are on to be open, which means their front panel is open, which can sometimes be less than desirable. -Pete Liiva Quote Link to comment
WMassey Posted September 9, 2005 Report Share Posted September 9, 2005 Vektrex has a good list of useful shortcuts & tips. The escape key will cancel a text entry, wiring change, item resize, move or other change if pressed before the mouse button is released. Use Ctrl-Z to undo changes after the mouse button is released. I sometimes find it useful to have more than just the default 8 undo steps (I have it set to 50). To change it go to Tools -> Options... -> Block Diagram and remove the check next to "Use Default" and enter your own value. Ctrl-Shift-Z is used to redo changes that have been undone. Shift Key speed boost also works with objects being moved using the arrow keys And while this has already been said "Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside", it also provides a quick way to erase the existing icon. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.