LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create 22x2 array string an numbers

Solved!
Go to solution

 

I'm new in LabView and I need to create and array with 22 rows and 2 columns, the elements can be text and numbers as:

 

fodu1tx                  22183.000000
fodu2tx                  23191.000000

currentmod1         qpsk

currentmod2         fpsk
fidu1315                315.000000
fidu2315                315.000000
    .                                .

    .                                .

    .                                .

    .                                .

    .                                .

 

any ideas?

thank you

0 Kudos
Message 1 of 13
(4,119 Views)

Do you want the number to be stored as a value in a string?

 

If the number can be stored as a string, then just use a 2 x 22 string array.  You woult use the string to number conversion functions, and number to string to work with the number putting it into or getting it out of the string array.

Message 2 of 13
(4,114 Views)

No, I need to use string and numbers

can we do that?

 

0 Kudos
Message 3 of 13
(4,108 Views)

 

I can not find the String Array fuction

0 Kudos
Message 4 of 13
(4,101 Views)

Create a cluster and place inside, one string and one number.

Then take that cluster and put it, in an 1D array.

 

Is this ok?

Message 5 of 13
(4,100 Views)

 

Can you show me a diagram?

 

sorry but just beginning with labview

0 Kudos
Message 6 of 13
(4,092 Views)

If you want a simple 2D array, you have to use a string array. Arrays have to be a single data type.

 

There is an array constant on the Array palette. To create an array of a specific type, you just insert the appropriate control/constant into the blank array.

Message 7 of 13
(4,074 Views)

To my knowledge, there is no way to have an array with strings in one column and numbers in another. They can only hold one data type. The easy fix to this is to convert one type to the other.

 

Like so: 

Message Edited by Cory K on 11-06-2008 02:46 PM
Cory K
Message 8 of 13
(4,065 Views)

What about if I have just Strings?

 

I have a File with settings for a test, txt file has 22 rows with name and setting "Name" "spec" separated by one space.

 

I need to read line by line the txt file, separate the line in name and spec and put it in variable to used during all program, see the data below.

 

I need a VI to do all of this and get the data from array just with the row and column.

 

thank you for your help 

 

 

 

 

fodu1tx 22183.000000
fodu2tx 23191.000000
fidu1315 315.000000
fidu2315 315.000000
fodu1540 540.000000
fodu2540 540.000000
bw1 80
bw2 80
currentspeed 3
currentmod qpsk
serial1 00000004
serial2 00000001
currentfreq 5974.850000
sa8593 0
temperature_chamber testequity
modelname1 23E-2A
modelname2 23E-2B
labelprintersmall \\10.14.0.106\LpSmall
labelprinterlarge \\10.14.0.106\LpLarge
comidu1 COM1
comidu2 COM2
comoven COM4
station Danielson

0 Kudos
Message 9 of 13
(4,050 Views)
Solution
Accepted by topic author Montoya
I'm not sure why you would need to read it line by line. It usually much simpler to read it all at once and then use the Index Array function to get the appropriate data.
Download All
Message 10 of 13
(4,043 Views)