LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Values Radio button

Solved!
Go to solution

I have 6 questions and each question has a given name which is the current state of the user:( Somnolence, Concentration, Eveille, Frustration, Entertainment,Content)
I got the values of the answers of these 6 questions in a table and I wrote them in a text file.

Now,

1. I want to group in one table the values of all the valuesof these 9 radio button (see also image values Radio Button.PNG attached).

2. I want to create variables Weight_1, Weight_2, Weight_3, Weight_4, Weight_5, Weight_6

Weight_1 = Sum [of all  values of Somnolence in all Radio Buttons].

Weight_2 = Sum [of all the values of Eveille in all the Radio Buttons].

Weight_3 = Sum [of all the values of Frustration in all the Radio Buttons].

Weight_4 = Sum [of all Entertainment values in all Radio Buttons].

Weight_5 = Sum [of all Content values in all Radio Buttons].

Weight_6 = Sum [of all Concentration values in all Radio Buttons].

To better explain on the image:
Weight_1 = 1 + 0 + 1 = 2

Weight_2= 0 + 1 = 1

 

Can you  help me please, I am stuck at this level 

0 Kudos
Message 1 of 16
(2,245 Views)

I have 6 questions and each question has a given name which is the current state of the user:( Somnolence, Concentration, Eveille, Frustration, Entertainment,Content)
I got the values of the answers of these 6 questions in a table and I wrote them in a text file.

Now,

1. I want to group in one table the values of all the valuesof these 9 radio button (see also image values Radio Button.PNG attached).

2. I want to create variables Weight_1, Weight_2, Weight_3, Weight_4, Weight_5, Weight_6

Weight_1 = Sum [of all  values of Somnolence in all Radio Buttons].

Weight_2 = Sum [of all the values of Eveille in all the Radio Buttons].

Weight_3 = Sum [of all the values of Frustration in all the Radio Buttons].

Weight_4 = Sum [of all Entertainment values in all Radio Buttons].

Weight_5 = Sum [of all Content values in all Radio Buttons].

Weight_6 = Sum [of all Concentration values in all Radio Buttons].

To better explain on the image:
Weight_1 = 1 + 0 + 1 = 2

Weight_2= 0 + 1 = 1

 

Can you please help me ?

0 Kudos
Message 2 of 16
(2,232 Views)
  • Why do you use local variables instead of the terminals for the radiobuttons?
  • Why is there so much duplicate code? All you need is one event for all radiobuttons, the process the changed one.
  • Do all radio buttons only have tow choices each? In that case a simple boolean would suffice, right?
  • Why do you save in thee timeout case 10x per second?
  • All the visible properties belong after the case structure!
  • Why are the questions individual hidden controls instead of a string array diagram constant?
  • Why do you have an array to be compared with label.text. Seems very fragile because there can be typos that are hard to find.

Maybe take a step back and explain step-by-step what the user sees and how he interacts and what the program should do. Simple terms, not a jungle of undecipherable code!

0 Kudos
Message 3 of 16
(2,228 Views)

Hi Ngouda/Etiou,

 

why do you need 2 accounts and two threads to ask exactly the same question?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 16
(2,221 Views)

@GerdW wrote:

Hi Ngouda/Etiou,

 

why do you need 2 accounts and two threads to ask exactly the same question?


Maybe they are students in the same course and that's the verbatim assignment for the weekend. 😄

0 Kudos
Message 5 of 16
(2,193 Views)
Solution
Accepted by Etiou