LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph showing an extra plot in cursor palette

Hi,
 
I have an XY graph with many plots.
 
The graph is showing an extra plot in the cursor palette.
 
I have 9 plots.In plot legend palette its showing the correct plots only.
 
But in the cursor palette it showing an extra plot with name plot9.
 
I have given the value 9 to the property node legend plots shown.
 
I couldnt find where i am going wrong.
 
I am attaching the portion of graph and block diagram.
 
Any ideas?
 
 
 
Download All
0 Kudos
Message 1 of 11
(4,094 Views)
Hi user,

can you resize the plot legend to show one more entry? Most probably there will pop up another entry named "plot 9"...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 11
(4,074 Views)
Hi user,
 
You might also want to post the code instead of just jpegs, especially since there are case structures. That way we could look through your code a little more thoroughly.
Regards,

Hillary E
National Instruments
0 Kudos
Message 3 of 11
(4,047 Views)
Hi GerdW,
 
Thanks for the reply.
 
Yes there are more plots in plot legend also.
 
But that one its natural i think.Because when we drag the plot legend palette its showing plot 9,plot10,plot11...
But as i am uutosizing the plot legend it is not a problem.And after autosizing its displaying the correct plots only.
 
But in the cursor palette an extra entry coming when i am trying to sanp to plot.But we are not able to snap to that plot as when we try to snap to that plot,automatically it will be snapped to some existing plot.I can not find where i am going wrong.
 
Thanks again....

 
0 Kudos
Message 4 of 11
(4,031 Views)
Hi User,
 
What happens if you build a new vi with a similar graph? What about if you create a new graph in the same vi? Are you able to replicate the problem?
Regards,

Hillary E
National Instruments
0 Kudos
Message 5 of 11
(4,009 Views)
Greetings,

I'm currently trying to figure out how to add 2 additional plots to my xy graph. I see in the properties dialog box you can choose how many plots to show, and when creating a cursor it gives you the option of locking on to a particular plot. With that said I've spent a lot of time with no luck. I've even went as far as using the xy-multi.vi, but that's only a picture, and the cursor and annotations are vital to me. I read the labview help with no luck, maybe I'm not keying in on the right words. I would always get close, but not enough.

I've attached a part of my code that I'm talking about. This particular feature is part of a much larger interface, but rest assured this is the only part of the code you would need. On the code that is attached you will see only one file being read in. Ultimately I want to read in 3 files, out of these 3 files the x-axis would always stay consistent within the 3, only the y-axis would be changing. I've also attached an example file to read in to better understand.

Can someone please help me. You ever spend a bunch of time on something that you know is easier.Smiley Sad
BTW-I'm using V8.5 and still fairly new to LV

Thanks in advance.

-Chazzzmd


Message Edited by Chazzzmd on 03-10-2008 12:46 PM

Message Edited by Chazzzmd on 03-10-2008 12:46 PM
Download All
0 Kudos
Message 6 of 11
(3,883 Views)

Hi Chazzzmd,

So are you trying to write all 3 sets of data to your plot at once or are you just trying to get one case to write data to your graph? You might want to check both this forum and this forum. Let us know if this resolves your issue or if you are still having problems.

Regards,

Hillary E
National Instruments
0 Kudos
Message 7 of 11
(3,856 Views)
Hillary,

Thank you for your reply. Since then I've gotten real close. The plots are being displayed but there's one line connecting the 2 plots. That and they are the same color even though I've picked 2 different colors in the plot legend. So I'm getting closer, and by a quick glance I think those links will help.

Thanks again,

Charlie
0 Kudos
Message 8 of 11
(3,846 Views)

Chazzzmd wrote:
Can someone please help me. You ever spend a bunch of time on something that you know is easier.Smiley Sad BTW-I'm using V8.5 and still fairly new to LV
Chazzzzmd,
 
Could you attach your latest attempt that shows the problem mentioned in your last post:
 
"The plots are being displayed but there's one line connecting the 2 plots. That and they are the same color even though I've picked 2 different colors in the plot legend"
 
This is probably easy to solve once we see the code. 🙂
 
General comments:
You seem to be coming from a matlab background and thus use mathscript excessively. Many times it would be much easier to do things with wires.
 
The code you posted shows some very serious beginner errors that make the code overly complicated and seriously hurt performance and debugging ability. The attached VI shows some simple attempts to fix some of the more glaring problems. I have not touched the big mathscript nodes, but they would be easy to do too.
  1. Your sequence structure has no purpose because execution order is entirely determined by dataflow.
  2. Your terminals are in the first frame while local variables of them are inside the loop. This just causes extra data copies in memory for no reason at all. delete the local variables and place their respective terminal in their place.
  3. Your while loop cannot be stopped and spins at full speed, most of the time repeating the same calculation over and over again and using 100% of the available CPU. Place an indicator in the iteration terminal for the proof! 🙂
  4. This also causes flickering of the graph. The graph only needs updating if the data changes!
  5. All you need is an event structure so the loop spins only if one of the controls have changed.
  6. You have an indicator in one case and a local variable of it in all other cases. Here you can delete all the local variables and place the indicator AFTER the case structure. Makes sense? 🙂
  7. Similarly, you only need one instance of the property node. Everything that occurs in all cases of a case structure should be outside the case structure!
  8. Make the "switch position" an enum! This way the cases are automatically labeled, promoting code readability and and eliminating coding errors and additional diagram comments.
  9. A lot of duplicate code can be consolidated. For example you have three identical FOR loops and "Strings and values" property nodes. One instance of each is sufficient, placed in another FOR loop.
  10. Most people don't have the luxury of 4000x4000 pixel monitors. Keep the diagram and front panel at a reasonable size.

The attached quick modification draft shows some alternative techniques. Have a look at the green diagram comments, maybe it can give you some ideas. I think the functionality is the same as your code, but I think there are errors. I did not try to fix functional errors, just did some simple Refactoring!

See if things make sense. 🙂 Good luck!

 



Message Edited by altenbach on 03-12-2008 01:13 AM
Message 9 of 11
(3,831 Views)
Altenbach,

Thanks so much for your feedback. Fortunately I understood all of your comments. Not much of a Matlab person myself, many times I prefer to use the wires like you say and do the specifc operation to the clusters/arrays  for the very same reason you say..........debugging, plus that's the way I was taught. But this was an existing script. With that said I have uploaded the latest version I referenced that is displaying the 2 plots as 1 and using a line to connect the 2. When viewing the help it seems like I am doing what it says to do for displaying multiple plots, but obviously something is wrong. Usually I'm good at figuring out things, but this one is becoming NOT cost efficient.

Thanks so much for taking a look. As you have already seen I have the "new to LV" syndrome vs. hurry up and get it done. Which such because it makes the learning process much longer in regards to efficiency.

P.S. Sorry about the resolution, but I have dual monitors for my development station. Plus, the LV feature of resizing for different resolutions is a little buggy. Objects tend to mis-align.

Charlie
0 Kudos
Message 10 of 11
(3,815 Views)