LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two background colors for the same waveform graph

Solved!
Go to solution

Hello guys!

 

I got a question for you: i'm a new user of labview, so please be nice! Smiley Happy

So here's the deal: I just created a program recording the temperature thanks to 4 thermocouples.

In real time, I got then in a waveform graph 4 curves as soon as I start my program. And in my program, I got a button which allows me to record the temperature in a file for a certain period at a certain frequency.

So, what I'd like to do is: I got my waveform graph with a black background for example, and once I pushed the button, the background color will be changed automatically to highlight the part of the graph where the recording occurs, then the background will return to  black once the recording completed. In this way, on the same graph, I could say that the recording occured from there to there by looking at the graph. I would have two different background on the same graph.

I know how to change the background of a graph by using property node but is it possible to do what I want to ?

 

I hope I am clear. If not, please don't hesitate to ask me further details...I could post my vi if necessary

 

Cheers

0 Kudos
Message 1 of 19
(4,815 Views)

Hey,

 

I don't think it is possible as per my experience in the same way as u want, there can be other way to do but before that i need some more input from your side...

 

How is plotting going on ur graph, are u appending new value to old values to show long plots on same graph ?.. if yes then upto how much points, r u using collector to show only some fixed number of recent points on plot ?

 

do u want it only for front panel display for user or you want to save whole length plot showing the background color changed on your report ?

 

please reply with above points.. if u post vi then version conflict may occur as i and many others may still be using 8.5.. u can save it in older version before posting or image file..

 

u can wait little may be some body did same wat u r asking, in that case i will also learn Smiley Happy..

 

Thanks

HS

0 Kudos
Message 2 of 19
(4,808 Views)

Hello,

 

the best way to answer to your questions is sending my vi.

So here it is.

 

Thanks a lot by the way for your help

0 Kudos
Message 3 of 19
(4,784 Views)

Anyone?

If it is not possible, maybe it is possible to mark a part of the graph by two vertical lines, the fisrt one marking the start of the recording and the second one the end of the recording...

0 Kudos
Message 4 of 19
(4,731 Views)
Solution
Accepted by topic author Keno

Well I know this isnt exactly what you want to do, but you could try the following.

Change the color of the line on the graph when recording occurs.

 

So you could have a red line, then press record, then it changes to blue, then back to red.

Or if that gets confusing since you have 4 different lines on 1 graph,

you could change from a red solid line to a red dashed line and back, for example.

 

Would that be okay? If so, I can show you how to do that. 

Cory K
Message 5 of 19
(4,727 Views)

Keno wrote:

Anyone?

If it is not possible, maybe it is possible to mark a part of the graph by two vertical lines, the fisrt one marking the start of the recording and the second one the end of the recording...


 

Add two cursors and set them when the data starts and ends.

 

You could also play games with extra channels and using the fill to option use those to give you the changing background.

 

So it can be done either way.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 19
(4,717 Views)

Quick outiline of the abckground idea.

 

1) Plot 1 is the data

 

2) Plot 2 is used to ID the "before" part. For every value shown on plot 1 add a value for this plot that is far above thrange of the graph. Set it for zero-fill or fill to negative infinity.

 

3) When recording is active put "NaN" into plot 2. NaN will not plot and will not fill.

 

4) similarly for the "after" stuff.

 

plots generally will plot from back to fron max plot number to min plot number.

 

THat should be enough hints. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 19
(4,708 Views)

Sorry , the problem is not solved yet...

 

Actually, Cory K, I'm quite interested by your solution. If you can explain to me how to do to that, that would be much appreciated (I'm talking about the part with solid and dashed lines)

 

As for Ben, I'm not sure I have well understood your solution. If you got an example, maybe that could save my problem...

 

Thanks anyway for all your answers

0 Kudos
Message 8 of 19
(4,691 Views)

Keno wrote:

Sorry , the problem is not solved yet...

 

Actually, Cory K, I'm quite interested by your solution. If you can explain to me how to do to that, that would be much appreciated (I'm talking about the part with solid and dashed lines)

 

As for Ben, I'm not sure I have well understood your solution. If you got an example, maybe that could save my problem...

 

Thanks anyway for all your answers


 

Sorry I'd get fired if I actually posted something useful.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 19
(4,688 Views)

What do you mean by "you'd get fired" ? Are you joking ?

Cory K, I'm thrilled to hear your solution....

0 Kudos
Message 10 of 19
(4,668 Views)