06-12-2012 05:11 PM
Can someone explain what is mark as modifier? I looked at the link below, but I still don't understand it. What is dynamic dispatch terminals anyway?
http://zone.ni.com/reference/en-XX/help/371361H-01/glang/in_place_element_structure/
Solved! Go to Solution.
06-12-2012 06:19 PM
Hello jyang
If you're not familiar with dynamic dispatch terminals and LVOOP, you probably don't need to bother about Mark As Modifier option. This option is doing exactly what documentation says: informing LabVIEW, that my base class in inheritance hierarchy might not modify the data, but some sub-classes may. And so LabVIEW can optimize the performance of In Place Structure. I've attached simple example (hopefully simple enough to understand and still show the idea of Mark As Modifier).
06-12-2012 07:09 PM
Also check out the first post in this thread by Stephen Mercer (Aristos Queue)
http://lavag.org/topic/11218-excellent-intro-presentation-on-object-oriented-programming-in-labview/
I think it goes into dynamic dispatch.
03-11-2013 11:35 AM - edited 03-11-2013 11:37 AM
I don't really understand why this is any different than if you used a case structure to choose which subvi ran. Some of the subvi's could modify the "Numeric Control" data. In this scenario, the compiler has to make a memory desicion at run-time, right? Why does using classes matter here?
Based on the "Mark as Modified" description in the Help file :
Place the In Place Element structure inside of the dynamic dispatch VI within the parent class and add In Place Element node pairs to the In Place Element structure. With these node pairs, you are able to tell LabVIEW which inputs should connect to which outputs, which inputs ought to be treated as constant, and which should be treated as modified. LabVIEW is then able to optimize the caller VI.
I think the "Mark as Modified" would be needed in a different scenario :
If you passed the whole cluster into DoSomething.vi, and we made overriding the SuperClass's DoSomething.vi required. Also, we know that the SubClasses will all adjust the numeric in the cluster. In this case, I would think it would make sense to add an In Place structure in the SuperClass's DoSomething to be explicit that we will always need to modify this value. Does that make sense? An example from NI would be very helpful.
03-15-2013 10:24 AM
After further digging, (see this link : http://forums.ni.com/t5/LabVIEW/Threading-and-Re-Use-of-buffers-Using-Call-By-Reference-node/m-p/150...) and talking with NI , I think the appropriate example is the one attached. Here are screenshots of main.vi :
Example of not using the in place structure with "Mark as Modified" :
Example using In Place structure with "Mark as Modified :