LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the outputs from my inner case structure much larger than it should be?

I am trying to do the following: extract elements based on comparing text in my ring control to each element in my string array (purple wire in). If the text matches, I extract that element and build an array like I'm doing in the case structure. If the text doesn't match, I want my case structure to do nothing. But now my output seems to be the same size as the false case. What am I doing wrong?

Asasafuchi_0-1729147985824.png 

Asasafuchi_1-1729148090366.png

 

 

0 Kudos
Message 1 of 3
(95 Views)

We don't "do" truncated images of messy code. I recommend to attach your VI.

 

Note that your shift registers are not initialized and only reset to an empty array if i=0 AND the other boolean is true. Since we cannot tell what determines that other boolean value, it could be that the output of the AND is never true and the data in the shift registers will grow with each call.

 

Please also explain what you are trying to do. For example why are you adding duplicate values to the array?

 

To get more specific help, you need to attach your VI and explain exactly how you use it, what typical inputs are, what you expect as size and what you get instead. Also explain where your inner case structure is. I only see one case structure.

 

Hard to tell, but maybe all you need are conditional output tunnels. No need for case structures or shift registers.

0 Kudos
Message 2 of 3
(85 Views)

Sorry, here is the VI. I am trying to do the following: read in multiple xml files, parse them and create arrays by processing them one by one in a for loop that iterates through all files. From each file I want to create three arrays: one with the labels for each element, and two others containing different values associated with each label. I want to do this by creating a ring control containing all possible labels (without duplicates) and using said ring control I want to choose which label (and thereby arrays containing values) to extract. I then want to plot this in an XY graph.

 

I am adding duplicates because I want to create the following sequences. For the integer array: y,y, y2. 

For the double array: 0, x, x. 

0 Kudos
Message 3 of 3
(68 Views)