Jump to content

Cannot instantiate template VI when in memory


Recommended Posts

Just want to let everyone know of a change in the way template VI's are instantiated. I got this error when I ran code that used to work fine in LV61:

Error 1127 occurred at Open VI Reference in Launch View Data Screen.viPossible reason(s):LabVIEW:  Cannot instantiate template VI because it is already in memory.

In LV61 there was no error and instead of instantating the new vi from the template it would just call the template VI and run it. This is not an issue in a built application but is tedious during development since you cannot test with the actual template in your hierarchy.

Yet another minor change to live with I guess.

blog-121-1127290054.png?width=400

blog-121-1127290118.png?width=400

blog-121-1127290149.png?width=400

Link to comment

Well, I got it working. Apparently NI changed the default action for the options input on the "open VI reference" function.

Previously you could leave the Options input unwired and LV would instantiate a VI from a template if the template was NOT already In memory. If it was in memory then it would just open a reference to the actual template.

In LV7 you have to specify the options bit set in one mode or another. Otherwise it will error out if you try to open a reference to a template vi and it is always in memory. You have to specify:

0x02 | Open templates for editing.  

Another little thing to watch for when migrating to LV7. :wink:

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
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.