LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete local variabel value in array

Solved!
Go to solution

Hi

Need some help

I want to delete the values in a array.

I dont have any oppertunity to do something whith the array(Its in a sequense run and canot be accesed)

I only have a local variable thas giving me the array values from that array.

How can i erase the values createdby the  local variable in the (Array Delete values ) array indicator ?

0 Kudos
Message 1 of 9
(2,754 Views)

You are not understanding what local variables are. They are a data copy of the control. They do not "create" values, so I don't really understand your question, or what your VI is intended to show. Not surprisingly, Delete From Array will ... delete values from an array, and return a new array. What you want to do with this array you have not explained.

 

This seems to be related to your continuing saga.

0 Kudos
Message 2 of 9
(2,744 Views)

If you don't want data in the "array deleted values" indicator, then wire an empty array to it instead of the local variable.

 

If you don't want to delete all values, you need to tell us what critera should decide if an element should be deleted or not. (e.g. delete all negative elements, all zero elements, etc.).

 

It would help if you could show us the entire program.

0 Kudos
Message 3 of 9
(2,737 Views)

Sorry for bothering u Sir,

 

Yeah its related the the other tread but a diffrent issue.

Im working om my major thesis getting my engineering degree so im a little bit stressed

 

The Main VI is gathering samples from I/O and creating array step by step like the other VI in the tread showed

 

The question are then im i able to modify the local variabels values(maby put the valus in a new array and maliputate thoose values?)

I need to erase the orginal array between rounds of data collection messuring value points on different speed drives.

 

So im i able to erase the orginal array using the referance from the local variable or mayby  creating an empty array og the values coming from the local variable

 

0 Kudos
Message 4 of 9
(2,736 Views)

@torkil wrote:

I need to erase the orginal array between rounds of data collection messuring value points on different speed drives.


THen you should operate directly on the array contained in the shift register and e.g. manipulate it with another case structure, for example.

0 Kudos
Message 5 of 9
(2,727 Views)

This is the issue better explained

It need to be this way because og the code im using(The program is on 22MB so to big to post here, and it have 20 sub VI and is a part of a project containing 40 shared variables)

Also need to erase the values in the array everytime started

 

0 Kudos
Message 6 of 9
(2,726 Views)

This code does not make any sense.

 

  • Why isn't the numeric terminal inside the second sequence frame. Now it gets read again immendiately and in parallel to the wait, and changes during the 6 second wait are ignored.
  • What's the point of the inner FOR loop?
  • Your button still has inappropriate mechanical action.
  • What do you mean by "everytime started". If you mean to clear the main shift register at the start of the program, place the shift register in the outer while loop and initialize it with an empty array. Or use a globally initialized feedback node,
  • You have two arrays, so "Also need to erase the values in the array everytime started" is ambiguous.
0 Kudos
Message 7 of 9
(2,719 Views)

Im doing as u told me

But i get this white point in my output on the cas,seems to mess up my values geting putted in the array

It drives me crazy

0 Kudos
Message 8 of 9
(2,713 Views)
Solution
Accepted by topic author torkil

You need to wire the array across in the false case, else it will reset to an empty array whenever the false case executes.

Message 9 of 9
(2,709 Views)