Hi Scott,
I recomend you to see this file in NI site.
http://zone.ni.com/devzone/devzone.nsf/webcategories/8ABEC12D4C0AA4A3862567AC00583899?opendocument
Mike
Scott Royer III wrote:
> Hello all. Is it possible to multithread subVIs withing structures
> (i.e. loops and case).
>
> I've written a subVI that does three things: Gets the current time,
> generates a random number, and then writes both values to a text file.
> It continues doing this for a random length of time. The subVI has the
> "Reentrant Execution" option selected. My purpose for this subVI is to
> understand how multithreading works in LabVIEW.
>
> I created two main VIs. The first one has two independant calls to the
> subVI. When comparing the data generated by both subVI calls, the time
>
stamp is exactly the same and the random number is different. This, to
> me, indicates that it is multithreading correctly.
>
> However, in the other VI, I have a for structure that runs twice, each
> time calling the subVI. When looking at the data results this time,
> file 1 has time stamps from time A to time B. File 2 has timestamps
> from time B to time C. In other words, the subVIs are executing one
> after the other and not at the same time.
>
> From this evidence, it appears to me that there seems to be a difficulty
> in multithreading withing structures. Is there anyway around this
> problem?
>
> Scott
>
> P.S. Could anybody point me in the right direction to write a COM
> object that can handle arrays from LabVIEW?