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: 

How I setup XY Graph ranges accordinating to tha values XY arrays that I received (start at the first data valus ... not from the Zero coordinate)?

The attach file works well except that it displays from Zero coordinate (if Control Data = 100, X array starts at 1050, Y starts at 1000).
I would like it displays X from 1000 and stops at 1050, Y can be display from 900 to 1000 (or as its valus 1000 to 1049)

Can any one show me how to set up X & Y as I wish by Panel or Diagram (Property Nodes)

Thanks.
0 Kudos
Message 1 of 4
(2,769 Views)
If these ranges will be the same in any case, disable AUTOSCALE for both X and Y scale and use OPERATE tool to edit minimum/maximum limit for each one of them.
If you need variable ranges, use Property Nodes to set thir values (Properties > X/Y Scale > Range > Minimum/Maximum). You may calculate the values for them using ARRAY MAX & MIN function.

Hope this helps
0 Kudos
Message 2 of 4
(2,769 Views)
Thanks, but even I did disable the Auto range on X/Y Output Cluster (or XY Graph) in Front panel ... when I created the Output Cluster (or XY Graph) property node, the X & Y scale said only can be read, therefore I can not set the Min/Max as you said (I tried it before) ... might be I forget something?

I attache my improve program (X & Y still Auto range, otherwise it does not work properly when we change the number of reading: use Control bytes in FP when you run), I can initialize the X value and X increment ,but I can not control the maximum values (always show double range?)

*) And I also can not put Y in Min/Max Range as you said!

Please try it & modify it (as you wish, even use different Graph type)

Thank you again, might be you solve my p
roblem this time!
0 Kudos
Message 3 of 4
(2,769 Views)
Hi ATC,
Find attached vi ... where I added one frame containing the property nodes I was talking about. I didn't know exactly the limits you need to set, therefore I used 4 controls. You may replace them with the calculated values that you want (also, you can cut and paste them in another frame). Regarding the "read only" problem, maube you forgot to "change to write" before passing a value to them.

I don't know how the manual change of min/max is not working (using Operate Value or Edit Text tools). I assume that you had autoscale still on.
Keep in mind that you need autoscales disabled in both cases, otherwise first time the graph is ploted it will change your settings.

Good luck and let me know if it's working

p.s.: one ques
tion though ... why using a string and local variables to pass data from one frame to another? (you can transfer the entire array using sequence local)
0 Kudos
Message 4 of 4
(2,769 Views)