LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hide graph on click on button

Sorry but it isnt work :-/. I need clear data only on click button and for next I would like to display another data. Only remove previous data on click a start to display new.

0 Kudos
Message 11 of 19
(866 Views)

Hi adssad,

 

what does not work? Where's the problem?

 

The button should be set to "Latched" mechanical behaviour and everything is ok...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 19
(865 Views)

Here is part of my VI, to show what I need. Thanks

0 Kudos
Message 13 of 19
(860 Views)

Hi adssad,

 

read the context help for the BuildGraph ExpressVI. Then connect your "button" to the "Reset?" input of that ExpressVI!

 

Doh...

 

Next time you should post your VI in the first place!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 14 of 19
(855 Views)

But I tried this first time before I asked here. Isnt work it 😞

0 Kudos
Message 15 of 19
(846 Views)

Hi adssad,

 

I can't follow, "it doesn't work" isn't a good error description...

 

For me it works like that:

check.png

Everytime I press the "button" (set to latched mechanical behaviour!!!) the graph is cleared...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 16 of 19
(845 Views)

I will try agin. It could be problem in that I have two while loops with diferent times and graph is in one and button for celar(reset) is in second?

0 Kudos
Message 17 of 19
(841 Views)

Hi adssad,

 

no, the problem is you clear the graph in one loop using it's property node - but you don't clear the buffer, that is inside the ExpressVI!

You have to clear that buffer too as is shown in my snippet!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 19
(837 Views)

Hi all,

 

thanks GerdW for giving help and showing good ideas.

 

Well, adssad, have you tried to implement the code as GerdW has recommended? Is there any trouble? In case you didn't know you can just download the picture GerdW provided - it's called a snippet - which you can just drag and drop it above your block diagram - this cause a code to generate in your BD.

 

But you have different code, right? If you have created 2 loops, and wired the button from one loop into the another, it cannot work. Does your code look similar to what I attached? It cannot work because of two reasons:

1) the upper loop will not start execution until it gets all input values, in this case the value from "latched button"

2) value from the "latched button" will not get out of the loop until the loop will stop execution

 

What does it mean? Until you stop the second loop, the first cannot start execution. But after you stop the second loop to start execution of the first one, the button is useless. I recommend you to use "highlight execution" to see how the code executes. It simply follows the dataflow paradigm. You can learn more about dataflow for example here: LabVIEW Training: Learn LabVIEW in Three or Six Hours.

 

Try to answer yourself the question: "What doesn't work? What does it mean?" then you will have better idea what to ask for. Fortunately you will be able to find out the problem by yourself.

 

Regards

Jakub Prokeš
NIEE Aplications Engineer
0 Kudos
Message 19 of 19
(812 Views)