LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dinamically changing and viewing values of a sub-VI (repost)

hi,
this is a repost of my letter from 14/8/00 under the name Aviad Frydman.
judging from the replies, I guess I didn't explain myself clearly enough
(thx for the effort, anyway), so here's another try.

if B and A are VI's, and B is used as a sub-VI of A.
B of course starts running after receiving all the connected inputs, and
when B is done all the outputs 'flow' to A.
so in this scenario the inputs to B are given only once, and the outputs can
be viewed only after B is done.
but suppose that I want to be able to change B's inputs *while B is
running*?
suppose I want to be able to view the value of B's indicators *while B is
running*?

is it possible? how? is there more than one way?

thx,
Avs
hi Vital.
Quantum Physics Lab, Bar Ilan University, Israel
0 Kudos
Message 1 of 4
(2,670 Views)
> but suppose that I want to be able to change B's inputs *while B is
> running*?
> suppose I want to be able to view the value of B's indicators *while B is
> running*?
>
> is it possible? how? is there more than one way?

Messy

To change the values while B is running, you could use VI server, which
allows one VI to interact with the front panel of another regardless of the
execution state of that other. Obviously to be meaningful, B needs to read
the front panel controls by means of local variables or by having the
terminals read within whatever you're doing- if you have the terminal
outside a loop or other structure and a wire leads in, that wire reflects
the value of the control at the time the terminal was read, not at the time
you read it from the wire.

VI s
erver will also let you read back the values of front panel controls and
indicators from another VIs front panel.

This is the only way I'm aware of to do precisely what you ask, but the
topic of inter-program and inter-VI communication is quite large.
0 Kudos
Message 2 of 4
(2,670 Views)
In article <8ngc0h$lhl$1@news.huji.ac.il>, avshi avital wrote:
>suppose I want to be able to view the value of B's indicators *while B is
>running*?
>
>is it possible? how? is there more than one way?

Hi,

One point first: I don't think that a 'closed' sub-vi (in the meaning of a
subroutine) is the way you should go. Just in the meaning of data-flow...

However, if the amount of data isn't too big, the a global variable might
be one dirty solution for your data transport problem.
Start two while loops, one with B (modified to read/write also globals)
and one with your indicators/controls reading/writing the globals.

But I have no idea of timing/synchronisation...

Greetings from Germany
Henrik


--
---------------------------- Corinna & Henrik Volkers

volkers@freebsd.first.gmd.de
| | |
__|._.__|._.__|._.____________________ beeeeeeeeeeeeee...
| | |
0 Kudos
Message 3 of 4
(2,670 Views)
Henrik Volkers wrote in message
news:slrn8poc3m.jsp.volkers@freebsd.first.gmd.de...
> In article <8ngc0h$lhl$1@news.huji.ac.il>, avshi avital wrote:
> >suppose I want to be able to view the value of B's indicators *while B is
> >running*?
> >
> >is it possible? how? is there more than one way?
>
> Hi,
>
> One point first: I don't think that a 'closed' sub-vi (in the meaning of a
> subroutine) is the way you should go. Just in the meaning of data-flow...

do you mean that I should not use a sub-VI but rather place the code
explocitly on the flow-diagram? or is another type of VI I'm not aware of?
Greetings from Israel!,
thx, avshi

>
> However, if the amount of data isn't too big, the a global variable might
> be one dirty solut
ion for your data transport problem.
> Start two while loops, one with B (modified to read/write also globals)
> and one with your indicators/controls reading/writing the globals.
>
> But I have no idea of timing/synchronisation...
>
> Greetings from Germany
> Henrik
>
>
> --
> ---------------------------- Corinna & Henrik Volkers
> volkers@freebsd.first.gmd.de
> | | |
> __|._.__|._.__|._.____________________ beeeeeeeeeeeeee...
> | | |
0 Kudos
Message 4 of 4
(2,670 Views)