LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple legend on graph

Solved!
Go to solution

Hi all,

 

I am doing a program to display N number of parameters on a single graph.

I manage to get it done on my test vi, but when i code the same coding to my real vi, the arrangement of the legend is not as per expected. 

It has always jump to the second parameter instead of the first.

however, when i tick only one parameter, it will display on the legend. 

 

On my test vi and also my real vi, the coding looks like the file below (1.jpg) - exactly the same.

2.jpg --> shows my test vi front panel.

3.jpg --> shows my real vi which the legend is not per expected.

 

I am really confuse of the different outcome even though it's coming from the same code.

 

Please advise.

your help is much much much appreciated.

 

Thanks. 

 

 regards,

Roziela Sharib

Download All
0 Kudos
Message 1 of 8
(3,690 Views)

What is your LabVIEW version?

Can you attach the program that fails?

0 Kudos
Message 2 of 8
(3,681 Views)

On a side note, your example code is extremely convoluted. Why do you need two loops, a shift register, an intermediary array, index array operation, etc.

 

 

 

All you need is one loop and autoindexing on the names array and boolean array. Here's a quick draft.

 

Message Edited by altenbach on 11-25-2008 11:06 PM
0 Kudos
Message 3 of 8
(3,674 Views)

Hi altenbach,

 

Thanks for your reply. 

Currently i am using the Labview version 8.2.
Attached is the vis - I have attached both the test(UPDATE LEGEND.vi)  and the real (real.vi). real.vi is the one that fails.

It doesnt display in sequence and 2nd parameter always come first.

 

Please advise.

 

Thank you. 

 

 

regards,

Roziela Sharib

Download All
0 Kudos
Message 4 of 8
(3,671 Views)

The vertical order matters for property nodes. On the right, you need to reverse the order of the two properties:

 

 

  • select the active plot first and then set the plot name.
 
btw, your while loop needs a wait or an event structure. You only need to spin it when one of the controls change, and not millions of times /second.

 

0 Kudos
Message 5 of 8
(3,660 Views)

Altenbach,

 

Thanks for the quick draft, it really helps..

(No wonder my program is not working..it's too complicated!!~ haha)

 

Anyway, I have tried to simplify as per your advised.

Looking at the program, i only manage to run my real.vi if i tick the checkbox in sequence without skipping any checkbox.

If i missed even one check box, this error message come up:

 

Error 1077 occurred at Property Node (arg 1) in real.vi

 

Possible reason(s):

LabVIEW:  Invalid property value.

Property Name: Active Plot

 

Please advise.

 

regards,

Roziela Sharib

 

0 Kudos
Message 6 of 8
(3,653 Views)
Solution
Accepted by topic author Aleizor

Roziela wrote:

Looking at the program, i only manage to run my real.vi if i tick the checkbox in sequence without skipping any checkbox.

If i missed even one check box, this error message come up:


Oh sorry, yes, we need to make a small modification as follows, of course:

 

 

 

(increment only in the true case. The other case is wired across).

Message Edited by altenbach on 11-25-2008 11:56 PM
0 Kudos
Message 7 of 8
(3,650 Views)

Altenbach,

 

Thank you very very very much.

You helps a lot.

I can run the vi now. 

 

 :smileywink:

 

Thanks. 

 

 regards,

Roziela Sharib

 

0 Kudos
Message 8 of 8
(3,641 Views)