LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please Help - How do you access/read an element in array of strings

Hi,
 
I want to load up some VI's into subpanels and I have created a for next loop.  Outside the loop is my files and a build array function.  How do you read the first element of the string array?
 
I have been programming in Agilent VEE Pro for several years and I am only just learning LabVIEW.  It seems very different!  In VEE, you could use a formula to pass the first element of an array. eg. Array[Element No]
 
TIA
 
0 Kudos
Message 1 of 5
(3,602 Views)

Now that you are using a real graphical programming languageSmiley Wink, you use one of the graphical elements in LabVIEW. On the array palette is  a function called Index Array.

For learning the LabVIEW basics, check out the free tutorials.

 

Message 2 of 5
(3,593 Views)

Hi,

Well, I did try this but I get this error message:

You have connected a scalar (non-array) data type to an array of the same data type. This type conflict may be resolved by building the scalar type into an array. Check for a tunnel on a loop that has indexing incorrectly disabled.
The type of the source is string.
The type of the sink is 1-D array of
double [64-bit real (~15 digit precision)].

 

 

0 Kudos
Message 3 of 5
(3,583 Views)
You have discovered one of the features of LabVIEW. When you wire an array into a for loop, the for loop will auto-index the array. You do not need the Index Array function. You do not need to get the size of the array and wire that to the 'N' terminal. The for loop will automatically iterate to a count equal to the number of elements in the array.
Message 4 of 5
(3,578 Views)
Thanks for all your help. I am definately starting to get to grips with LabVIEW.
0 Kudos
Message 5 of 5
(3,493 Views)