LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change a 1D array to an element?

Solved!
Go to solution

You can do it in many ways. Check the attached example.

-----

The best solution is the one you find it by yourself
Message 11 of 20
(1,030 Views)

Thanks!!!

Now Iam looking for a solution to one question.Searched throughout forum and tried my own way,that is:-

Is it possible to edit an array at run time??Here example showing array values changing from 10,20,30...while running,That time I want to enter my own input value in any of the array index.Is it possible?

Sorry I don't started a new thread because the example attachment is in this thread.

0 Kudos
Message 12 of 20
(1,002 Views)

@jkuttu wrote:

Is it possible to edit an array at run time??Here example showing array values changing from 10,20,30...while running,That time I want to enter my own input value in any of the array index.Is it possible?


Look into the Replace Array Subset VI in the array pallet.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 20
(999 Views)

Yes,using "replace array subset" we can replace array element in a particular index at the time of coding.But I want to change my array element in the frontpanel itself while the VI is running.Is it possible?

0 Kudos
Message 14 of 20
(984 Views)
That makes no sense. The only way to actually replace an array element is to run a VI, so of course the answer is yes.
0 Kudos
Message 15 of 20
(976 Views)

Hi jkuttu,

 

If you want to manually change the value of what is being used to replace an element at a particular index in your array while your VI is running then you should use a control instead of a constant as the "new element" input for the "Replace Array Subset" function. This will allow you to enter any value you want on the front panel while the VI is running and this value will be input to the specified index of the array.

 

I hope this helps.

 

Regards, 

James D.
Applications Engineer
National Instruments
Message 16 of 20
(961 Views)

Thanks James.It worked.But that particular array index seems to be not moving.So Iam trying in a way to create a mouse click event in the array.

Thanx and suggestions are welcomeSmiley Happy

Message 17 of 20
(940 Views)

Hi jkuttu,

 

I'm not sure I know what you mean exactly by the array index not "moving". What about the array do you want the mouse click event to control? If you can share some more detail on the purpose of the event then I can provide some guidance and suggestions on how to accomplish this in LabVIEW. 

 

Regards,

 

 

James D.
Applications Engineer
National Instruments
0 Kudos
Message 18 of 20
(922 Views)

Hi James,

 

               Our array values are changing continuously.When we provide a control on any of the index that index seems to be not changing itself,that what I mean.Anyway I will post some code here.

0 Kudos
Message 19 of 20
(906 Views)

@jkuttu wrote:

Our array values are changing continuously.When we provide a control on any of the index that index seems to be not changing itself,that what I mean.Anyway I will post some code here.


Whatever you are saying still makes absolutely no sense. Yes, please post some code!

0 Kudos
Message 20 of 20
(896 Views)