LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Annotations error

Solved!
Go to solution

Hey

 

I am having an odd experience with the Annotation for xy-graphs.

 

First:

I created a list of annotations, and plots that to my graph.

This worked fine.

 

Then:

I added a secondary y-scale to the graph, and wanted to create annotation for this scale also.

These annotations on the secondary scale never showed up, but no error appeared.

 

And then:

I tried back and booth to get it to work, and suddenly the annotations on the primary scale disappeared too.

 

Frustrations:

I tried even more to track down the bug, and now no annoations are shown at all, but at least the annotation property gives an error.

 

I have added a very simple example of what I Want to plot.

 

I hope somebody can help me

blockdiagram.PNG

Frontpanel.PNG

 

 

------------------------------
LabVIEW 2009 and 2011 user, with LabVIEW toolkit for Lego Mindstorms NXT.
0 Kudos
Message 1 of 6
(2,086 Views)

Have a look on the LabVIEW shipped example for annotation property node, which might help you.

 

Programmatically Annotate a Graph VI in the labview\examples\general\graphs directory for an example of using the Annotation List property.

0 Kudos
Message 2 of 6
(2,070 Views)

Well thanks for the advice... I have looked at the example-code, and as I wrote, it actually worked with a single scale graph.

 

Have you tried to open my code I have attached? Do you get the same error? And can you see what I have done wrong?

------------------------------
LabVIEW 2009 and 2011 user, with LabVIEW toolkit for Lego Mindstorms NXT.
0 Kudos
Message 3 of 6
(2,059 Views)

You pointed to a second x-scale, but you only have one x-scale defined (annotation 0, below the 0.8, in your image above). Check the properties.

 

In summary:

  • your graph has two y-axes and one x-axis.
  • your property nodes tries to address one y-axis but two x-axes.
  • The first annotiation tries to use the second x-axis, which does not exist.
0 Kudos
Message 4 of 6
(2,052 Views)

Thanks for the reply.

 

I can se I have made a copy-paste error then i made this example. You are absolutely right, I have swaped the x- and y-axis.

 

This clears out the error, but it only brings me back to my original problem (which did not create any errors):

 

I do NOT se any anotations that have been placed on the secondary y-axis.

 

I have uploaded the corrected code, and screenshots. Can you confirm, that only the anotation on the primary y-axis is shown?

 

BlockDiagram.PNG

FrontPanel.PNG

------------------------------
LabVIEW 2009 and 2011 user, with LabVIEW toolkit for Lego Mindstorms NXT.
0 Kudos
Message 5 of 6
(2,026 Views)
Solution
Accepted by topic author Neffer

Ahh, now i finally got the point!!!!

 

It is the "Label Offset:Y" that is the problem. The number is connected to the scaling of the y-axis. (I thougt it was in pixel) A number arround 0.35 brings back the annotation on the secondray y-axis.

 

Thanks for help anyway Smiley Happy

------------------------------
LabVIEW 2009 and 2011 user, with LabVIEW toolkit for Lego Mindstorms NXT.
0 Kudos
Message 6 of 6
(2,024 Views)