LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter data into arrays for novices?

Hi there, I am a total novice with labview, and am having a problem inputing data into an array. I want to enter the data into particular cells in the array, but can’t seem to figure out a way of doing it. Every time labview enters data in it increases the size of the array by one and enters the value in a new cell. I want to overwrite the old value of the cell with a voltage when a particular button is pressed. My VI is attached.
0 Kudos
Message 1 of 5
(2,787 Views)

You are using "insert into array" which increases the array by one. To place a new value into an existing array element, keeping the array size constant, you would use "replace array subset".

 

You should really start out with a few simple tutorials. A lot of your code makes no sense at all.

 

For example:

  • What is the purpose of the local variables to the right of the loop?
  • What is the purpose of the three value property nodes?
  • Why don't you wire to the array terminal?
  • You should place the array into a shift register. This will eliminate all your local variables and value properties of "array"
  • What are you trying to accomplish with the case structures and buttons?
0 Kudos
Message 2 of 5
(2,774 Views)

Here's a quick draft that shows some of the basic ideas (LabVIEW 8.5).

 

The value of the random number is placed in one of three array positions, depending on the value of a radio button.

 

0 Kudos
Message 3 of 5
(2,768 Views)

Thanks for the reply. The code is a bit haphassard, sorry bout that. The local variables are there to zero those variables off before the loop starts. The property nodes refer to something else that I hadn't quite finished. The to zero them off before the while loop kicks in.I tried to wire to the array terminal but that didn't seem to worl. Will try the shift register. the case structers and buttons are there to try and lock in the value. I think I am trying to do what the select function does which I have just seen.


While I have tried to do tutorials to get to grips with labview, at this stage I really don't have time, so sorry if things here seem messy and unprofessional. 

0 Kudos
Message 4 of 5
(2,765 Views)
wow, that's great, thanks for that. Im just looking at it now
0 Kudos
Message 5 of 5
(2,763 Views)