LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

query

Solved!
Go to solution

hello friend..

Today  I programme one VI,where i had created following event

  1) for starting the moter , CHANGE VALUE event created on START button

  2) second for stopping  the moter  CHANGE VALUE event created on STOP button

but while execution I face one problem that is when first event occured then i was unable to stop the moter inside the first event

so please tell me any solution or idea ??

 

thankss in advance..!

0 Kudos
Message 1 of 17
(3,428 Views)

Please attach your code so that we can see what you have done.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 17
(3,427 Views)

If you have the stop button terminal in the first event, you will not be able to operate it, because events are set to "lock front panel unitl event completes" by default. You need to untangle your code and avoid events that take a long (or infinite) time to complete.

 

There are too many ambiguities in your description to really help, so, as has already been mentioned, attach your actual VI.

 

Also, next time use a descriptive post title. "query" is way too generic. Evn something simple like "problems with events" would have been orders of magnitude better.

0 Kudos
Message 3 of 17
(3,418 Views)

I attached part ofthe VI where i faced the problem.

in this vi I need to use foor loop for repetative process but i can't stop it,so can u tell me  is there any solution ? so that i can stop for loop 

0 Kudos
Message 4 of 17
(3,377 Views)

I attached part ofthe VI where i faced the problem.

in this vi I need to use foor loop for repetative process but i can't stop it,so can u tell me  is there any solution ? so that i can stop for loop .

thankss in advance..!

0 Kudos
Message 5 of 17
(3,376 Views)

Your event structure needs to be inside the while loop, not the other way around like you have it now.

 

You have a data flow problem.  The Stop For Loop button is read as soon as your VI starts.  Then your event structure will either timeout, you'll hit the Stop For Loop button and that event case runs and basically does nothing.  Or you'll hit the Stop button, that event case runs, the while loop starts and it will run forever  because the value of the Stop For Loop button as it was already read at the beginning of the program will be False, that is the value that enters the while loop, and it will run forever.

 

You need to learn more about data flow.  Start by running your VI with highlight execution turned on and watch how it runs.

 

Then I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

PS:  Why do you have a button called "Stop For Loop" when your VI doesn't have a For Loop?

0 Kudos
Message 6 of 17
(3,371 Views)

hii 

friendss

I  read contineous data comming from com port by using string control and some strings operations.

while reading this data the vertical scroll is not updating  it's  current position....so i think i shoud use property nodes

but i didn't  ...plz give me a direction.

thanksss in advance.

0 Kudos
Message 7 of 17
(3,326 Views)

If you want the string indicator to scroll to the bottom, then use a property node.  The property you want is Text->Scroll Position.  Just set the property to the max I32 value if you just want it to go to the end.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 17
(3,320 Views)
Solution
Accepted by topic author manya

hi friendss

I made a main vi in which i use one sub VI  

now how can i calculate the time required to run this sub vi ? (where i didn't use any loop )

is it possible by using property node? and plz tell me any  alternatives

thankss in advance..!!

 

0 Kudos
Message 9 of 17
(3,288 Views)

You cannot calculate the time required to run the subVI, because this is a complicated function of hardware and software and will be different on every single computer you try. However you can measure the time it took to exectute the subVI for each call. Is that what you want?

 

Typically you would take a time stamp (or tick count, or high resolution relative seconds, or similar) right before and after the call, and take the difference.

Why do you bring property nodes into the discussion? That makes no sense!

 

If you want more specific help, show us your code.

0 Kudos
Message 10 of 17
(3,285 Views)