Monday, January 28, 2008

Find number of times occurring element in an array

To find the particular element occurrence in an array is easily accomplished without using any loops. The method is (See Picture 1 & 2),






























This method is work on both numeric & string array.(for more methods see NI
Discussion Forums )

Wednesday, January 23, 2008

Converting string array to concatenated string

The conversion of string array elements to concatenated string is easily accomplished without using for loop with shift register concatenation .For concatenating the array elements into string without any delimiter is easily attained by the tool Concatenate Strings.Get Concatenate Strings tool by, Function palette->string-> Concatenate Strings
Wire the string array to Concatenate Strings single terminal and create the indicator to see the concatenated String (See Picture 1 & 2).












The numeric array elements concatenation is also possible by converting the numeric array to string array and Concatenate Strings then convert back to numeric indicator( See picture 3 & 4).

Tuesday, January 22, 2008

Checking the File existence in particular path

The most of the projects file creation & deletion operation is needed. On these operations file existence checking for particular file path is important. For file existence checking there is no direct tool in LabVIEW 7.1 and below versions. But its accomplished by File/Directory Info tool.

To get this tool,

Functions Palette->File I/O-> Advanced File functions-> File/Directory Info.









Wire the error out of this tool to case structure . The No Error case denotes the File is exists,if error is getting means the file does not exists (See picture 1)

Getting Application Path for an EXE

In development environment the the current VI path tool gives the path. For an EXE we are not getting the exact path. For gettting the current VI path for an EXE use property node from
Functions palette->Application Control->Property Node, The properties Application kind & Application directory are selected by
click on the property node ->Application->Kind & for next property
click on the property node ->Application->Directory Path (See Picture 1)















Connect the Application kind to case structure terminal to get the Development system,Run time System and more kinds..
Use the Directory path wire for getting current path for an EXE (See Picture 2)