LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable graph on sub vi

Highlighted

Hi All,

 

I'm seeking for an answer to the following conundrum:

data passed through from main vi to sub vi, there it presented on graph.

I need to perform a "freeze" functionality. When boolean control (on sub vi) is false- the graph is disabled (freezed).
when the control is true - the graph is enabled, and the data from main vi continues to "flow".


I've tried to implement a state machine in sub vi, but main vi got stuck. a simple disable diagram also didn't work.

I appriciate any input you may have.

 

Attached is a calling routine to sub vi, a part of main vi.

 

Call2SubVI.png

0 Kudos
Message 1 of 8
(135 Views)
Highlighted

Hi IG.B,

 

there is no graph in your snippet.

And there is no subVI attached!

 

Please attach the full example when you want to get real help…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 8
(100 Views)
Highlighted

Also, are you talking about that chart or a graph (big difference).


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 3 of 8
(68 Views)
Highlighted

Well... you're right.

Main vi and sub vi attached. 

I would like to hear any input you may have.

 

Also, on sub vi there are waveform charts.

How the solution will be different, if those were graphs?

 

 

 

  

Download All
0 Kudos
Message 4 of 8
(60 Views)
Highlighted

Hi IG,

 


@IG.B wrote:

Main vi and sub vi attached. 

I would like to hear any input you may have.


No, you did not attach VIs. You attached snippets, so the VI filenames and the connector pane are lost!

Why don't you attach two simple VI files? Why don't you attach the whole project (in a ZIP), so also the SharedVariable definitions are included?

 

Btw. the snippet of the subVI results in a broken VI…

 


@IG.B wrote:

Also, on sub vi there are waveform charts.

How the solution will be different, if those were graphs?


To "clear" a chart you need to fiddle with its history buffer.

To "clear" a graph you just manipulate the data wired to the graph…

 

Why does your mainVI need that 2nd loop to convert the "DAQ" data into 3 "Chx" data? This could be done in the DAQ loop! (The shift registers are uninitialized which can lead to problems.)

When setting a sample rate in a "Continuous" task you should not fiddle with "samples per channel" input of DAQmxTiming - did you read the LabVIEW help for this function? Instead you should request a fixed number of samples at DAQmxRead…

 

 

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 5 of 8
(53 Views)
Highlighted

VI files.

 

Test1.vi is main vi, ViewChartTry2.vi is the sub vi.

Download All
0 Kudos
Message 6 of 8
(47 Views)
Highlighted

Hi IG,

 

what's the point of writing that large array into all the charts and arrays (using a "value" property node)?

 

Two points:

  • Writing to the "value" property does not clear the "history" of a chart…
  • Writing a large array will definitely not clear the history of a chart…

 

What's the point of building large arrays ("Chx") in your mainVI and then write them into charts in your subVI? This is building arrays in two places: first in those "Chx" SharedVariables and then in the history buffer of the charts…

 

Start simple to understand the basics:

Why do you need all those SharedVariables?

Why do you need to split your measurement data into 3 1D arrays? It makes all your data handling much more complicated…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 7 of 8
(36 Views)
Highlighted

Hi IG,

 


@IG.B wrote:

I'm seeking for an answer to the following conundrum:

data passed through from main vi to sub vi, there it presented on graph.

I need to perform a "freeze" functionality. When boolean control (on sub vi) is false- the graph is disabled (freezed).
when the control is true - the graph is enabled, and the data from main vi continues to "flow".


To implement a "freeze" functionality you should not write all data instantly to your charts as you do now.

So place the charts inside the case structure…

 

What should happen with the data when the charts are "freezed"? Should they be forgotten or should they plotted once the control switched back to TRUE?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 8 of 8
(27 Views)