取消
显示结果 
搜索替代 
您的意思是: 

how to make a RESET button in labview ?

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 ???

0 项奖励
1 条消息(共 32 条)
17,962 次查看

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

0 项奖励
2 条消息(共 32 条)
17,949 次查看

 


@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!

0 项奖励
3 条消息(共 32 条)
17,942 次查看

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

David
www.controlsoftwaresolutions.com
0 项奖励
4 条消息(共 32 条)
17,924 次查看

 


@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).

0 项奖励
5 条消息(共 32 条)
17,909 次查看

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;)) 

0 项奖励
6 条消息(共 32 条)
17,895 次查看

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

0 项奖励
7 条消息(共 32 条)
17,892 次查看

Since the attachments are not downloading. Lets see if new post to the same link works

0 项奖励
8 条消息(共 32 条)
17,517 次查看

oh it works! good for people like me 🙂

0 项奖励
9 条消息(共 32 条)
17,515 次查看

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?

0 项奖励
10 条消息(共 32 条)
16,771 次查看