09-05-2013 12:55 PM
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..!
Solved! Go to Solution.
09-05-2013 12:57 PM
Please attach your code so that we can see what you have done.
09-05-2013 01:35 PM - edited 09-05-2013 01:37 PM
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.
09-08-2013 09:07 AM
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
09-08-2013 09:08 AM
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..!
09-08-2013 10:19 AM - edited 09-08-2013 10:26 AM
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?
09-10-2013 11:06 AM
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.
09-10-2013 11:27 AM
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.
09-15-2013 10:49 AM
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..!!
09-15-2013 10:57 AM
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.