Plot/print data in a VI while this data is updated in a CIN 
Author Message
 Plot/print data in a VI while this data is updated in a CIN

Is there any chance to constantly update data inside a CIN while displaying
this data in a VI at
the same time? I know that I have to run the calling VI of the CIN code in a
different execution thread than the VI
for displaying the data. But how can I exchange data with a CIN whithout
ending the execution of the CIN.
Can I pass a Named Queue or a Notifier to a CIN?

Klaus Staehle
Heilbronn
Germany

   -**** Posted from RemarQ, http://www.*-*-*.com/ ****-
 Search and Read Usenet Discussions in your Browser - FREE -



Wed, 10 Apr 2002 03:00:00 GMT  
 Plot/print data in a VI while this data is updated in a CIN

Quote:
> Is there any chance to constantly update data inside a CIN while displaying
> this data in a VI at

> the same time? I know that I have to run the calling VI of the CIN code in a
> different execution thread than the VI

> for displaying the data. But how can I exchange data with a CIN whithout
> ending the execution of the CIN.

> Can I pass a Named Queue or a Notifier to a CIN?

There are probably several ways to do this, but by far the
easiest would be to treat the CIN as a function call that
returns and is called again with new data.  If you want to
have some constantly running code that blocks on a mutex or
a semaphore, then spawn that code the first time you need
it in the CIN, and keep it running in your own thread.

Now the CIN enters, drops off the data in whatever structure
you decide to use, and exits to get more data and return.
Meanwhile the background thread can execute however you like
and the only synchronization needed is a way to spawn it, a
way to mutex the data dropoff, and a way to tell it to exit.

The background C routine that you spawn or fork is now totally
independent of LV and could be used anywhere.  The CIN portion
is particular to LV, and is lightweight.

This of course is easy only if you know how to do it in C or C++.
The easier route is simply to place the work in the CIN, spawn
nothing, and let the diagram and CIN take turns.  This approach
is less sophisticated, but can be made to work quite well for
a fraction of the effort.

Greg McKaskle



Wed, 10 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Plotting Data vs. String Data

2. Data transfering from sub-vi to main-vi

3. Using VI Server to pass data between a Labview Executable and a VI

4. Continuous data transfer from vi to sub-vi

5. Best method to pass high speed graph data from a VI Server called VI

6. Print Labels OK in Preview, Missing Data When Printed

7. Plotting Data on Screen

8. Plotting data from sequence structures.

9. Plotting data in a 3d surface graph

10. I need the intersection of two data arrays, and plot the tangent of X , not Y.

11. how to plot data from table onto different axis on graph

12. plotting x and y axis from two different data

 

 
Powered by phpBB® Forum Software