LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding autoscale button

Solved!
Go to solution

If you don't understand an event structure and the purpose of the timeout, then perhaps you should not be using an event structure.

 

Wire some value up to the timeout or use a simple case statement as I already mentioned.

 

Don't need to see the front panel at all. If you had posted the actual VI, then you probably would have gotten it back fixed.

0 Kudos
Message 11 of 15
(1,231 Views)
ok try this I am not sure exactly what you want but I hope this helps.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 12 of 15
(1,223 Views)

Harold,

 

Again, please don't set the VI to run when opened!   There is probably no good reason to set that on a VI ever.

 


Eldad wrote:

 

im sure there is a way to creat AutoScale button that gonna change the X scale so the signal wont look so dense...

 

 


Eldad,

  

You have a mistake in your terminology.  You asked for Autoscale which is what Harold as given you.

 

However Autoscale means to automatically scale the X-axis to fit all the data onto the axis.  This is going to make the graph look MORE dense, while you are asking for less dense.

 

If you want lower density, you do not want Autoscale.  Then the issue is what do you expect the button to do?

 

To make the graph less dense, you will need to programmatically define an X scale range (minimum and maximum) that yields a less dense graph.  You can do this programmatically but how do you calculate what the values should be?  How does the program know what math to apply to set the min and max.  You could say, "Oh let's make it 100 datapoint".  But then where do you want the 100pts. to be starting at the beginning of your data? at the end?  somewhere in the middle?

Message Edited by Ravens Fan on 05-08-2009 10:16 PM
0 Kudos
Message 13 of 15
(1,217 Views)

Evans - Yes, you are right, thats what i wanted to achive, im sorry im i was not clear, i did tried to say i want an AutoScale button like all the real instruments, you know, when you see like two cycles of some frequency... so im sorry again for mislead someone.

 

now im feeling that im close,  THANK YOU HAROLD for the code you gave me, it does work now better, cause now the program runs all the time, and only when i press "Auto Scale" button , it "FITS" the X scale.

 

from what i understood from Evans, i want to change it to "X scale Maximum"

i did tried that with the folowing steps:

 

1. i deleted the X scale property node

2. right cleck on the graph, creat->property Node->X scale->Range->maximum

3. replaced the "X scale Maxium iv created instead the X Scale fit in Harold's Code. ( and i changed it to Write, Otherwize it doesnt connect)

 

Here comes the Problem:

 

How do i set now the value of the "Maximum X scale" ???

The value i want to achive is:  (1/Frequency)* 4 -> then im suppose to see 4 cycles in Time Domain....

 

 i attached an image of the Block..

 

Again- thank you for the Help....and not giving up on the Challenge..

 

  

0 Kudos
Message 14 of 15
(1,201 Views)
Solution
Accepted by Eldad

PROBLEM SOLVED!!!!

 

Thank you very much HAROLD and Ravens Fan....

 

all i needed to do is to change the Input to Read , and set a math formula to the desired maximum...

 

thanks a lot!!

0 Kudos
Message 15 of 15
(1,189 Views)