IV Called by reference doesn't open when called 
Author Message
 IV Called by reference doesn't open when called

When using the VI server to call a VI, it is necessary to set the
front panel to be visible through the VI server.

Also, I don't believe that you can display the front panel of a VI
called by the "Call by Reference" node.  This is used mostly for
templates and recursive calls, and I believe does not allow for the
front panel to be visible, as the node creates 'instances' of the VI
that don't have a front panel.

From looking at your diagram, I see two things:  First, you aren't
using the call by reference node.  Second, I cannot see why you are
using the VI server.  You can just simply call the VI directly as a
subVI, and input data to your subVI directly.



Mon, 07 Mar 2005 05:23:44 GMT  
 IV Called by reference doesn't open when called
Brian,

The subVIs is not opened because it is not "called". You use the "Run
VI" method that is equivalent to clicking the white Run arrow of the
VI. To have the VI open its panel when called, first call the VI,
either statically (drop its icon on the diagram and wire inputs) or
dynamically opening a strict reference to the VI and invoking the
"Call VI" method.

Dynamically running and calling VIs with references (as you do in the
submitted VIs) is not the common way to invoke subVIs.



Mon, 07 Mar 2005 09:35:33 GMT  
 IV Called by reference doesn't open when called
I have attempted to invoke the CallVI method instead of the RunVI
method but it's not listed.  Then I tried to change my generic IV
Invoke node to a Strict type by connecting a VI refnum to the OpenVI
Reference type specifier but this doesn't make the Call VI method
available.  I'm not sure where to go next.

What I am trying to accomplish is the following.  First, I have
another larger program which I will add this code once the technique
is verfied. In the larger progrm I have a loop structure that
continuously runs an AI read.  The collected data is filtered and
displayed.  When a button is selected I would like to popup the
parameters for the filters in a box that also has a chart of the
current filtered and unfiltered data.  I plan to access the charts and
parameters by passing their references to the subVI.  But I would like
the main VI to continue to run while the user is able to adjust the
filter parameters on the live data.
If there is an easiler way to get the parentIV to continue to run
while the subVI is running I would be very grateful.

This technique I plan to copy to several additional functions of the
software so that forms with operating parameters can be called up and
modified while the data aquisition continues.  Some functions such as
the user interface or data storge will be staticaly called in paralell
with the daq IV at the begining of the program an be running all the
time, but other components such as forms I would like to be directly
called by thier parentVI.  This will help keep my code modular and
easier to maintain.

Currently all the daq, data storge, filter parameters, user interface
and several other functions are all on one main VI.  The code is
divided into various SubVI's but everything is in one big loop.  As
the program continues to grow I need some method to break the code
apart.

Thank you for your assistance,
Brian Wells
Research Assistant III
Space Research Institute
Auburn University, AL 36830
334-844-5967



Tue, 08 Mar 2005 00:58:43 GMT  
 IV Called by reference doesn't open when called
Brian,

From my understanding of the explanation you gave, here is one
approach you might take.

1.  Create another loop to run in parallel with your main loop.
2.  Inside this loop place a case structure.  In one case of the case
structure place your subVI, in the other case place a reasonable delay
(say 1000ms).
3.  Place a boolean control on your front panel that you want to
invoke the subVI and wire it to the case selector terminal.
4.  Configure the subVI so it is set to open its front panel when
called and close afterwards.

Since the subVI is in an independant loop to the main program, the
main program can continue to execute while the subVI is executing.
Also, the subVI will only execute when you press the button since it
is inside a case structure.  The delay in the other case of the case
structure keeps the polling of the front panel to a reasonable level.



Tue, 08 Mar 2005 01:42:16 GMT  
 IV Called by reference doesn't open when called
Given the rating for my answer, I find it difficult to continue to
support this thread.

The question posed was answered accurately, and additional information
was sought.  If someone doesn't like how I answer, then say so.  Do
not just simply anonymously give a poor rating because you don't like
the answer.  Explain yourself.  Of course, you don't have to, but...

I am now making it a policy to not post answers on threads where I am
giving such unjustified ratings.  Additionally, I may not answer
questions for the person posting the question in the thread whatsoever
in the future.  If the person posting the question did not make the
rating (which has happened before), then I leave it to the person
posting the question to alleviate the situation.  Unfortunately, this
is how it must be.

Abuse of the rating system is something I will no longer tolerate.



Tue, 08 Mar 2005 03:45:15 GMT  
 IV Called by reference doesn't open when called
Although I fear burdening this thread with off topic commentary do not
with to offend an experienced programer willing to lead his time and
experience.

I attempted to submit another rating.  The first one was accepted and
the second ignored.  Therefore someone else must have submitted the
initial two star rating, which I feel was quite unjustified.



Tue, 08 Mar 2005 04:35:51 GMT  
 IV Called by reference doesn't open when called
I apologize for any misunderstanding.  I didn't submit the rating, at
least not intentionally, but I can see how I may have acidently hit
the 2star rating while trying to press the "Comment on this Answer".
When I checked the 5star to inspect it's behavior the rating was
recorded but no other indication was displayed.  I'll drop a note to
Webmaster and ask if the rating's buttons could provide and popup
confirmation and perhaps be moved a little further from the "Comment
on Answer key"

Again I applogize for the misunderstanding and thank you for your
assistance,
Brian Wells
Research Assistant III
Space Research Institute
Auburn University, AL 36830



Tue, 08 Mar 2005 04:25:34 GMT  
 IV Called by reference doesn't open when called
Although I fear burdening this thread with off topic commentary, I do
not wish to offend an experienced programer willing to lend his time
and experience.

I attempted to submit another rating.  The first one was accepted and
the second ignored.  Therefore someone else must have submitted the
initial two star rating, which I feel was quite unjustified.



Tue, 08 Mar 2005 04:36:57 GMT  
 IV Called by reference doesn't open when called
<i>> When using the VI server to call a VI, it is

Quote:
> necessary to set the front panel to be visible
> through the VI server.</i>

When you call a VI by reference, the VI settings "Show front panel
when called" and "Close afterwards if originally closed" are in effect
and the panel "Open" property doesn't have to be set explicitely with
VI Server. That is true for the "Call by Reference" node but not for
the "Run VI" method, which is not a VI call.

<i>

Quote:
> Also, I don't believe that you can display
> the front panel of a VI called by the
> "Call by Reference" node.  This is used mostly
> for templates and recursive calls, and I believe
> does not allow for the front panel to be visible,
> as the node creates 'instances' of the VI that
> don't have a front panel.</i>

A VI called by reference behaves like a node call for that matter. You
can open the subVI panel and interact with controls. The instance
created dynamically do have a front panel. However, if the VI is
reentrant, there is only one front panel for all instances and the
user can't interact with it. This is not related to the "Call by
reference" node. This is true whether the reentrant VI is called by a
diagram node or by
reference.
<i>
Quote:
> From looking at your diagram, I see two things:
> First, you aren't using the call by reference node.
> Second, I cannot see why you are using the VI
> server.  You can just simply call the VI directly
> as a subVI, and input data to your subVI directly.

</i>

I agree.



Tue, 08 Mar 2005 06:34:37 GMT  
 IV Called by reference doesn't open when called
Brian,

Thanks for your reply.  I didn't think it was you that submitted that
(not many people shoot themselves in the foot) rating, but had to put
it that way anyway.

If you were able to submit a rating, then you were not the one putting
in the first one.  I think that the forum demon is back, putting up
unjustified bad ratings.  This was a serious problem several months
ago, but was taken care of by NI.

With all that said and done, I will offer some more advice on your
problem.

Thank you for your reply and for submitting your own rating.

-Mike Du'Lyea



Tue, 08 Mar 2005 07:10:13 GMT  
 IV Called by reference doesn't open when called
Mike,

you have proposed a working solution that you have actually tested and
provided a diagram without asking money for it.
<b>Now THAT worths a 4* rating.</b>

It is unlike you first answer where you merely exposed your inaccurate
beliefs about the "Called by Reference" node. It is a post that, to my
opinion, confused the original poster rather than helped him.

I have rated several of your posts before and it is the first time you
didn't get a 4* from me. I feel perfectly justified  to do so,
especially since my ratings for you still significantly boost your
average. Just hope that NI doesn't remove my 2* rating because then
I'll ask them to remove *all* my ratings to you.

That being said, you should just enjoy this forum and ignore these
silly ratings we all get once in a while.

Jean-Pierre



Wed, 09 Mar 2005 01:08:48 GMT  
 IV Called by reference doesn't open when called
Thank you for each person&#8217;s assistance.  It will take me a few
days to implement and test the ideas outlines in this thread, and
repost once I come to some resolution or road block.

Thus far I understand that I may not be able to implement a
master/slave relationship where the master directly calls the slave
and thus keeps the code modular, but instead must call both IV's from
a higher level VI.

After I work through the suggestions outlined in the post for this
parallel architecture I plan return to the original code and try to
work out the slave display problem which is the only issue to be
resolved for the original code.  For if I can resolve this issue I
will have a master IV in which the calls for dependent IV's are
directly imbedded and do not rely upon another higher level vi for the
call.

I do not wish to discredit anyone's suggestions, because we all have
our perspective from which we attack a problem, and all input has been
appreciated.  I feel that Matt K's suggestion of a parallel form
handling VI is the most concise if I wish to concede the natural
master/slave dependence and work with a parallel architecture.

Again thank you for all the assistance I have received.  I feel that
the implementation of this type of code has an immense bearing on the
way in which my future code is developed.  Unless I resolve the
synchronous mater/slave issue my code will either be limited by the
&#8220;master calls slave, master waits, slave finishes, master
continues&#8221; architecture or all sense of modular reusable code
must be abandoned as the master is dependent upon some parallel vi to
call it&#8217;s slaves.

If there isn&#8217;t a white paper on this topic there needs to be.
If anyone knows of one please pass the link along otherwise when this
thread is resolved I condense the thread and write one.

FYI: The code is writen with the standard development systen and does
not utilizing VI Server.

Thank you,
Brian Wells
Research Assistant III
Space Research Institute
Auburn University, AL 36830
334-844-5967



Wed, 09 Mar 2005 03:15:13 GMT  
 IV Called by reference doesn't open when called
Brian,

Search or scan the Application Notes on NI's support website.  There
may in fact be a document on communication.  You should be aware that
they may not be called what you expect.

I believe that the Appliation Note on Multithreading may also answer
some questions.  If my memory serves, there is also some discussion of
this in a document that covers synchronization (queues, semaphores,
rendezvous, etc.)

Also check for books on the subject.  I know that Gary Johnson
discusses this to some extent in his books.

If I had (only) one complaing about NI's website, it would be that
they don't seem to have a centralized means of communicating their
documentation, and similar resources for people that are unaware of
how to solve some problems.  This forum is over used for such purposes
(no offense to anyone of course) and those of us who participate here
take up the slack for developers who can't find the answers they need
(because they often don't look hard enough, or because there isn't a
centralized documentation database - ala MSDN...wait! did I just say
MS did something good???)

Also, if you were to post (or email me) some information about your
situation, I may be able to help you find an appropriate design for
your problem.



Wed, 09 Mar 2005 03:29:07 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. Cross reference/Call structure tools for C function calls

2. Call by reference vs. call by value

3. Call by reference vs. call by value

4. Delay() Toolbox Call doesn't work on OS X 10.1

5. DLL Call doesn't work the second time

6. Call a dynamical VI doesn't work

7. Why doesn't rb_define_singleton_method call singleton_method_added?

8. Micro Focus CALL-CONVENTION 8 doesn't seem to work

9. Threads in Python version 1.5, thread doesn't start until calling process dies

10. Fortran DLL called by C program doesn't work

11. popup menu doesn't appear when tcl/tk script called from C

12. TclpSetInitialEncodings doesn't call setlocale

 

 
Powered by phpBB® Forum Software