LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change "Chart x scale maximum range" in running mode....

Solved!
Go to solution

Hi,

 

I have a little problem for labview world, i use chart graph and  if user choose 100 meter for x scale range in running mode,  every time user must see last 100 meter on the chart x scale range in running mode. Also if user change x scale range for instance 200 meter in running mode, user can see last 200 meter every time.

 

I did little labview .vi for this but my problem is that

user choose: 100 meter in running mode (0-100 meter) 

and chart value is 101 for x scale,  x scale is 100-101,100-102,100-103... so on no update other range (100-200) "ı dont do this....

 

Thank you every one and i love labview:) by the way i added example coded for problem (labview 8.0), (block diagram explain problems with label) if u want u can see correct code solution.... 

0 Kudos
Message 1 of 9
(7,997 Views)

hi again,

 

actually i want to update x scale width in run time if user choose 100 meter every time he or she can see last 100 meter on the screen if he choose 200 meter......

 

help me:)))))) 

0 Kudos
Message 2 of 9
(7,973 Views)
Solution
Accepted by topic author kacco
Change the Update Mode from Scope Chart to Strip Chart (properties) and put the Case Structure in an Event Structure.  Your code is constantly setting the Max of your chart instead of letting it scroll.  Don't forget to add a Timeout value and put the Stop button in the Event Structure.

Does LabVIEW 8 have the Event Structure?  If not, you can use a Shift Register and some logic to detect a change in X scale range.

helper.png
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 3 of 9
(7,955 Views)
thank u my friend:)) i will try and i think it is correct solution but try....thank uuu:)
0 Kudos
Message 4 of 9
(7,946 Views)

by the way i wanna ask some question about event str. Why am i using time out terminal 50 milisecond? if i connect -1 while loop doesnt work, or if event str time out terminal is empty value, i see same problem(while loop doesnt work, chart is not running)

 

but event structure can use empty value for timeout terminal..... this vi  no  What is the meaning of this????

 

kudos is coming soon my friend this is good and very useful solution thank u.....

 

0 Kudos
Message 5 of 9
(7,930 Views)

kacco wrote:

by the way i wanna ask some question about event str. Why am i using time out terminal 50 milisecond? if i connect -1 while loop doesnt work, or if event str time out terminal is empty value, i see same problem(while loop doesnt work, chart is not running)

 

but event structure can use empty value for timeout terminal..... this vi  no  What is the meaning of this????

 

kudos is coming soon my friend this is good and very useful solution thank u.....

 


The timeout terminal lets you perform an action at a prescribed rate.  If I didn't use it, the Event Structure would sit until a Front Panel control is changed; that would keep the Random Number function from adding to the chart.  I wanted a new random number to continually add to the chart so I put it in the Timeout case.  I used 50 ms, instead of your 150, because I wanted it to run faster.  Not wiring something to that terminal results in the default value (-1) being used which makes it never time out, explaining why your VI doesn't work when you tried it.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 9
(7,922 Views)

everything is clear thank you for everything....

one day i want to be good labview programmer  in my opinion more practice, more solution and friends is the key about this....   

0 Kudos
Message 7 of 9
(7,916 Views)

kacco wrote:

everything is clear thank you for everything....

one day i want to be good labview programmer  in my opinion more practice, more solution and friends is the key about this....   


 

Read and write a lot of programs.  It's how we learn to speak (listening & talking) and write (reading & writing).  Stick around the forums, too.  Folks will ask questions and you'll have an opportunity to learn as you work through problems and read what others have to say.

Good luck.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 8 of 9
(7,912 Views)

make sure to uncheck the auto-scale option in the properties of the front pannel. This created a problem that took me 2 hrs to find out Smiley Surprised

0 Kudos
Message 9 of 9
(7,174 Views)