11-06-2008 12:28 PM
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
Solved! Go to Solution.
11-06-2008 12:35 PM
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.
11-06-2008 12:49 PM
No, I need to use string and numbers
can we do that?
11-06-2008 01:02 PM
I can not find the String Array fuction
11-06-2008 01:03 PM
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?
11-06-2008 01:27 PM
Can you show me a diagram?
sorry but just beginning with labview
11-06-2008 01:44 PM
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.
11-06-2008 02:45 PM - edited 11-06-2008 02:46 PM
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:
11-06-2008 03:36 PM
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
11-06-2008 03:44 PM