LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save number into array one by one?

hello!everyone
i want to save the numbers into 1D array one by one?
for example, there are 5 number(1 to 5)
i type 1 number in each time,then output an array (1 2 3 4 5)
how to do that?
thank you for you help

best wish
kenneth
0 Kudos
Message 1 of 21
(7,095 Views)
Hi Kenneth

To add elements to an array use the build array function. If you want to repetitively add elements to the same array then use shift registers in a loop to store your array and use build array to add the element.

I've included some LV 6.1 code that hopefully demonstrates what you need to do.
Kurt Friday
www.sciware.com.au
Message 2 of 21
(7,084 Views)
you reply so fast and very helpful

Thank you very much

best wish
kenneth
0 Kudos
Message 3 of 21
(7,079 Views)
Can i have 1 more question please?
if i want to take out the numbers from the array one by one, how can i do?

thank you
0 Kudos
Message 4 of 21
(7,069 Views)
It depends if you want to remove the elements one by one from the end, the beginning, or from a random position in the array.

The attached simple modification of the VI posted by SciWare above adds these options (LabVIEW 7.0).
Message 5 of 21
(7,060 Views)
can i have the VI in ver6.1?
thank you again

Message Edited by kennethwong on 05-01-2005 12:26 AM

0 Kudos
Message 6 of 21
(7,051 Views)
Here we go, saved as version 6.1
Kurt Friday
www.sciware.com.au
Message 7 of 21
(7,043 Views)
thank you very much
0 Kudos
Message 8 of 21
(7,037 Views)

I am not replying to the question rather I am posting a question here.

I have a 1D array of data such as [ 1 1 1 2 2 3 3 2 3 4 4 5 5 5 6 7 7  8 8 8 9 9 10]. I want to extrct the numbers [1 2 3 4 5 6 7 8 9 10] so that the numbers are in incresing order and save it.

Currently I am using Labview 7.

It will be very helpful for me to have an answer to the question.

 

With regards

-Abhijit Das

IITG, INDIA

0 Kudos
Message 9 of 21
(6,489 Views)

I am still waiting for the solution to my problem.

 

With regards

-Abhijit Das

IITG, INDIA

0 Kudos
Message 10 of 21
(6,469 Views)