LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of the push button

Solved!
Go to solution

Rshah31_0-1758715773658.png

Hello, 

I am using array of push button. I want to know which number of button has been pushed. I want to know button position. For that, Accoding to my knowledge It can be get it from Arraz indexing method. However I can not get it. Could any one has some idea. 

My major goal is to get the button number which is pressed or unpressed. 

 

0 Kudos
Message 1 of 6
(141 Views)
Solution
Accepted by topic author Rshah31

Yamaeda_0-1758718590411.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(125 Views)
Solution
Accepted by topic author Rshah31

@Yamaeda wrote:

Yamaeda_0-1758718590411.png

 


Personally, I prefer "not equal" where that diagram constant must be a TRUE, of course.

 

Also, of you want to know the new value, use the blue value to index into the newval array.

 

 

altenbach_0-1758726951590.png

 

0 Kudos
Message 3 of 6
(83 Views)

Thank you @Yamaeda  and

your solution works!

have a short question on that, 

If button 1 is pressed = True, I want some mgs "Button is pressed "
and if button 1 is unpressed = False, I want some mgs "Button is unpressed "
Even if Any button is already pressed, let's say button 2 is already pressed, it does not affect the other buttons' value

In this senario. I would prefer to use CASE structure "True" and "False". But I could not understand which value do i need to attched with Case structure. 

Please give me your guidance or any other idea. 

0 Kudos
Message 4 of 6
(30 Views)

Hi Rsash,

 


@Rshah31 wrote:

If button 1 is pressed = True, I want some mgs "Button is pressed "
and if button 1 is unpressed = False, I want some mgs "Button is unpressed "
Even if Any button is already pressed, let's say button 2 is already pressed, it does not affect the other buttons' value

In this senario. I would prefer to use CASE structure "True" and "False". But I could not understand which value do i need to attched with Case structure. 


Use the "new value of changed boolean" as shown by Altenbach.

 

Do you understand his example code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(23 Views)

Hi GerdW,

Before, I understood it incorrectly, but now I am clear. 

Thank you for giving me the right direction.

Thank you to all who are involved in the conversion!

BR.

0 Kudos
Message 6 of 6
(8 Views)