sir i am using datasocket read ,i am communicating with java...

sir i am using datasocket read ,i am communicating with java...

Post by sam_amdoc » Thu, 25 Dec 2003 13:40:33


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.
 
 
 

sir i am using datasocket read ,i am communicating with java...

Post by Mads » Thu, 25 Dec 2003 17:10:48

On 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.

 
 
 

sir i am using datasocket read ,i am communicating with java...

Post by Ben » Fri, 26 Dec 2003 00:04:28

Hi 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 that
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