cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

Disable graph on sub vi

Resolvido!
Ir para a solução

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
Mensagem 1 de 8
2.229Exibições

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Mensagem 2 de 8
2.194Exibições

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

0 Kudos
Mensagem 3 de 8
2.162Exibições

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?

 

 

 

  

Baixar tudo
0 Kudos
Mensagem 4 de 8
2.154Exibições

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Mensagem 5 de 8
2.147Exibições

VI files.

 

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

Baixar tudo
0 Kudos
Mensagem 6 de 8
2.141Exibições

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Mensagem 7 de 8
2.130Exibições
Solução
Aceita por IG.B

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Mensagem 8 de 8
2.121Exibições