LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: XYGraph with units in one axis in LV7.0

When I bundle one array with units (length) and another without units
together into a cluster and wire it to an XY Graph, the unit label
shows up correctly at the lower-right corner of the X axis.

But when I rescale the unit by changing the unit label (from nm to
uin), the Y axis rescales as well! Furthermore, if I change the unit
label back to nm, the Y axis values to not revert back!

It seems that there is a problem when units are in only one axis of an
XY Graph. (I tried with units on both axis and that seems to work
fine).

Any solution/workaround?

Thanks,

--
germ Remove "nospam" to reply
0 Kudos
Message 1 of 8
(3,103 Views)
Hi Germ,

Please post the VI that shows this behaviour. Then it will be easier for me to troubleshoot.

Thanks!

Philip C.
Nationale Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 8
(3,102 Views)
In article <5065000000050000002DB00100-1079395200000@exchange.ni.com>,
Philip C. wrote:

> Hi Germ,
>
> Please post the VI that shows this behaviour. Then it will be easier
> for me to troubleshoot.
>
> Thanks!
>
> Philip C.
> Nationale Instruments


Here it is. A trivial VI. Execute it, then change the nm label of the X
axis to uin (microinch). Change it back to nm. Observe the Y axis going
berserk.

--
germ Remove "nospam" to reply
0 Kudos
Message 3 of 8
(3,102 Views)
In article <5065000000050000002DB00100-1079395200000@exchange.ni.com>,
Philip C. wrote:

> Hi Germ,
>
> Please post the VI that shows this behaviour. Then it will be easier
> for me to troubleshoot.
>
> Thanks!
>
> Philip C.
> Nationale Instruments


OK, here it is. Execute. Change the "nm" in the unit label of the
horizontal axis to "uin", then back. Watch the Y axis go berserk.

--
germ Remove "nospam" to reply
0 Kudos
Message 4 of 8
(3,102 Views)
In article <5065000000050000002DB00100-1079395200000@exchange.ni.com>,
Philip C. wrote:

> Hi Germ,
>
> Please post the VI that shows this behaviour. Then it will be easier
> for me to troubleshoot.
>
> Thanks!
>
> Philip C.


Philip, I tried to post one, but there's something wrong with my ISP or
some other problem, so I cannot post.

But it's very easy to create: Make two array controls, one for the X
values and one for the Y values. Assign the unit nm to the X axis, and
leave the Y array without units. Make a new XY Graph control.

On the block diagram, bundle the two arrays and connect them to the XY
graph. Go back to the front panel and make "unit" visible in the
graph. A unit label will appear near the lower-right corner. Change m
to nm
.

Enter a couple of values in each to the two arrays.

Execute the VI. The points will plot on the graph. Now change the unit
lablel from nm to uin on the graph and then change it back. Watch the Y
axis go berserk.

--
germ Remove "nospam" to reply
0 Kudos
Message 5 of 8
(3,102 Views)
Hi Germ,

I followed your detailed description, and I was able to reproduce the odd behavior in LabVIEW 7.1. I will report the behavior to R&D.

Until they solve the issue, the workaround would be to include a "YScale.Multiplier" Property Node for the XY-Graph, "Change to Write", and wire a "1" to it.

Best regards,
Philip C.
National Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 6 of 8
(3,102 Views)
In article <506500000005000000B1B60100-1079395200000@exchange.ni.com>,
Philip C. wrote:

> Hi Germ,
>
> I followed your detailed description, and I was able to reproduce the
> odd behavior in LabVIEW 7.1. I will report the behavior to R&D.
>
> Until they solve the issue, the workaround would be to include a
> "YScale.Multiplier" Property Node for the XY-Graph, "Change to Write",
> and wire a "1" to it.

Thanks for the workaround, but that works only if the Property node
multiplier assgnment is re-executed after the unit has been changed,
i.e., if the plot if continuously re-drawn in a loop.

Also, when going back to nm, somehow the Y axis limits do not go back
to previous integer numbers, but become a strange number.

I am a little stunned by su
ch an obvious bug. Am I the only one using
units out here?

--
germ Remove "nospam" to reply
0 Kudos
Message 7 of 8
(3,102 Views)

Certainly not the most elegant solution, but it helps if you use a made-up unit for the Y-axis data. You may then hide the unit label under the graph using control editor.

I use Hz for histograms. Sort of makes sense.

Zador  

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