LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert data into array

I want to know if its possible to insert data into an array, but I wish to do it as I would in excel, by using the option of insert row.

Is it possible to insert a value into an array in a specific row, so that all the other values after the one that was inserted are moved one row down?

Please let me know how to do this, and if you could please provide some sample code, that would be great.

Thanks!

0 Kudos
Message 1 of 7
(4,517 Views)

Yes.  It is called the Insert Into Array function.  Open the context help window, and look at the detailed help on the function.  You won't need an example if you are able to read the help file.

Message 2 of 7
(4,506 Views)

Hello Nando88,

 

I left you a reply in the other post you created, please create only one post per doubt it is not necessary to repeat your posts.

 

Insert data in array:

http://forums.ni.com/t5/Discusiones-sobre-Productos-NI/Insert-data-in-array/m-p/3083567/highlight/fa...

 

Best regards.

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
0 Kudos
Message 3 of 7
(4,447 Views)

Sorry, I just posted my question in the spanish forum. I thought I had to post it again in the correct forum.

Is it possible to tell a text ring, that it should read the values from a strating to an ending position in an array and not the whole array?

0 Kudos
Message 4 of 7
(4,436 Views)

Hi nando,

 

a text ring will not read any array values on its own. Instead you supply the ring (using property nodes) with some array data!

 

When you don't want to supply a full blown array you can always use array functions like ArraySubset…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(4,431 Views)

I tried using the array subset, but I still can't get the result that I want.

What I want is to be able to add elements to the array, and that element should be added to a specific category (defined by one of the text rings).

Example: in the category, I have the first one and in the elements (second text ring) I have the second one. The element that I will add will be in the 3rd position of the category that I selected. So if I have a category of DVDs, and in the items I have 2 brands (TDK, Maxell), and I will add Sony as the 3rd item in the second text ring that is being populated depending on the selection in the first text ring.

How can I add items to the second text ring, so that they only appear in the category that I selected in the first text ring?

Thanks in advance!

0 Kudos
Message 6 of 7
(4,418 Views)

For reference,  I found the earlier thread that has some VI's attached.

 

http://forums.ni.com/t5/LabVIEW/write-multiple-strings-in-a-single-string-indicator/m-p/3081955

 

 

0 Kudos
Message 7 of 7
(4,389 Views)