LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Cursor YScale using property node moves cursor position in LV 8.2

I have two Y scales on a graph and need to read the Y axis amplitude value using a free cursor.  I need to be able to change from which Y axis (Ampltidue or Amplitude2) the cursor reads the amplitude.  The graph's plot legend is used to assign Plot0 YScale to Amplitude and Plot1 YScale to Amplitude2. 
 
In LV 7.1 this can be done using a property of the graph : Cursor > Plot.  I can read the Y amplitude using the graph property : Cursor > Cursor Position > Cursor Y.
When a boolean is used with a (Boolean to 0,1) wired to the Cursor.Plot property and a test vi run continuously, I can toggle the boolean and watch the cursor's Y value change.  The cursor position on the graph does not move.
 
In LV 8.2, changing the Cursor.Plot does nothing in this test example.  Instead, Cursor > YScale must be used to change the cursor Y value that is read out.  But when Cursor.YScale is changed from 0 to 1, the Y location of the cursor on the graph changes because it moves to retain the same Y amplitude value that is had on the other Y axis.  For example, if Ampiltude axis (YScale=0) range is 0 to 100 and Amplitude2 (YScale=1) is 0 to 200, and the cursor Y value is 50, the if Cursor.YScale is initially 0, the cursor position will be 50% in the middle of the y axis.  Changing the Cursor.YScale property to 1 will move the cursor position so it is now at 25% up the y axis.  It will also leave the cursor drawn at the previous 50% position.  Dragging the new cursor up the graph across the previous cursor position will cause the previous cursor line to be erased.
 
Note that this behavior does not occur if the front panel is used to change the associaed Y axis by right-clicking on the cursor legend and choosing Y Scale > Amplitude2.
 
Steve
 
0 Kudos
Message 1 of 4
(2,982 Views)

Hi Steve,

Can you please try to run the attached example in LabVIEW 8.2, and let me know if this is the behavior you are expecting?  I am a bit confused about what you are saying because I do not know what test example you are running.  If the example I have attached does not illustrate the behavior you would like, please let me know what is going wrong.  If I have misunderstood the application, and the attached example doesn't match your description, please attach a program that does and restate the questions.

Please let me know if you have any further questions.  Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 2 of 4
(2,953 Views)

Ching,

I have two plots each with its own Y Axis (Y Scale) called Amplitude and Amplitude 2.  I only want one cursor though and wish to change which plot it is associated with.  In LabVIEW 8.2 I can only do this using the graph's cursor's Y Scale property.  In my 8.2 example, the cursor is initially associated with the Amplitude Y axis or Plot 0 near value 2.  If the first thing you do is click the Cursor Y Scale button, another cursor will appear near value 2 on the Amplitude 2 Y axis.  This is because the cursor is keeping its Y value when its plot is changed and so its position on the graph moves because the Y axis ranges are different for the two plots.  It seems that the initial cursor position near value 2 on the Amplitude axis is not being erased.  Note that if the cursor value when associated to Amplitude 2 is say 15, that when changed to be associated to Amplitude, the cursor will disappear since Amplitude Y axis value of 15 is off scale ! Note that changing the Cursor.Plot property has no effect.  It does have an effect in 7.1 and in fact is how the association can be changed.

The behavior when changing the associated plot is different from LabVIEW 7.1  In 7.1, the Y Scale property does not exist.  Instead, the Cursor.Plot property is used.  In my 7.1 example, when changing the cursor association from Plot 0 to Plot 1, the cursor's position on the graph does not change.  Its Y value does change though since it is now associated with a different plot which has a different range.

I would like the 7.1 behavior to still exist in 8.2 because if my two plots are set to autoscale their Y axis then the cursor relative Y axis position on the plot would not change.  This is needed when using the cursor for a threshold value.  i.e. if it is set to be at 75% of Amplitude Y axis, then when it changes to Amplitude 2, it should still be at 75% of that Y axis.

Is the Cursor.Plot property supposed to work in 8.2 as it did in 7.1 ?

Steve

0 Kudos
Message 3 of 4
(2,940 Views)
Hi SteveP,

This was reported to R&D (#45HHBIHE) for further investigation. Thank you for the feedback!

Best regards,

Steven
0 Kudos
Message 4 of 4
(2,917 Views)