LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mark as modifier (in place of structure)

Solved!
Go to solution

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/

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 5
(5,008 Views)
Solution
Accepted by jyang72211

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

Message 2 of 5
(5,003 Views)

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.

=====================
LabVIEW 2012


Message 3 of 5
(4,999 Views)

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.

0 Kudos
Message 4 of 5
(4,888 Views)
Solution
Accepted by drjdpowell

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" :

 

OK example

 

 

 

 

 

 

 

 

 

 

Example using In Place structure with "Mark as Modified :

Better

Message 5 of 5
(4,838 Views)