From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

separate 2d array dynamically

Hi all

         i have a 2d array of string values (please refer the vi). I want to separate the array into 1D array of values based on the date dynamically.  I tried few options but nothing seems to work dynamically.

thanks

senthil kumar

   

0 Kudos
Message 1 of 11
(3,503 Views)

Hi Senthil,

 

Your attached VI has only empty array. When you have data in the control, please make it as a default value and then attach the VI.

 

If you have tried anything in blockdiagram make sure that is also available.

 

Thanks,

Nanthakumar

0 Kudos
Message 2 of 11
(3,492 Views)
Provide more info:
-What is the input data?( Fill the data in control and make the data to default)
-What have you tried?(Post what you tried and what didn't work)
-You can try for loop, Search operations and auto indexing options to separate and build arrays.
Thanks
uday
0 Kudos
Message 3 of 11
(3,488 Views)

sorry forgot to save the values in the array

0 Kudos
Message 4 of 11
(3,486 Views)

hi

  i tried using indexing, and it does not work as intended and dynamically

0 Kudos
Message 5 of 11
(3,483 Views)
I repeat:
-What you tried?(and didn't work?)
-You have 2D array of string data, You want to separate(based on what condition) to 1D array of what?
-You mean to say you keep some date as threshold and separate array elements prior to that and after that?
-Put sample data with both control and indicator(s) and what you expect in indicators then it would be easier to suggest.
Thanks
uday
0 Kudos
Message 6 of 11
(3,467 Views)

Dear udka

                 I tried on it for few hours, i cant put everything here.

                 I want the values to be sorted out based on the date.

                 sorry not 1D array but 2D array of string

                 I have attached a vi here with input and expected output

thanks for the help

 

regards

senthil

0 Kudos
Message 7 of 11
(3,459 Views)

Hi Senthil,

 

Data will contain only 3 dates you have given? If it has other dates what will you do? You may need to create more 2D array indicators dynamically. Think about the data structure.

 

Regards,

Nanthakumar

0 Kudos
Message 8 of 11
(3,450 Views)

You can group the values like following.

Data based on Date.png

Regards,

Nanthakumar

0 Kudos
Message 9 of 11
(3,443 Views)

hi

   It is working good, but the first value is again repeating as the last value. can you post the vi. I think i am missing something here

0 Kudos
Message 10 of 11
(3,412 Views)