Jump to content

Launching a VI dynamically inside RT


Recommended Posts

Hi all,


 


I am trying to launch a vi dynamically inside RT. But I am unable to do it. It either throws up error 100 (VI not in compatible state for this operation) or just I get disconnected from the RT. I am not sure about the problem and I need help in this. How do I launch a VI dynamically inside RT. All its dependencies are downloaded to RT.


 


The VIs I am trying to launch is a member of a class. 


VIs property is set to be modal. (I want it to be front most when it gets launcheed. We are using LabVIEW Embedded UI for monitoring purposes). 


I am able to get the reference of the VI porperly. The error occurs in invoke node which tries to run the VI. 


 


Should the VI be reentrant for launching(a hunch of my own-but not sure why it should be)?


 


Thanks in advance for your replies.


Link to comment

Well a VI doesn't have to be reentrant to be dynamic.  But generally this is what you want because dynamic usually means you are going to spawn N copies of this VI at once, and that can only happen with a reentrant VI.  I'd start with proving it out on your host first.

 

Here is a post I made a while ago showing how to launch reentrant VIs using a static VI reference and the VI name.  This is a better way in most cases than using the VI path.

 

http://forums.ni.com/t5/LabVIEW/building-an-executable-with-vits-with-Labview-2011/m-p/2384984#M740405

 

See how that works on the Windows development side.  Then see if you can do something similar in a test VI on the RT.  I haven't used the embedded UI but I didn't think there would be any strange limitation on the dynamic VI launching.

Link to comment

Well a VI doesn't have to be reentrant to be dynamic.  But generally this is what you want because dynamic usually means you are going to spawn N copies of this VI at once, and that can only happen with a reentrant VI.  

 

hoovah,

 

I need to launch it only once. It is working well if I statically link it. I am now able to launch it. Previously my problem was that I had already referenced the vi statically somewhere else(though not called) and had the VI property set to show front panel on call. This had let the vi to be already running( i am not sure why this behavior occurs) . But the existing problem is the vi is not showing its front panel on PC(from which I am running the VI) though it shows on embedded UI.

 

 

Are you launching the class member from within the class itself?

 

Shoneill,

 

No I am not doing so. The vi I am running is a public vi. I am running it from the startup vi.

Link to comment

hoovah,

 

I need to launch it only once. It is working well if I statically link it. I am now able to launch it. Previously my problem was that I had already referenced the vi statically somewhere else(though not called) and had the VI property set to show front panel on call. This had let the vi to be already running( i am not sure why this behavior occurs) . But the existing problem is the vi is not showing its front panel on PC(from which I am running the VI) though it shows on embedded UI.

 

You launch the VI inside your RT app and want its front panel to show on your host computer? That is not possible to the best of my knowledge. Your host application can have a front panel that it shows and remotely call your VI through VI server to execute some code on your RT taget, though.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.