ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding autoscale button

Solved!
Go to solution

hi

 

im trying to add an AutoScale button to both X & Y scales of my graph.

 

i know about the right click and x scale, y thing.. but i wang the user to have AutoScale button.

 

i also tries this:

http://forums.ni.com/ni/board/message?board.id=170&message.id=367797&query.id=168419#M367797

and the vi that comes with it.. but it doesnt seems to do the job.

 

any suggestion?

 

0 Kudos
Message 1 of 15
(4,362 Views)

i must say im also familier with visible Item->Scale Legend

 

it doesnt seem to do the job when i use high frequencies...

 

 

 

0 Kudos
Message 2 of 15
(4,354 Views)
it is because that property node is autoscaling the x-axis you need to scale the y-axis
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 3 of 15
(4,349 Views)
here is the code:
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 4 of 15
(4,345 Views)

Harold,

 

Try not to post a VI that is set to autorun when loaded. It makes me nervous whenever a program starts before I have a chance to look at the block diagram.

0 Kudos
Message 5 of 15
(4,334 Views)
lol sorry I modified this code and forgot to take that out
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 6 of 15
(4,330 Views)

Thank you Harold for the Code...

but iv seen it already in the link i have posted in the topic.

 

it doesnt seem to work,

1. iv put off the while loop.

2.iv linked the graph instead of the example wavform to the one i want to autoscale.

 

kept the case as it is

 

result: the program doest flow... only when i press the autoscale it change.

before that autoscale change, the program was running all the time.

 

and another thing: it still does not shrink the X scale to fit a proper view of a sin wave like real instrument do.

iv post my VI here

 

i think both files needed to run properly

 

Download All
0 Kudos
Message 7 of 15
(4,310 Views)

Here is what  i have added.

 

p.s

 

i cant really use 2 while loops in the Vi right? anyway , i called support and that was their suggestion to not complicate my VI

 

WHAY AM I DOING WRONG?

0 Kudos
Message 8 of 15
(4,308 Views)
Without seeing the actual code, my guess is that what you've done wrong is not wiring a timeout value to the event structure. Without that, you don't exit the event structure to run the code outside. Instead of an event, you could have used a simple case statement wired to the Boolean.
0 Kudos
Message 9 of 15
(4,292 Views)

Im not sure i got what you said about the TIME OUT thing...  and i didnt connect anything to that TimeOut, i just copied the code Harold put here... and the TImeOut thing was there already.

 

Ill be more specific in what i want to achive..

 

i added a screenshot of the simulate signal im generating...

 

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

 

 

0 Kudos
Message 10 of 15
(4,280 Views)