asbo Posted December 15, 2009 Report Share Posted December 15, 2009 Per the handy INI key in http://zone.ni.com/devzone/cda/pub/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. Anybody know under what conditions this gets disabled? Quote Link to comment
hooovahh Posted December 15, 2009 Report Share Posted December 15, 2009 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. Anybody know under what conditions this gets disabled? 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. Quote Link to comment
Ton Plomp Posted December 15, 2009 Report Share Posted December 15, 2009 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 Quote Link to comment
asbo Posted December 15, 2009 Author Report Share Posted December 15, 2009 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. Quote Link to comment
Yair Posted December 16, 2009 Report Share Posted December 16, 2009 If it's reentrant? If it has unwired shift registers? If it has feedback nodes? If it has local variables? Quote Link to comment
asbo Posted December 16, 2009 Author Report Share Posted December 16, 2009 Non-reentranct. No USRs. No feedback nodes. No local variables. There is a static property node, but it's in the one that works (and it gets deleted upon inlining). No required terminals. Quote Link to comment
Aristos Queue Posted December 17, 2009 Report Share Posted December 17, 2009 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.) Quote Link to comment
asbo Posted December 18, 2009 Author Report Share Posted December 18, 2009 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. Quote Link to comment
Aristos Queue Posted December 23, 2009 Report Share Posted December 23, 2009 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. Quote Link to comment
DFGray Posted January 4, 2010 Report Share Posted January 4, 2010 I will agree with Aristos Queue on this one. FP terms inside a structure will prevent inlining. For a list of other things which will cause inlining to fail, check out my post on the NI forums for doing it programatically. It includes a VI which checks for a lot of them. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.