From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-14-2011 03:48 AM
how to make a RESET button in labview which resets all the elements in an array back to inactive element. Rather than deleting values in every column of array its better to create a RESET button ... how to make it ???
05-14-2011 07:59 AM
Connect the Reset button to a Select primitive. Put an empty array of the same datatype on the True input and the existing (filled) array on the false input.
Lynn
05-14-2011 12:37 PM
@abhinavb wrote:
how to make a RESET button in labview which resets all the elements in an array back to inactive element. Rather than deleting values in every column of array its better to create a RESET button ... how to make it ???
You seem to have some misconceptions.
Is the array a control or an indicator or just some data held in a shift register or feedback node?
What you are probably looking for is an empty array. An empty array has a size of zero and has no elements (active or inactive). From your mentioning of "rows", you seem to have a 2D array.
The size of the array is independent of the visible size of the container.
Clearing an array means simply writing an empty array of the same datatype to it's terminal (or internal data structure). If the array is a control, you need to write to a local variable of it instead.
Can you show us some code so we can have a better understanding what exactly you mean by "array" in this context? Thanks!
05-15-2011 03:26 AM
If it is a control/indicator then you can use the 'reinitialise to default' invoke node - you would not set set the default first value ofcourse. Post your code - it will help people understand what you are trying to do
05-15-2011 11:34 AM
@David_78 wrote:
If it is a control/indicator then you can use the 'reinitialise to default' invoke node
Hmm, this will only work if the default value actually is an empty array, of course. 😄
(I'd stay away from property nodes unless there is no good alternative. Here we have good alternatives).
05-16-2011 12:33 AM
Hi Abhinav,
I am not sure whether I got your point or not after reading the rest of the comments. This is what I felt to be an example which may help you solve your problem. I would also be glad if any mistakes are pointed out in this VI if anything is wrong.
Regards,
Nitzz
(Kudos are always Welcome, Accept as a solution if it is the One;))
05-16-2011 12:35 AM - edited 05-16-2011 12:35 AM
Hi all,
Oops, I am really sorry, I missed the part in abhinav's post where he mentioned he doesn't want to use delete function. You may ignore my previous post.
Regards,
Nitzz
03-19-2012 07:23 AM
Since the attachments are not downloading. Lets see if new post to the same link works
03-19-2012 07:25 AM
oh it works! good for people like me 🙂
03-18-2013 02:13 PM
What if the array is a control array?
How to set to zero all the elements in an control array, that does not have an input?