Jump to content

When is Inline subVI disabled?


asbo

Recommended Posts

Per the handy INI key in http://zone.ni.com/d...b/p/id/347#toc2 you can enable code inlining in the development environment. However, I went to use it and the menu option is disabled. :angry:

Anybody know under what conditions this gets disabled?

post-13461-126090779226_thumb.png

When it's a primitive...is it password protected? Is it a polymorphic? Is it a express VI? Never used the feature my self just throwing ideas out there.

Link to comment

When it's a primitive...is it password protected? Is it a polymorphic? Is it a express VI? Never used the feature my self just throwing ideas out there.

  • If there is no block diagram present
  • If the VI is a 'system VI'
  • If the VI is a member of a class?

Better tell us what VI (or test if it's one specific VI) is the 'problem'

Ton

Link to comment

Nope, it's really quite a straight forward situation. It's my own VI, not polymorphic, it has a block diagram, unprotected, not in a class. VIs similar to it in code structure and prototype will inline OK, but I have found others which also will not inline for any obvious reason. Going through VI properties didn't give me epiphanies, either.

Link to comment

Can you make it reentrant? If you can, I believe this will allow the inlining.

A non-reentrant VI will block inlining if it contains any asynchronous nodes (like a Dequeue Element). Why? Because non-reentrant subVIs are mutex locks (ie two callers to the same subVI cannot execute simultaneously), inlining a non-reentrant subVI that includes asynchronous nodes would create timing changes to the behavior of the nodes, and so inlining is barred. I *think* that if the subVI is made reentrant then we ignore that check because inlining the reentrant subVI doesn't create any timing changes since two callers already could've executed in parallel (that being the point of reentrancy).

(For the record, I have only observed others using this token, never used it myself, so I'm definitely not speaking with any certainty in this.)

Link to comment

Can you make it reentrant? If you can, I believe this will allow the inlining.

A non-reentrant VI will block inlining if it contains any asynchronous nodes (like a Dequeue Element). Why? Because non-reentrant subVIs are mutex locks (ie two callers to the same subVI cannot execute simultaneously), inlining a non-reentrant subVI that includes asynchronous nodes would create timing changes to the behavior of the nodes, and so inlining is barred. I *think* that if the subVI is made reentrant then we ignore that check because inlining the reentrant subVI doesn't create any timing changes since two callers already could've executed in parallel (that being the point of reentrancy).

(For the record, I have only observed others using this token, never used it myself, so I'm definitely not speaking with any certainty in this.)

I was able to make the VI reetrant, but that made no difference either. Of course, I manually inlined the VI long ago, now this is simply curiosity. I was hoping that perhaps someone would have a laundry list already, but it seems this is a relatively unused token.

Link to comment

I asked around. Here's the best answer I got:

Inlining with the token in LV 2009 can't handle front-panel terminals inside structures, locals variables, property nodes, invoke nodes, or control references.

I'll bet it is the FPTerms inside a structure node that is your problem as that would be the least obvious of items on this list.

Link to comment
  • 2 weeks later...

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.