Archive for July, 2011

LabWindows/CVI Success Story

Saturday, July 30th, 2011

LabWindows/CVIPerhaps we can help you with the CVI?

That was the question I posed to our client, who was struggling to find time to complete a LabWindows/CVI program for his customer. During development of the embedded side of our project, I had helped him integrate a CVI program communicating over the CAN network. When I found out he signed up to do another CVI program, I offered my help.

LabWindows/CVI is a “C” development tool by National Instruments, the makers of the popular LabView program. Like other application builders, you design a screen using rich, GUI controls and tie those controls to ANSI “C” callback functions. NI provides an extensive library of GUI routines as well as more sophisticated control and analysis modules.

For this particular project, we enhanced a tab-style user interface that would read and write values to the embedded system using the CAN protocol. Libraries to read/write the CAN messages were already available, so it was a matter of modifying the user interface and “hooking up” the callback routines.

As often happens with GUI programs, it’s very easy to generate a lot of repetitive code. Nothing feels worse to a software engineer than repetitive code. With a simple look-up table and algorithm, dozens of statements were replaced, making the program easier to follow and more maintainable.

What began with me looking-over-his shoulder, pair-programming remotely, (we use a GotoMeeting like program called Glance) morphed into doing the programming. By the end of the day, he sent me the source code so that I could continue on my own. The next day, while he was tied up in meetings, I continued making progress towards our goal. During his hour drive to the customer site for testing, I was still able to work – uploading the changes right before he arrived.

In the end, we successfully delivered the enhancements his customer needed by working in parallel with a very short amount of time.