08-24-2009 01:46 PM
I see your reasoning, very insightful. Thanks once again, I hope it works for my long test.
Regards,
David J.
08-27-2009 12:01 PM - edited 08-27-2009 12:02 PM
FYI Darin, nice catch. your "1 minus" formula seems to be the workaround I needed. Annotation labels are consistently above the annotations even after long durations, when feeding the X offset with "index * 1-multiplier". I dont' think this is the behavior NI intended though, when using an X multiplier other than 1. I still have not heard back from them.
Anyway thanks for the help, and I'll mark this solved once NI officially acknowledges the issue.
Cheers,
David J.
08-27-2009 12:23 PM
08-31-2009 01:58 PM
Hi,
I'm now running into a related issue, which I’m not sure yet how to work around. My purpose for placing the annotions in the first place was to save them along with the graph data (in the tdms file itself, using tdms set properties), and load them back in for later post processing. I am seeing now when I load them back in, the annotation array is being populated correctly, but the annotations themselves are shifted waaay to the right (see attachments). So it seems a related workaround for this issue might be to artificially manipulate the x offset once again upon loading by some factor, which I am going to play around with, but I wanted to post this for the devs working on this issue. BTW, the multiplier of the graph is also being set to what the original acquisition was set at, which in this latest test case was set to .1 (10hz sample frequency).
Regards,
David J.
08-31-2009 07:05 PM
Hi david_jenkinson,
First of all, thank you for being so thorough with your screen shots and explanations. I will be happy to file a Corrective Action Request (CAR) for your original issue and am currently in the process right now of trying to develop some code to reproduce the issue you were originally having. However, I have been unable to do so. Do you think you could post either your code or a subset of your code that will reproduce the issue with the annotation not being directly above the corresponding point? If so, this would expedite the process.
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer
09-01-2009 12:23 PM - edited 09-01-2009 12:24 PM
Hi,
In the short term, I have posted a vi which is a variation of an example from NI, which reproduces the issue. I sent this previously in an email to Eric Vogel, not sure if you already have this.
The NI example vi I modified was originally titled "Programmatically Annotate a
Graph.vi". I have made the following changes to accord with what I am doing in
my application, and saved/as to "Programmatically Annotate a
Graph_snglplot.vi":
In the Min even case:
Inserted property to change
annotation mode to 1
Changed PositionX and PostionY properties to Label
Offset.x and Label Offset.y, hardcoded to 0.
Outside the loop, on
initialization:
Added a property to set the Xscale.Multiplier, added front
panel control.
So observe when changing the front panel control to 0,
things behave as expected. When changing to .05, as in my application, things go
a bit haywire. The "min" label of the annotation is offset to the left by some
amount. My end goal is to
have the annotation label directly correlating to the annotation itself, like it
behaves when you set the Xscale.Multiplier to 1.
Let me know if this code is sufficient, or I can hack up a standalone version of the vi. But this may get you started.
Regards,
David J.
09-02-2009 10:00 AM
Hi david_jenkinson,
Thank you for the code. I believe I have been able to reproduce an issue with the Max annotation in the example. Is this the same behavior you see?
If so, I will be happy to file a CAR for this. I have also been able to reproduce the same issue with LabVIEW 2009.
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer
09-02-2009 01:32 PM
Hi Aaron,
Kind of. The graph I see is attached. The code modification to the "min" case (vi attached in this thread) for me affects both the min and max annotations. I think due to the unexpected interaction between the multiplier setting, and the label offset settings of the annotation.
I am also working on a stripped down version of a standalone copy of the vi I use to gather data. I just haven't had a chance the last day to work on this, but should be soon, and I will post that also.
Thanks
David J.
09-02-2009 02:12 PM
Aaron,
I would have posted the code by now if it were not for the unresolved error I am getting when trying to build a "source distribution". I have very bad luck with builds, and this one is no different. The error is very crazy. Anyway I will try to resolve and post this today, if not it will be after Monday of next week for I am gone until then. Hopefully the small example you have can serve to help find the issue in the meantim.
Thanks
David J.
09-04-2009 10:09 AM
Hi david_jenkinson,
I have been looking at the modified shipping example you posted and have made some interesting observations. In the original shipping example and in your modified version, the Max and Min annotations have some propery discrepancies. The Max annotation has an Annotation Mode = 0 (free) and Plot = -1, while the Min annotation has an Annotation Mode = 1 (snap to plot) and Plot = 0.
After modifying the Max event case in a similar fashion to your modified Min event case (Label Offset.X = 0, Label Offset.Y = 0, Annotation Mode = 1) and also setting Plot = 0, I noticed that the behavior of the annotations are better, however, not as completely expected. The Max and Min annotation were always pointing to the correct max and min points, but the labels were all the way to the left side of the graph.
This behvaior seems to have been corrected in LabVIEW 2009. I took your same example code and modified it in the same way in LabVIEW 2009 and got what I believe to be the expected and correct behavior. Would you agree that this is the behavior you are seeking?:
Now, back in LabVIEW 8.5.1, if you continue to modify the Max event case by setting the Annotation Mode = 0 (free) and Position.X = 'max index' and Position.Y = 'max value', the labels of the annotations move to the correct location, but the arrow of the annotation is not correct:
I believe this is because the Position.X property is in the coordinate system of the X Scale value that is associated with the annotation or plot (taken from LabVIEW Help) and the X Scale.Multiplier property affects the X Scale of the plot. When using X Scale.Multiplier = 1, the annotations behave as expected using both Annotation modes:
Like I mentioned earlier, this behavior seems to have been corrected in LabVIEW 2009 (for X Scale.Multiplier = 0.05), so a patch for LabVIEW 8.5.1 will most likely not be released. At this point, it may be beneficial to upgrade to LabVIEW 2009 if you require this annotation behavior in your application. I hope this is helpful. Please let me know if you have further questions.
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer