LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reentrant execution problem

When I select reentrant execution in a sub vi, it seems to want to be turned on manually. When I create an executable the reentrant vi doesen't seem to run. Any ideas?

Thanks,
Tom
0 Kudos
Message 1 of 7
(3,801 Views)
Tom,

What do you mean by "it wants to be turned on manually"? It should be that once you have set the execution to be reentrant and save the VI, it should be reentrant from then on. Is this not the case with this VI? Once saved as reentrant, it should also work as a reentrant VI in an executable.

If you could give a few more details, maybe that would help.

Bob Young
Message 2 of 7
(3,801 Views)
Hi Bob,

Thanks for your response.

Let me start by stating my task:
I have a program that I communicate with over active x. My Labview VI quiries with strings - and acts upon the responses. Some of these tasks are time dependent. Therefore I wish to create sub vi's that will thread these tasks at the processor level.

In the example attached (since you do not have the program, there will be no response string) the active x sub vi is reentrant. The flash vi is just there to crreate a timming issue for the threading to overcome.

If I run the reentrant test vi as normal, the active x sub vi will update as I click its run arrow. If I first select continuous run on the active x vi and then run the reentrant test vi, the desired
effect is achieved: continual updates to the quiry string that are not affected by the timming issues of the flash vi.

Is this the least bit clear? I hope so!

Thanks for listening,
Tom
Download All
0 Kudos
Message 3 of 7
(3,801 Views)
I think that you mean that it does not open the fron panel of the subVI and when it is opened by you, it does not update the data on its front panel they way you would expect.

Reentrant VIs are like regular VIs in that they have a front panel and a block diagram. The are different from non-reentrant VIs in that they have multiple data spaces. Each "instance" of the reentrant VI has its own data that it keep track of. Since one VI can have several sets of data, it does not know which one to show on the front panel. So, it doesn't even try.

Something you could do to work around this would be to create a VI that you can use just to display data. Feed it the proper data and let it be the UI. This VI would not be reentrant.

I hope that th
is helps,
Bob Young
0 Kudos
Message 4 of 7
(3,801 Views)
Hi Bob,

Thanks for your reply.

I understand your answer - as per how you have interpreted my needs. But I have no need to view the active x data. I only wish to pass the information through my active x sub vi to my IO as expediently as possible/practical. As well this sub vi should run in such a manner that it is continually looking for updated information.

Forgive me if the specific nature of my question is overstepping the bounds of this forum.

Thanks,
Tom
0 Kudos
Message 5 of 7
(3,801 Views)
It sounds like you need your ActiveX VI to continuously run on its own while looking for new data.

If this is what you want, try putting the ActiveX VI in a separate While loop and pass data to it using the Queue functions. With it in its own loop, it will not be affected what ever is going on in any other loops.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 6 of 7
(3,801 Views)
The lesson here is; Always go back to the task at hand!

Bob - Thanks for accurately answering my question on reentrant ececution.

Ed - Thanks for solving my problem.

Tom
0 Kudos
Message 7 of 7
(3,801 Views)