LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot the Hi-Lo limits and changing colors in same XY graph.

I have a requirement to plot two analog parameters - flow Vs rpm of a pump. The conditions are :

1. First plot the limits ( high and low ) of the flow for an rpm range of 500 to 4100 based on a specification table in yellow colour. For this I am trying to create a custom XY-Graph with BG property set to "T" and superimpose on the real time graph. But the graph just does not become transperent - how to do this ?

2. In real time, ON THE ABOVE SAME GRAPH, plot the acquired values in green colour for 500 to 4100 rpm and in blue colour for 4100 to 500 rpm. But unfortunatley when I tried to change color, just when I am reversing, the already plotted ascending curve also changes to blue colour !

I am making use of the XY-Chart buffer to simulate the real time plotting and make it behave like a waveform chart.

After two days of trying to do the above, I have now started believing that the above is impossible in LV7.0 - I am sure it must be possible - but how ?

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 13
(4,555 Views)

@Raghunathan wrote:
I have a requirement to plot two analog parameters - flow Vs rpm of a pump. The conditions are :
1. First plot the limits ( high and low ) of the flow for an rpm range of 500 to 4100 based on a specification table in yellow colour. For this I am trying to create a custom XY-Graph with BG property set to "T" and superimpose on the real time graph. But the graph just does not become transperent - how to do this ?
2. In real time, ON THE ABOVE SAME GRAPH, plot the acquired values in green colour for 500 to 4100 rpm and in blue colour for 4100 to 500 rpm. But unfortunatley when I tried to change color, just when I am reversing, the already plotted ascending curve also changes to blue colour !



1/ Use the paint brush in the tool palette, to paint in transparent color both the graph pane and the graph frame. You'll also have to hide the legend, the scales and the grid. However, you do not need to have two graphs : see point 2 !

2/ you can't have different colors form the same plot. Use different plots on the same graph, and add points on one or the other according to the conditions. You can use the "NaN" value (Not-A-Number) when you want to avoid plotting a point. See the attached vi.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 13
(4,541 Views)
Hi:
Any chance of getting the multiplot example vi, saved for 7.0? I have a need for exactly that functionality.
Thanks either way,

Dave
0 Kudos
Message 3 of 13
(4,539 Views)
Sorry, I knew that I was forgetting something !

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 13
(4,539 Views)
Thank you sir. You are a connaiseur of fine wine/women and song.

Dave
0 Kudos
Message 5 of 13
(4,534 Views)
Mon cher Monsieur, just keep that as a secret ! 🙂

CC
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 13
(4,530 Views)
Thanks a ton.

It has once again been proved that the power of LV, is only limited by the imagination of the user.

You did a great job of developing and attaching the code that does exactly what I want.

Best regards.

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
Message 7 of 13
(4,512 Views)


@chilly charly wrote:
Sorry, I knew that I was forgetting something !

CC




Hi Chilly Charly,

I am back with one more issue.

OK I have managed to plot six different colours on the same graph. So far so good thanks to you.

But now my problem is to programatically and selectively erase only two of the colours ( the real time curves ) at the end of every cycle to p[lot the next cycle. The limit band plots have to remain as they are !!

Any tips to do this ?

( I have a vague idea to clear all plots and then replot the limits again- but I am sure there must be a more elegant way ...)

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 8 of 13
(4,492 Views)
Raghunathan wrote:

...( I have a vague idea to clear all plots and then replot the limits again- but I am sure there must be a more elegant way ...)

There is probably a more elegant way, but that will also be more complex. Just forget elegance and go for efficiency... Since the limit curves are drawn from a limited number of points a redraw will not add to much computationnal time to your program.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 9 of 13
(4,481 Views)
Hello Chilly Charly,

Somehow this graph stuff eludes full grasp. Maybe I have'nt got the basics right while migrating from VB.

I am using your example of multicoloured plot inside a 50ms Timed loop. The two limit bands are generated outside of the loop and fed to the graph for plotting. And the real time data from two Analog channels are plotted INSIDE of the loop with shift registers keeping track of successive values. Fine so far .

Now at the end, after I am done with the viewing, I have added a button called "CLEAR". And in its true case have kept a property node of the graph and to the "Value" property I am writing an array of zeros. So when I click the button, graph clears. BUT..... the plots re-appear immediatley when I release the button.

OK I tried clearing the right side shift registers and all other gimmicks that came to mind. But still not got what I want. I know I am missing something. Would be happy to know what ....

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 10 of 13
(4,452 Views)