Three Ways to Find SubVI in a LabVIEW Project

By Ralph - Last updated: Friday, March 13, 2009

If we change a subVI’s connector after used it a lot in a huge LabVIEW project, it’ll be a nightmare to open every VI in this project one by one and find the subVI in the diagram by hand. In fact, there are ways to find this subVI easily as following.

First, use menu View then select vi_Hierarchy, we can see VIs’ relationship, and which VI in this chart calls this subVI, and double click the corresponding VI to open the calling VI and edit it.

Second, maybe the easiest way to do it. If the connector of the subVI is different from previous. We just open the top-level VI. The top-level VI will show a broken run arrow. Just click the broken run arrow, it will popup a list of broken VIs. And this list is the subVI we want to find, just click the list items one by one to edit VIs.

Third, open top-level VI and open the subVI. Right click the subVI’s icon on the right-top of the subVI’s front panel or diagram window, and select Find All Instances. A window will pop up with the list of this subVI’s locations. We can click the items in this list to edit corresponding VIs.

Filed in LabVIEW, VI Software • Tags: , , , , ,

How to Change Waveform Charts’ Scales Programmatically In LabVIEW

By Ralph - Last updated: Friday, March 13, 2009

First, disable auto-scaling property of the waveform chart by editing Chart Properties Scales->Y-Axis and the uncheck Autoscale ;

Then, in the VI’s diagram, use property Y Scale –> Range –> Maximum and Minimum.  We can change these values in program and by this way, we can change waveform chart’s scales during runtime.

Filed in LabVIEW, VI Software • Tags: , , ,

Change the Color of a Picture Control’s Border Programmatically in LabVIEW

By Ralph - Last updated: Monday, March 2, 2009

In one of my project, there are about 24 pictures on the front panel. When the user selects one of these pictures, I want there is an interactive way to show which picture has been selected. And I think to change the picture control’s border color is a nice solution.

I can change the border color by using color tool in development mode, but there isn’t a property to change the border’s color programmatically. Finally, I found a way to work this around. Following is how to make this work:

Put a slightly bigger Boolean indicators or color boxes behind the picture indicators. When the picture is clicked or selected, we can change the color of the underlying Boolean indicators or the color boxes. By this way, the interactive effect is realized, and it looks great for me!

Filed in LabVIEW, VI Software • Tags: , , , ,

How to List Files within Subfolders in LabVIEW

By Ralph - Last updated: Monday, March 2, 2009

In LabVIEW, we can list all the files in a folder using the list folder.vi function. But, if we want to list all files including files in subfolders, should we use this function on each subfolder?

In fact, we can use only one VI that shipped with LabVIEW since version 7.0 to get this job done. The VI is vi.lib\utility\libraryn.llb\Recursive File List.vi. And this VI has been added to the palettes since LabVIEW version 8.2.

Filed in LabVIEW • Tags: , , ,

A Few Tips on VI Design in LabVIEW

By Ralph - Last updated: Tuesday, June 17, 2008

LabVIEW VIs are very similar to functions or subroutines in C programming language. It can be called inside of other VIs, once it was created. Here are a few tips on the design of VIs:

1. You should assign the inputs on the left terminals of the connector and the outputs to the right side, because all LabVIEW built-in functions follow this convention. And this aids the readability of the code.

2. It’s a good idea to have a few extra connectors in VI in case additional inputs and outputs are needed in the future.

3. About the icons of VIs. Try to create icons that are descriptive so that someone looking at the code for the first time can determine its function easily. Using text in the icons often helps.

Filed in LabVIEW, VI Software • Tags: , , , ,

Decode Serial Port File Transfer Protocols from Scratch with LabVIEW and Serial Monitor

By Ralph - Last updated: Friday, April 18, 2008

Sometimes we need to write our own software to transfer files to serial port connected device, like DNC, which provides manuals and working software but no source code or the author of the software does not exist or does not support the software anymore. So, it’s a must to decode the serial transfer protocol to build our own software which is based on this protocol.

Here, I’ll show how to decode the serial transfer protocol from scratch with the help of LabVIEW and Serial Monitor step by step.

Step 1, we need to install a serial monitor software. Here we use HHD Software Serial Monitor. This software provides a monitoring device driver, which lies upon the serial device driver of the Windows NT, Windows 2000 and Windows XP operating systems. It collects all information including data read and written, control codes received and sent to the underlying hardware by the user mode client. After the installation of the serial monitor software, we first run this monitor software and start a monitoring session and set it up to log all the activity of the serial port like the figure below. Read the rest of this entry »

Filed in LabVIEW, Misc, Serial & GPIB, VI Hardware, VI Software • Tags: , , , , , , , ,
Pages: Prev 1 2 3 4 Next