キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

VI Call Configuration, Call Setup problem…

解決済み
解決策を見る

       I am loading a simple MainVi w/Timer SubVI in Call Setup, ”Reload for each Call.” The problem is that the MainVI compiles the SubVI into memory, when setup is set to ”Reload for each Call”-Loads the subVI when the caller VI makes the call to the subVI if the subVI is not already in memory. This option does not guarantee that the subVI stays in memory after the call.

        

       When I do it by using “Open VI Reference”, “Call by Reference” and “Close Reference.” The VI works by loading and unloading the SubVI in memory, which ”Reload for each Call” is supposed to do…..?

0 件の賞賛
メッセージ1/7
4,813件の閲覧回数

anyone notice this problem,is there a fix or should i report this, please look at the link above.....

0 件の賞賛
メッセージ2/7
4,784件の閲覧回数
解決策
トピック作成者apokが受理

A strictly typed static VI reference also reserves any subVIs when a top-level VI is reserved, thus making it ineligible for the Run VI method. Refer to the Run VImethod for more information.

LabVIEW loads the referenced VI into memory when you load the top-level VI. When the Static VI Reference function outputs a strictly typed VI reference, LabVIEW reserves the referenced VI as long as the top-level VI is running. LabVIEW closes this reference when the top-level VI is no longer in memory.


So the call set-up options really should be greyed out with static vi referances since the static ref loads the vi with the caller and cannot change call setup.   With this mod to your code the call set-up pop-up is properly disabled

Snip.png




Also- Watch out for that infinate loop in MAIN2.vi (You really should not use default if unwired and have some means to stop on the second callスマイリー ウインク


"Should be" isn't "Is" -Jay
メッセージ3/7
4,774件の閲覧回数

What is really interesting about this feature is how easy it is to write the code that does not do what you want.

  1. Drop the vi you want to reload for each call
  2. Right-Click select Call Set-up
  3. Select "Reload on each call"
  4. Press OK

Bug maybe.png

 

And presto LabVIEW rewrites your code for you to disable the ability to do what you just asked it to do.

 

うろたえたスマイリー

I Think I'll wait for NI to weigh in on this before declaring it a bug but maybe there is a lack of understanding on my part.


"Should be" isn't "Is" -Jay
0 件の賞賛
メッセージ4/7
4,751件の閲覧回数

OK further reading through the help file. 

 

I am/was confussed.  The ACBR or CBR created by the call setup method does perform the way I expect.  (It reloads the vi on each call)  The Caveat that Apok and I missed is that it only reloads the vi if it is not allready in memory and does not "Force" removal from memory.

 

SO Apoks code MAY work differently with timer in memory and out of memory when MAIN2.vi is run.  The Mod I made placed a Strict Type Def CONSTANT on the block diagram and the constant forces timer to be in memory.  which was properly reflected by gyeying out the call setup options .

 

Thanks for straightening me out Jeff!


"Should be" isn't "Is" -Jay
0 件の賞賛
メッセージ5/7
4,744件の閲覧回数

with this block diagram, it does as it is prescribed...."loads and unloads" it from memory. i just dont understand the "reload for each call"?

MAIN2_BD.png

 

thanks for the research Jeff

メッセージ6/7
4,736件の閲覧回数

@apok wrote:

 

thanks for the research Jeff


No Problem-  I learned something new.  You are not guarenteed to unload with a Call set-up.  Although, I would suspect a call to request memory de-alocation would improve the chance that the vi unloads.  If you try it let me know


"Should be" isn't "Is" -Jay
0 件の賞賛
メッセージ7/7
4,731件の閲覧回数