LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting arrays from cases, 2nd try

Hallo,

since my first trys of this topic was unclear, I try it again:

I have a case structure with two cases:

case 1: 2D-arrays, case 2: 1D-arrays and Strings

In the two subcases you have another select case -- structure with various cases:

case 1: subcase 1, subcase 2 etc.
case 2: subcase 1, subcase 2 etc.

I want to save the arrays and the strings to one text-file. How can I do that? If I connect a wire to one of the arrays, the VI doesn't run because of a "tunneling error" (missing assignment to tunnel).

I know how to write arrays to a file, my problem is getting them out of the case-structure.

Hoping fr help,

Arno
0 Kudos
Message 1 of 5
(2,917 Views)
To get clear: the arrays and strings are saved in the subcases. I want to save them to a file.
0 Kudos
Message 2 of 5
(2,917 Views)
Since Case 1 and Case 2 output different data types, you cannot put them on the same wire. Why don't you put the save operation inside the case structure, in case 1 you save the 2D array and in case 2 you save the 1D array and strings.

Alternatively, you can convert your data in each case to the final string result to be saved, which you then can save using write characters to file at a later point in the code. Since only a string leaves the case structure, there is no data conflict.
0 Kudos
Message 3 of 5
(2,917 Views)
Hallo,

>> Since Case 1 and Case 2 output different data types, you cannot put them on the same wire. Why don't you put the save operation inside the case structure, in case 1 you save the 2D array and in case 2 you save the 1D array and strings. <<

That works (I already tried), but I cannot use that idea because of two reasons: First, I want to save all the arrays and strings to ONE file in an order I decide. Second, the VI should do that with approx. 10 arrays / strings and that 100 times for 100 files. Working with temporary files is not possible.

>> Alternatively, you can convert your data in each case to the final string result to be saved, which you then can save using write characters to file at a later point in the code. Since only a
string leaves the case structure, there is no data conflict. <<

My problem is not a data conflict (arrays, strings etc.) but getting the data out of the case-structure. I don't even get a simple string constant out of it.

To make my problem clear, I attached a simple (not running) VI. "Your task" is getting the data out of the structures.

Arno
0 Kudos
Message 4 of 5
(2,917 Views)
Hallo,

I succeeded myself: I simply used local variables.

Arno
0 Kudos
Message 5 of 5
(2,917 Views)