LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple graph with checkbox

Hey guys,

                I'm trying to do a waveform graph with a checkbox  when it is checked the graph appears else it disappears. As you can see for one checkbox it's working properly, but when a put two checkboxes both graphs should appear in the waveform graph. I put the bunddle function, and its exit i'm linking to the waveform, but then an error appears. Does someone know anyway of putting two or more graphs together in a waveform graph, enabling them with checkboxes?

0 Kudos
Message 1 of 11
(4,858 Views)

hi danilorj

        look at the attached vi.

Balaji(CLAD)

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 2 of 11
(4,834 Views)

I forget some changes,find the new attachment.

 

Balaji(CLAD)

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 3 of 11
(4,824 Views)
 
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 4 of 11
(4,823 Views)

Hai,
 
Look the attached vi which gives a comprehensive solution to deal with such tasks.  The vi uses the graph property nodes to make the plots visible/invisible and also manipulates the plot legend to reflect the changes in plots.
 
Feel free to post for any queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 5 of 11
(4,819 Views)

Jk1,

        when the two checkboxes are unchecked your VI still calculates the interation.

0 Kudos
Message 6 of 11
(4,802 Views)

Hai,

its a petty problem 🙂 just initialize the graph with two plots of zeros.

 

When you open the vi for the first time there are no plots in the graph and hence the initializing for loop returns error.  Just initilize the graph with two plots that will solve the problem.  See the modified vi attached...

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 7 of 11
(4,798 Views)

JK1,

        could you explain to me why you used the xor function, and why it is linked to a Search 1D Array Function? I just can't understand the reasoning you used.

0 Kudos
Message 8 of 11
(4,785 Views)

Hai,

 

The xor function is to detect which check box(s) have changed their state either from T to F or F to T. Xor function returns true for those elements that has changed its states..so the output of XOR with TRUE elements are those that have changed the states.  Search for the TRUE element with search 1D function and index that element from the array of check box values.  The index of the  checkbox that has changed is equivalent to the plot number and that plot needs to be visible or invisible.

 

Hope it helps.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 9 of 11
(4,766 Views)

Jk1,

          take a look at this Vi I did before. It's working the same way, except for some differents on the legend.

0 Kudos
Message 10 of 11
(4,749 Views)