A look at National Instruments' Labview 2011 ahead of this year's NIDays conference in London.
National Instruments Labview 2011
The latest version of the venerable LabVIEW real-time programming tool majors on stability and speed, according to maker National Instruments (NI). Certainly this was borne out in testing, with bugs and crashes hard to find, and NI's database of customer reports seems to say the same thing, with fewer fault reports for this version than for previous releases.
So, another year, another LabVIEW release? Not quite; this is a major release, not a maintenance release, and there are plenty of new features to make existing users happy, not least because many of them are the result of suggestions and requests from existing users. NI has made significant use of feedback from its Idea Exchange online forum, which it launched last year.
Among the tweaks and updates derived from suggestions made by LabVIEW users are the capability to auto-align wires within a LabVIEW diagram to make it look tidier and easier to read, an 'undo after save' feature, and more right-click options, for example to modify controls more easily. LabVIEW is also more intelligent in general at letting you make connections graphically, rather than expecting you to do the work through sub-menus and definitions, and by writing code from scratch.
As well as inheriting thousands of engineering-specific functions such as frequency analysis, curve fitting, and more, LabVIEW 2011 adds 57 new high-performance FPGA analysis functions, and several new VIs, including new functions for performing signal processing, geometry and linear algebra.
Other significant new features include integration with .m file structures and assemblies from the latest Microsoft .Net framework, new user interface libraries, new maths and signal processing VIs, and APIs for controlling asynchronous threads.
The latter, under the banner of asynchronous call-by reference, allows designer to create a re-entrant sub-VI that can be called multiple times and run in parallel, without knowing in advance how many parallel versions will be needed. It also means a sub-VI can be called without the calling module then having to wait for it to complete its work – the caller can carry on doing other work itself.
The latter should prove very useful to developers as LabVIEW systems grow ever more complex, as will NI's work to enhance stability and improve code validation, as mentioned. One of NI's big targets for the future is to do more mission-critical work, such as medical, military and avionics systems, and of course the stability aspect is vital here.
As part of that, NI says it spent more than three times as long testing LabVIEW 2011 as it did on previous versions. It has also restructured the way it collects data in case of a crash with an error reporter and an auto-save feature that should save at least some of your work.
Graphical programming for engineering: the background
Billed as 'the ultimate system design software for measurement and control', LabVIEW's aim is to abstract the complexity of working with embedded systems, just as development tools for Windows and the like abstract the complexity of programming for a PC.
Like Windows itself, it performs this abstraction through graphical metaphors – indeed, it is a graphical programming environment, with programs called VIs, or virtual instruments, because many of them they emulate real instruments. It integrates with a wide range of hardware from both NI and its partners, it has engineering-specific code libraries, and it lets you deploy your programs to multiple targets.
As a LabVIEW programmer, blocks (or VIs) are taken from drop-down palettes. You drop in user interface functions such as screens, dials and knobs, and can then add text, and resize and recolour items, building up a virtual front panel for your design. On the associated block diagram, which represents the hardware behind that front panel, each UI item is represented as a program block which can be configured with a function. These blocks can then be connected to move data around.
One concept to understand is that this is dataflow programming, so actions and events run in the order that their blocks or VIs are connected together, as that determines when data arrives at one block from another. It does not execute lines of code sequentially, as most programming languages would. It is also inherently multi-threaded, to run faster on multicore processors.
The program can then be deployed to a real-time target such as one of NI's CompactRIO real-time controllers. Depending on the model, the target device can include both a PC-based element for the supervisory tasks and an FPGA for real-time work.
NI's approach may be proprietary to a greater or lesser degree – and it certainly does not take away the need to understand the underlying physics – but the up side is that it brings a standardised hardware architecture and can also yield faster, simpler development.
As NI's developers work to speed up program development and deployment, and to cut the cost of the target devices, the company aims to reach more and more of the 'long tail' - those projects that are neither large enough volume nor uniquely sophisticated enough to justify the development work to embed them. The theory is that traditional embedded system design can be quite daunting, and the faster you can deploy an embedded system, the more systems you can move over to embedded.
As one might expect, LabVIEW 2011 has an interface to build executables and deploy them to real-time targets. Compared with previous LabVIEW releases, this version also loads faster and is quicker at performing common actions, such as launching the icon editor or editing FPGA nodes.
NI has improved its object caching, which will be especially useful to developers who need to test their code iteratively. The ability to cache cross-compiled VI code in LabVIEW's data directory means that only modules that have changed must be recompiled for subsequent hardware deployments. That in turn means that as you iteratively deploy and test code, you can save a lot of deployment time.
Similarly, each time you redeploy, the new LabVIEW 2011 Real-Time Module now keeps in place on the target those VIs which have not been modified since they were deployed, making app redeployment even faster. According to NI, deployment can be sped up by a factor of five, although of course this depends on how many modules you change each time.
Also useful for the development process are APIs to build a component definition file; this allows you to deploy a real-time executable as a versioned component so it selectively auto-deploys the latest version.
When you are working with a modular system such as this, you want to avoid reinventing the wheel. LabVIEW therefore includes an example finder which can browse hundreds of existing Vis and enables you to filter the – say, for a particular hardware device that you're using.
Related to this is the partner programme which was introduced last year. This let you buy and use third-party toolkits within LabVIEW 2010; it also gave NI's software partners access to a much larger market, in a similar fashion perhaps to the mobile phone appstores. This has been expanded with the latest release to make it easier to find and download add-ons.
On the hardware side, the release of LabVIEW 2011 was accompanied by two new families of RIO real-time controllers to act as targets for LabVIEW applications. These are the sbRIO-96 low-cost single-board range, and the much more capable slot-based CompactRIO-908 series which can run Windows or a real-time OS. *
The 2011 UK NIDays Graphical System Design Conference takes place at the Queen Elizabeth II Conference Centre in London on Wednesday 9 November. Details at