LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.
0 Kudos
Message 1 of 3
(2,207 Views)
sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopOn the time and dialog palette (subpalette of the functions palette) you can find a function called wait (ms). Drop it inside the while loop and wire a constant to it with the number of milliseconds to wait and thus free the processor for other tasks. Unless you need to run the loop faster a good wait time is 200, but even just 0 or 1 ms will have a big effect.
This is how we all managed prior to the introduction of events. On Win9X you would not have discovered this problem because there a while loop will not get all processor time even if it codewise is set to run as fast as possible.

LabVIEW comes with lots of good examples that show you how to use events, synchronisation etc., just select find example from the help menu.
0 Kudos
Message 2 of 3
(2,207 Views)
sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,

I want to pass along a couple of tips that will get you more and better response on this list.

1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.

2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.

3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.

4) If you have a question first search the examples for something tha
t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".

5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.

6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"

Trying to help,

Welcome to the forum!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,207 Views)