LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start, end & manage a thread in LV

Also how to exchange the data between these threads.
0 Kudos
Message 1 of 7
(3,066 Views)
LabVIEW does support "custom multithreading" only in quite indirect way. LabVIEW began to use multithreading very early and does it in the background without letting the user know.
So if you have a "normal VI", it could be executed already within more than one thread.

The simplest way to affect the multithreading behaviour is to encapsulate functions, which have to run within different threads (running in parallel) into different subVIs. Then change the setting for each of those VIs within the VI settings (Ctrl+i) in the tab execution to execute the VI in a different "execution system" (means: threadpool). But you don't know if those subVIs themself are splitted into further threads.......

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 7
(3,053 Views)
Ah, nearly forgot to tell you about data-passing:
The easiest way is to use either notifier or queues.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 7
(3,052 Views)

Is there any method like memory share in data exchange?

What method is more efficient for data exchange in LV.

0 Kudos
Message 4 of 7
(3,038 Views)
There is no shared memory available in LV. The concept of memory management is encapsulated deep within LabVIEW. This is good for beginners and developer with "normal applications".
But if you have to go for every last bit of performance, LV has its own pitfalls you have to be aware of.

Regarding efficiency of datatransfer:
Sure every transfermechanic has its own effect on performance. But there is most often another, more important question to be answered: Do you need every single data or is it ok to lose some data from time to time?
In regard to the answer of this question, you have to use buffered or unbuffered datatransfermethods....
Each has its advantages as well as disadvantages. Here is a short list of the common methods to transfer data within a single LV application:
- Global Variable
- Functional Global Variabla aka L2-style Variable aka Action Engine
- Notifier
- Queue
- Shared Variable
- File

Please note that this is a list of possible solutions without claim of completeness and without giving info about performance nor any pitfalls (are there are many for some of those mechanisms... )

hope this helps,
Norbert


Message Edited by Norbert B on 05-30-2008 03:43 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 7
(3,034 Views)
May you give any info or reference of 'Functional Global Variabla aka L2-style Variable aka Action Engine'
0 Kudos
Message 6 of 7
(3,028 Views)
Please follow this link for further infos on FGVs.

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 7
(3,025 Views)