11-22-2020 07:07 AM
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.
Solved! Go to Solution.
11-22-2020 10:31 AM
11-22-2020 11:53 PM
Also, are you talking about that chart or a graph (big difference).
11-23-2020 12:50 AM
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?
11-23-2020 01:10 AM - edited 11-23-2020 01:16 AM
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…
11-23-2020 01:18 AM
VI files.
Test1.vi is main vi, ViewChartTry2.vi is the sub vi.
11-23-2020 01:53 AM - edited 11-23-2020 01:55 AM
Hi IG,
what's the point of writing that large array into all the charts and arrays (using a "value" property node)?
Two points:
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…
11-23-2020 02:40 AM
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?