LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing both dimensions of an Array

is it possible in LabVIew to initialize a two-dimentional array.

What I mean by that is that..- like in the "initialize array" command we can initialize one-dimension of the array, is it possible both the dimensions.

Well, what I'm trying to do is to segregate an output string into certain components whom I hope to display in a two-dimensional array. I want to determine both the dimensions of the array by counting the number of variables in the output string.

 

I figured out how to count the length of the array's two dimensions, but don't know how to initialize both the dimensions of the array.

 

Any help would be much appreciated.

 

Thanks.

0 Kudos
Message 1 of 12
(2,871 Views)

"Initialize Array" is resizeable.  Click and drag the index terminal.

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
Message 2 of 12
(2,866 Views)

thanks!! that worked just fine.

One more thing, now how do I display a part of the output string that I've identified and distinguished from the rest of the string at a particular location in the two-dimensional array.???

 

thanks in advance.

cheers

Rajat

0 Kudos
Message 3 of 12
(2,850 Views)

ReplaceArraySubset ist your friend!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 12
(2,840 Views)

kudos are granted Smiley Wink

0 Kudos
Message 5 of 12
(2,835 Views)

I'm having trouble using the Replace-Array-Subset sub-VI. I want to use this commmand inside 2 for-loops (one for-loop is inside the other one).

 

But when I try to do this it gives me an error (see attachment). When I connect the same sub-VI in only one for-loop or outside the for-loop(s) i get no error.

 

What should I do now?? Which other command can I use???

0 Kudos
Message 6 of 12
(2,799 Views)

Hi Rajat,

 

there is no attachment...

 

But I guess you have autoindexing enabled on both FOR loops! Switch off the autoindexing of the in-/output tunnels and you should be fine...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(2,797 Views)

i can not attach the screenshot, because the .jpg file is larger than the size permitted on this forum.

0 Kudos
Message 8 of 12
(2,795 Views)

How do I turn off the auto-indexing in the for-loop????

0 Kudos
Message 9 of 12
(2,792 Views)

the error I'm getting is:

 

"You have connected a Scalar type to an array of that type. the type of source is string. the type of sink is 1-D array of double. (64-bit real (15 digit precision))"

0 Kudos
Message 10 of 12
(2,785 Views)