LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing Num Legend Rows crashes LV if Stacked Chart

Set Chart to Stacked (by right-clicking on the plot area and choosing Stack Plots)
Wire 2D array to Chart so that each array is plotted in a separate plot area.
If increase the Number of Rows in Legend (and hence the number of separate plot areas)
using a numeric control, LabVIEW (8.5)  will crash.
LabVIEW does not crash if decrease the Number of Rows in Legend
LabVIEW does not crash if use Overlay mode instead of Stacked.
LabVIEW does not crash if use Graph instead of Stacked Chart
 
I am displaying each acquired data channel in a separate plot with common time axis using the stacked chart.  When the user changes the number of acquired channels, I want to change the corresponding number of displayed plots.  Hence I need to be able to change this programmatically.
 
"You also can use the Legend:Number of Rows property to set the number of plots LabVIEW shows in the plot legend programmatically."
 
0 Kudos
Message 1 of 60
(6,629 Views)
This seems to be a bug in LabVIEW,

I will try to reproduce this error and report it to R&D.

Regards,
Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 2 of 60
(6,585 Views)
I have already made it know to Applications Engineer Mike Lyons Applications Engineer Reference#7182398 Phone Support E-Mail to Applications Engineer Mike Lyons Applications Engineer
0 Kudos
Message 3 of 60
(6,575 Views)
This was reported to R&D (# 4CUGA5RK) for further investigation.

Two potential workarounds:
1. If you write to the plot before you change the number of plots visible, then LabVIEW crashes less often. It appears to crash most often when you try to increase the number of plots before LabVIEW has allocated memory for the additional plots. If you are changing the number of plots while LabVIEW is writing to the indicator in a loop, it appears that it still crashes pretty often. This is only a partially viable solution, and only works if you can stop updating the chart while it resizes.

2. Place the stacked plot in another VI and show it on the front panel via a sub-panel. Then use VI server to programmatically update the chart.

Regards,
Juan Galindo
Applications Engineer
National Instruments
Message 4 of 60
(6,558 Views)

Hi,

I also use Labview 8.5 and I've the same problem with the number of stacked plots.

I tried to use workaround number 2, but I don't know how to set the "Num Legend Rows" property with VI server.

My test vi (see attachment test.vi) runs OK with included "test chart.vi", but I don't set the "Num Legend Rows" property .

How can I do this?

Thanks
Hans

Download All
0 Kudos
Message 5 of 60
(6,470 Views)
You can find the Num Legend Rows by the following steps:

  1. Right click on your waveform chart
  2. Select Create --> Property Node->Legend->Number of Rows
Hope this helps!


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 6 of 60
(6,450 Views)

I know this property node, but my problem is:

If I write this property node in the "test chart.vi" then the test.vi breaks or the property node will be ignored if I try to run it.

See attachment: Run test.vi with "test chart.vi" in Labview 8.5

So maybe there is a way to call this property node from the main VI  "test.vi" by using the VI reference of "test chart.vi"?

Thanks
Hans

Download All
0 Kudos
Message 7 of 60
(6,444 Views)
Hi Hans,

I was trying to open your Main VI and it asked for globVIMainPTRMS.vi. Can you please post that also? I also wanted to let you know that I did open your test chart.vi and it crashed my LabVIEW when I got it to update the number of plots. on the system.
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 8 of 60
(6,428 Views)

Hi,
thanks for your reply 🙂

I'm sorry, you're right, a global variable is missing, but you don't need it.

Use these new 2 file (see attachment) and run "mainTest.vi" with this "test chart.vi".

Now it shouldn't crashes anymore (I've deleted the "number of rows" property node in "test chart.vi"), but I can't change the number of stacked plots programmatically still on 😞

I would be very great if you could solve this problem.

Thanks
Hans

Download All
0 Kudos
Message 9 of 60
(6,411 Views)
Oh I've forgotten to delete the global variable 😞
her are the correct ones.
Thanks
Hans 
Download All
0 Kudos
Message 10 of 60
(6,410 Views)