Monday, November 2, 2009

LabVIEW Performance Tips and Tricks Webcast - Wednesday, November 4th at 11 AM

This week I am giving the following LabVIEW Virtual User Group presentation:

NI LabVIEW Virtual User Groups: Tips and Tricks to Increase LabVIEW Performance and Speed

My co-host will be Todd Sierer (of An Engineering Mind fame), and I will be giving the same Performance Tips and Tricks presentation that I gave at NI Week 2009. Hope to (virtually) see you there!

Tuesday, October 27, 2009

Progress Report #1 - The Block Diagram Cleanup Experiment

As I mentioned a few months ago, I am attempting to use Block Diagram Cleanup for 100% of my diagram arrangement needs in LabVIEW 2009. I figured I might post updates every once in a while detailing my progress. So here, in no particular order, are some of my observations and impressions after heavy use of block diagram cleanup for a few months:
  • It Creates Big Diagrams - When left to my own devices, I create tight diagrams with very little whitespace. I have very quickly discovered that diagram cleanup is rather liberal with its allocation of whitespace. :) Typically this is because I've got a moderately nested diagram, and diagram cleanup doesn't quite know how to allocate space in each frame of a multiframe structure such that whitespace is minimized. I imagine this would be a rather difficult problem to solve, since it would require the repositioning algorithm to simultaneously keep track of the spacing in each frame of a multiframe structure.
  • It Doesn't Respect My Window Size - Along similar lines, the diagram gets resized and often goes past the height and/or width of the diagram window. Sometimes I have diagram windows set to a particular size for a reason, and if I were arranging the diagram myself, I would fit the diagram within those window bounds. I wish we could constrain diagram cleanup to the current diagram's window bounds.
  • It Creates Bendy Wires - I've always been very careful to minimize the number of bends in my wires, maybe because my boss was always very picky about it. In fact, he's the one who insisted "Wire Bends" be a test that shipped with VI Analyzer 1.0! Anyway, diagram cleanup doesn't seem to be so concerned about wire bends. From what little I know about the cleanup algorithm, this makes sense because the algorithm is very much concerned with node placement, and not so much wire placement (except for its strict insistence on keeping error wires straight, which I like). But if you've got nodes that you've arranged just to keep non-error wires straight, diagram cleanup will not take this into account when rearranging. Also, if you've got constants wired to things, and you've got the constants positioned to minimize wire bends, I frequently see the constant moved, and wires bent as a result.
  • It Moves My Control Terminal Labels - I like my control terminals on the sides (left for controls, right for indicators)...in fact, I added the Ctrl-Space-Ctrl-T shortcut in LabVIEW 2009 to make it easier to perform this operation in bulk for all top-level terminals on the diagram. But I've noticed my terminal labels get moved by cleanup, and it doesn't look like something that's configurable.
  • But...I Code Faster - Despite its shortcomings, block diagram cleanup allows me to code *much* faster than I do when arranging the diagram myself. I don't have any specifics, but I'd estimate that I write VIs about twice as fast as normal when I spend zero time arranging diagram objects myself.
These are my first impressions of block diagram cleanup, with just a few months of LabVIEW 2009 development (on a mishmash of small projects). But right now, I'm in the beginning stages of writing a LabVIEW Class-based prototype for a LabVIEW Scripting architecture for my current project. I hope to post more detailed observations as I become more involved in this adventure.

Friday, October 16, 2009

Quick Drop Keyboard Shortcut - Commands for "Create" Menu Options

My third post-release Quick Drop keyboard shortcut is now available on the NI Community website. This shortcut allows you to perform all the options in the right-click > Create... menu with your keyboard. You can perform these operations with one or more objects selected. For example, you could select several control terminals on the diagram, press Ctrl-Space, type reference, and press Ctrl-A, and a control reference will be created for each one, just as if you had right-clicked them individually and selected Create > Reference on each one. Check it out and let me know what you think:

Quick Drop Keyboard Shortcut - Commands for "Create" Menu Options

Friday, October 9, 2009

Quick Drop Keyboard Shortcut - Create Object from Terminal

My second post-release Quick Drop keyboard shortcut is now available on the NI Community website. This shortcut allows you to perform the Create Control/Indicator/Constant action on a terminal without having to navigate the right-click menus, simply by pressing the shortcut keys while hovering your mouse over the terminal. You can also optionally use the Quick Drop combo box to type the value of a constant created in this manner. Check it out and let me know what you think:


Note: This shortcut works on Windows and Linux, but not Mac.

Thursday, August 20, 2009

Quick Drop Keyboard Shortcut - VI Server Rename

I just posted my first post-release Quick Drop keyboard shortcut on the NI Community website. This shortcut allows you to avoid the maze of right-click submenus you must navigate whenever you want to specify the VI Server class of a Class Specifier Constant, Property Node, or Invoke Node. It also allows you to specify the name of a property or method for a Property Node or Invoke Node if you don't feel like navigating those right-click menus either. Check it out and let me know what you think:

Quick Drop Keyboard Shortcut - VI Server Rename

And look for more shortcuts coming soon!

Wednesday, August 5, 2009

Write Your Own Quick Drop Keyboard Shortcuts in LabVIEW 2009

I've always thought it would be great to define my own editor operations that occur when a certain key combination is pressed. Unfortunately, every single key combination, from Ctrl-A to Ctrl-Z, is currently taken by some operation in the LabVIEW editor. During LabVIEW 2009 development, I spoke to some of my colleagues in LabVIEW R&D to see how hard it would be to allow users to override default key combinations in LabVIEW with their own G-based features. Turns out it would be pretty tough to modify the LabVIEW editor in this manner, and nobody seemed to think it could be done anytime soon.

So I took matters into my own hands and did the next best thing I could think of, which was to define some key combinations that would perform certain editor operations while Quick Drop was visible. Once you've pressed Ctrl-Space, you're in my world now. :) So in LabVIEW 2009, there are three key combinations that I've defined:
  • Ctrl-[shift]-D - If you select some diagram objects, then press Ctrl-Space-Ctrl-D, controls and indicators will be automatically created and wired for all inputs and outputs of the selected objects. If you press Ctrl-Space-Ctrl-Shift-D, constants will be created and wired for all inputs.
  • Ctrl-R - If you select some diagram objects, then press Ctrl-Space-Ctrl-R, those objects will be removed from the diagram, but all wires that had pass-through inputs and outputs on those objects (like refnum or error wires) will be retained.
  • Ctrl-T - If you press Ctrl-Space-Ctrl-T while a diagram is open, the labels of all control/indicator terminals on the top-level diagram are moved the left/right of the terminal, respectively.
But wait, there's more! I designed this feature with everybody in mind, knowing that you might want to create your own Quick Drop shortcuts, or maybe you want to replace mine with something better. So yes, Quick Drop keyboard shortcuts are a plugin architecture, and you are free to use LabVIEW Scripting to write your own shortcuts! You'll notice that the following folder now exists in LabVIEW 2009:

[LabVIEW 2009]\resource\dialog\QuickDrop\plugins

Inside this folder are d.vi, r.vi, and t.vi. Those are the VIs that define the Ctrl-[shift]-D, Ctrl-R, and Ctrl-T shortcuts in Quick Drop. If you want to write your own shortcut (let's say it's Ctrl-E), start with resource\dialog\QuickDrop\QuickDrop Plugin Template.vi, save it as e.vi in the plugins folder, and now you have a Ctrl-Space-Ctrl-E shortcut!

As I get time in the coming months, I plan on posting new shortcuts to the NI Community that I didn't quite have time to squeeze into the LabVIEW 2009 release.

Tuesday, July 21, 2009

My NI Week 2009 Plans

I was inspired by Christina's NI Week post on her blog to post my tentative NI Week 2009 schedule, in case anybody is wondering where I'll be during NI Week. After each morning's keynote, I'm planning on helping out in the What's New With LabVIEW hands-on sessions at 10:30 in Room 18C each morning. After that, here are my plans (which are subject to change based on hunger, long conversations about LabVIEW, impromptu VI-writing contests, challenges from Guitar Hero robots, and many other possible NI Week-sanctioned distractions):

Tuesday
  • LabVIEW Experts Panel: 12:00, Technology Theater. Maybe a LabVIEW Artisan will be allowed to hang out with LabVIEW Experts?
  • Hack Your Car with NI-CAN: 1:00, Room 15. I've driven my car for months with the Check Engine light on, with no (visible) ill effects. I sure would like to be able to figure out why that light is *really* on.
  • LabVIEW Scripting: 2:15, Room 16B. I'll be there mainly to help answer any specific scripting questions that might come up.
  • New Software Engineering Tools in LabVIEW: 3:30, Room 16B. I honestly don't know what we're presenting on here, and I'm curious to find out.
  • Challenge the Champions: 5:00, Technology Theater. I wrote some of the questions for this year's event (and not a single one of them has to do with Express VIs!).
  • LAVA BBQ: 8:00, Stubb's. I *think* I can make it this year, but I'm not sure yet.
Wednesday
  • Past, Present, and Future of Robots: 1:00, Room 17B. The dude that runs the Roomba company is presenting this one.
  • Tools and APIs to Build on the LabVIEW Platform Hands-On: 2:15, Room 18C. I helped write a lot of the initial content for this, so I'm interested to see how it turned out.
  • Memory Management in LabVIEW: 3:30, Room 16B. Dan H. is one of the foremost experts on the guts of LabVIEW. I've seen some of the content for this presentation and it should be great.
  • Tips and Tricks to Speed LabVIEW Development: 4:45, Room 16A. I'm presenting this one, so I should probably show up. For those of you who came to my performance tips and tricks presentation at NI Week 2008, I've got a brand new set of tips and tricks up my sleeve this year. Don't miss it!
Thursday
  • LabVIEW Coding Challenge: High Noon, Technology Theater. Who dares challenge me after my resounding victory at NI Week 2008? You have all had a year to practice with Quick Drop, so no more excuses! I'm looking at you, Jim. :)
  • Web Services in LabVIEW: 1:00, Room 16B. I must admit, I know a lot less about web services than I should.
  • Improving the LabVIEW Upgrade Experience: 2:15, Room 16A. I'm always telling people about great new LabVIEW features, so I should probably be familiar with issues people have when trying to upgrade so they can use those new features.
So if you made it this far, I have a couple of other things to mention about NI Week 2009:
  • I plan on twittering frequently (with my new iPhone!) about what I'm doing and cool stuff I'm seeing at NI Week 2009. Follow me at http://www.twitter.com/dnatt if you don't already.
  • The NI Week program incorrectly lists me as the presenter for Beyond the Basics: LabVIEW Debugging Techniques on Tuesday at 2:15. Actually, Tycho C., the author of the Desktop Execution Trace Toolkit, is giving that presentation.