I'd really appreciate if you'd explain how to run two VIs concurrently as
you suggested, so that I wouldn't have input-output dataflow dependency.
Thank you very much.
"Cult of Nurse's" wrote in message
news:3FC0C6C3.8030401@health.com...
> VI 1
> 1. Read text file to array.
> 2. Peel off one command at a time.
> 3. Place peeled off command into a queue.
>
> VI 2
>
> 1. Wait until queue has an element.
> 2. Remove element from queue and send to controller.
> 3. Repeat.
>
> Your application is good for a queue. The two vis must reside side by
> side on the calling vi, with no input-output dataflow dependency. So
> really, they both share the queue reference input, and they both run
> concurrently.
>
> In your code, I suspect that VI 1 outputs a string to VI 2. This
> establishes dataflow dependency and VI 1 will complete execution before
> VI 2 runs. Imagine a tree structure where the top vi is at the root, and
> lower nodes run because they have input data from parent nodes. I think
> you have it set up such that the reader vi is the parent of the
> controller vi, but you want it set up so that the reader and controller
> are at the same level in the tree. The queue allows them to communicate
> (and also a global variable).
>
>
>
> Eugen T wrote:
> > Hi all,
> >
> > I have one VI which reads commands (one line at a time) from text file,
puts
> > them into 1D array, then reads them from array to string one element at
a
> > time with some delay. Second VI is supposed to take those values from
string
> > (i.e. string in the first VI is the input to 2nd VI) and send them to
> > controller via command port.
> > First VI works fine - I can see commands appearing one after the other
in
> > string output. The problem is when I am trying to see the value of the
same
> > string in 2nd VI - it waits for all delays and then only outputs LAST
> > COMMAND from the file.
> > Could anyone point where I am making a mistake?
> >
> > Thank you!
> >
> > viperz (at) mail (dot) com
> >
> >
>