From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

axes values on XY graph

Hi,

I want to have an option so that I can fix the maximum values on the axes of XY graph. This code is supposed to create trajectory for XY stepper motors. If you will run this
code (please download the code in the next message, which is a subvi), you will see that
the maximum values on X and Y axes are changing as the code runs. However I want the fixed values:

Initial value on X axis--> X_Initial
Final value on X_Axis ---> X_final

Initial value on X axis--> Y_Initial
Final value on X_Axis ---> Y_final

All these values are on front panel of "complete_Experiment.vi".

Thanks in advance,
Dushyant
0 Kudos
Message 1 of 4
(2,199 Views)
Here is another subvi, which you have to download if you want to run the previous one and check.
0 Kudos
Message 2 of 4
(2,194 Views)
Simply disable autoscaling of the x and y axis and write the desired x and y range via a property node of the graph (Xscale.minimum, Xscale.maximum, Yscale.minimum, Yscale.maximum).

You do some interesting coding to grow the data array for the graph. Since you have the entire array at the beginning of the loop, and you want to run it exactly once per data point, a FOR loop is more approriate. You can autoindex to get each value in sequence and reshape (=truncate in this case!) to only get the arrays up to the current point. This is more efficient. There is also no need for local variables and clusters. (see attached quick modification for some ideas. LabVIEW 7.1).

Message Edited by altenbach on 03-07-2005 04:11 PM

0 Kudos
Message 3 of 4
(2,187 Views)
Thanks a lot, I will try to do the same as you suggested.
0 Kudos
Message 4 of 4
(2,178 Views)