LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to reinitialise mixed signal graph automatically?

Solved!
Go to solution

 

 

How do you reinitilise a mixed signal graph automatically?

 

My idea is like this- I am plotting a graph throughout the day... Then at 7pm, i want the graph to be erased. There will be a hiatus till 6am. So it will start a new graph at 6am. How do i go about doing this? It seems easy but i cant find the solution. Thanks in advance! 

0 Kudos
Message 1 of 6
(3,176 Views)

If you take a look at the Methods for the Mixed Signal Graph, you'll find a method called "reinitilize to default" (It's not actually a MSG Method...). Does this do, what you want?



Remember Cunningham's Law
0 Kudos
Message 2 of 6
(3,173 Views)

I tried it already. 

But the problem is, I want the graph to stop. The time to stop too.

So i also tried "disable graph". Nothing seems to happen to my graph. 

 

At a certain time, I want the graph to stop plotting anything and erase itself. Like, for the whole graph to be disabled. And only resume at 6am.

0 Kudos
Message 3 of 6
(3,148 Views)

If you want it to stop updating, why do you keep writing to it? You could do a case that determines wether or not you are within the "active"timeframe and just write there.

 

And please get rid of thos completely useless local variables.

Also your VI does not shut down, when it should, as the for loop isn't terminated.



Remember Cunningham's Law
0 Kudos
Message 4 of 6
(3,110 Views)

 

Why are local variables useless? 😮

 

That was a VI just for me to test my theory. My whole programme is much bigger and more confusing. 

 

Currently the test VI is just communicating to an electronic load and collecting data. The data is stored in a database, and displayed on 3 separate graphs. 

I manage to clear the graph plots at a certain time but I cant get the graph to start plotting again after the specified time is over.

For eg I want the graph to stop plotting at 12pm. Then at 6am I want it to plt again on the graph where the x axis starts from 6am. But now it just cotinues plotting from 12pm the previous day. 😞 Do help. And I have reduced the number of local variables because i dont know how to fit in event structure into it. 

 

0 Kudos
Message 5 of 6
(3,049 Views)
Solution
Accepted by topic author redhotsneakers

@redhotsneakers wrote:

 

Why are local variables useless? 😮

 


That is a missquote, I'm afraid: I didn't say local variables are useless, though some would endorse that statement. I said they were in your case. In the VI you posted first, you are passing data by local variable that can be better passed by wire sind the variables are literally next to each other. While you might get lucky in a program of that size it can cause a world of problems in a bigger application.

 

Back to your problem: After looking at your new VI, I'd say you're almost there. Separating the functionality into two loops doesn't seem necessary. Instead of that Value Property you could try the reinitialize method I mentioned earlier, that should do it.

 

Then you could add a functionality that reinitilizes only once by comparing the in range with the previous iteration.

 

BTW: that select function is rube goldberg code. Why not use the boolean output of the equal node to switch the cases.



Remember Cunningham's Law
Message 6 of 6
(3,033 Views)