Sparkette Posted January 19, 2013 Report Share Posted January 19, 2013 I've been playing around with Xnodes a lot, and I was wondering if it was possible to create an Xnode that can actually contain code inside of it. You know, like a loop or case structure. I know the timed structures' side terminal boxes are Xnodes, but the structure itself seems to be a primitive. (Don't know why they made them Xnodes if the whole thing isn't an Xnode.) Is this at all possible? (I hope I'm posting this in the right section, as Xnodes and VI Scripting are very closely associated.) Quote Link to comment
GregSands Posted January 20, 2013 Report Share Posted January 20, 2013 Is this close enough? https://decibel.ni.com/content/docs/DOC-13859 Quote Link to comment
Sparkette Posted January 21, 2013 Author Report Share Posted January 21, 2013 Is this close enough? https://decibel.ni.com/content/docs/DOC-13859 I think you might be misunderstanding me. You know the various structure node, like the while loop and case structure? They're basically nodes that can contain nodes. What I'm wondering is if it's possible to make new types of structures like those using Xnodes. Quote Link to comment
lordexod Posted January 21, 2013 Report Share Posted January 21, 2013 LabVIEW Control Design and Simulation Module: http://sine.ni.com/nips/cds/view/p/lang/pl/nid/209850 Quote Link to comment
Yair Posted January 21, 2013 Report Share Posted January 21, 2013 My understanding is the CDSM's diagrams are also first class citizens in LV. At the very least, they have their own special VI Server classes, both for the structure and for the diagram. My guess would be that this is not possible using XNodes, but I can't say I looked into them deeply enough to provide a sound base for that guess. It's mainly a feel for how the system works. Flarn, if you look through the structure classes and find an External Node class, don't get excited. That's the precursor to XNodes, and they were basically implemented as a flat sequence structure which held the actual code and was then minimized and hidden behind an icon. I don't think they will do what you want. Quote Link to comment
lordexod Posted January 21, 2013 Report Share Posted January 21, 2013 This is a "Very Big Multi XNode (SimX.xnode)" in LabVIEW Control Design and Simulation Module. Quote Link to comment
Sparkette Posted January 22, 2013 Author Report Share Posted January 22, 2013 My understanding is the CDSM's diagrams are also first class citizens in LV. At the very least, they have their own special VI Server classes, both for the structure and for the diagram. My guess would be that this is not possible using XNodes, but I can't say I looked into them deeply enough to provide a sound base for that guess. It's mainly a feel for how the system works. Flarn, if you look through the structure classes and find an External Node class, don't get excited. That's the precursor to XNodes, and they were basically implemented as a flat sequence structure which held the actual code and was then minimized and hidden behind an icon. I don't think they will do what you want. I know what external nodes are, but why would that get me excited? And I'll take a look at SimX.xnode when I get a chance; thanks. Quote Link to comment
esearl Posted January 23, 2013 Report Share Posted January 23, 2013 I don't think you could make an xnode that behaved like a structure without a lot of trouble. One nutty idea would be an xnode that when dropped creates a sequence frame in its containing diagram and use that for your basic structure functionality. Then if you can draw the xnode on top of the frame entirely without it looking terrible, I suppose you could intercept mouse interactions with the frame. Or maybe there is a way to get notification of when the frame is resized, moved, deleted etc and adapt appropriately. Quote Link to comment
Aristos Queue Posted January 23, 2013 Report Share Posted January 23, 2013 To the best of my knowledge, the answer is "no". We've had the XStructure on the drawing board for almost a decade but no one has gotten around to building it. There's minimal impetus to do so... the number of control structures that we've built into LabVIEW over the years has been fairly small -- they still fit in one palette. Very very few ideas are put forth that call for a new flow-control structure, so no one has felt compelled to build the G mechanism for defining one. I suppose in theory you could build up an XNode that draws a very complex inner image and maintain all your own editor state operations for the fake diagram inside your node, but the work involved would be excessive in the extreme. If you look at the Sim.xnode, I think you'll find a bunch of stuff that isn't actually implemented in G. I know, for example, that their whole interior is back in the C++ code. I don't know how extractable that layer is for a different XNode. 1 Quote Link to comment
lordexod Posted January 24, 2013 Report Share Posted January 24, 2013 The most interesting of which is the "Subsystem VI" in CDSM. Subsystem VI.vi (Edit on the hex editor ) 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.