LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi snippet changes local variable to reference+value property node


Ben wrote:

David,

 

I have not found any case where a snippet that used property nodes worked!

 

Take a look at this thread where I resorted to posting an image plus code since it was impossible to produce a snippet the would work right!

 

Ben


Having spent some time to think about how to implement a VI snippet functionality in pre 2009 I can see the difficulties about this. First, they certainly use the same code as used by Create SubVI from selection, to turn a selection into a temporary subVI to be turned into a VI snippet. This does the (turn locals into references with value properties) for obvious reasons. For the VI snippet case it shouldn't do that but rather include the connected terminal in the intermediate selection.

 

However expecting the front panel Z order to be exactly the same as in the original VI is likely to be impossible in many cases since the creation of such a VI snippet subVI will involve creation of additional controls for any wires that origin from a non-control source or go to a non-indicator sink not included in the selection. This will always involve adding extra elements to the selection list, and that will mess up the Z order in one way or the other.

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 11 of 19
(1,654 Views)

rolfk wrote:

Ben wrote:

David,

 

I have not found any case where a snippet that used property nodes worked!

 

Take a look at this thread where I resorted to posting an image plus code since it was impossible to produce a snippet the would work right!

 

Ben


Having spent some time to think about how to implement a VI snippet functionality in pre 2009 I can see the difficulties about this. First, they certainly use the same code as used by Create SubVI from selection, to turn a selection into a temporary subVI to be turned into a VI snippet. This does the (turn locals into references with value properties) for obvious reasons. For the VI snippet case it shouldn't do that but rather include the connected terminal in the intermediate selection.

 

...

Rolf Kalbermatter


How can I argue with one of my mentors?

 

The Snippets really have the potential of changing the look and effectiveness of the forums... if they worked right. In that thread I linked previously my snippet (with the improper property linakge) may have confused the original poster more than it helped.

 

In its current state it looks good but is border line useless.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 19
(1,641 Views)

Jeff Bohrer wrote:

Matt-

 

I'm thinking that this is actually a benefit.  Certainly the property node executes more effeciently.  


Does no one else take exception to this?  If not, why not?

--
Tim Elsey
Certified LabVIEW Architect
Message 13 of 19
(1,628 Views)

elset191 wrote:

Jeff Bohrer wrote:

Matt-

 

I'm thinking that this is actually a benefit.  Certainly the property node executes more effeciently.  


Does no one else take exception to this?  If not, why not?


 

Add me to the exception list along with Tim.

 

Locals are more efficient and do not require a switch to the UI thread.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 14 of 19
(1,621 Views)

elset191 wrote:

Jeff Bohrer wrote:

Matt-

 

I'm thinking that this is actually a benefit.  Certainly the property node executes more effeciently.  


Does no one else take exception to this?  If not, why not?


Knight Ben did in reply #3.  "In general its not good because locals have better performance and does not force a UI thread switch."

0 Kudos
Message 15 of 19
(1,620 Views)

Ravens Fan wrote:

Knight Ben did in reply #3.  "In general its not good because locals have better performance and does not force a UI thread switch."


I even double checked to see if anyone posted about it, so as to not look foolish.  So much for that...

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 16 of 19
(1,615 Views)

elset191 wrote:

Ravens Fan wrote:

Knight Ben did in reply #3.  "In general its not good because locals have better performance and does not force a UI thread switch."


I even double checked to see if anyone posted about it, so as to not look foolish.  So much for that...


 

No problems.  It was in there subtly.  I remember reading the thread before and I thought someone had corrected that comment.  After seeing your message, when I went looking for it again, it took a few minutes and flipping back and forth between the pages before I found the comment again.
0 Kudos
Message 17 of 19
(1,605 Views)

Ben wrote:

David,

 

I have not found any case where a snippet that used property nodes worked!

 

Take a look at this thread where I resorted to posting an image plus code since it was impossible to produce a snippet the would work right!

 

Ben


Hi Ben
Sorry for going missing on you, I'm on vacation at the moment and don't have access to LV and only intermittent computer access. I'll check the strange behavior when I get back or maybe one of my helpful colleagues will see this and have a look in the meantime?
Sorry for the delay and belated congrats on making Knight!
Best Regards
David 

 

Message 18 of 19
(1,563 Views)

Hi All

 

I took a look at the problem in Ben's thread and I get the same thing. Also created some very basic examples of my own and they also had the same problem. So this very much looks like a bug, sorry. You can get around it pretty easy by recreating the property node or creating a new reference and replacing the generated one, but that's still a big hassle and it's not right. I created CAR 187861 for this problem. Will let you know how it goes.

 

Best Regards

 

David

0 Kudos
Message 19 of 19
(1,425 Views)