LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

guidelines for order of property node elements

 

Hello all,

I've recently fought a battle I've fought before, buy maybe I should be able to avoid!?

 

Specifically I was trying to set some custom text labels on a slider and was having trouble with them not showing up on the first run.  Having seen the property node element order make a difference in the past, I tried changing them around and now it works as expected.

 

So the general question is, should the order of the elements in a property node follow the order they show up in the menu?  Or is placing them in that order not a gaurantee of first coded success.

 

for reference on the left was my original order (non-functional on first run) and the working code on the right (set the labels first)  control was the Modern - Horizonal Pointer Slide

Untitled 2 Block Diagram on TimeTracker.lvproj_My Computer _-2015-11-11 08_47_46.png

I'm using LV2012 on Win 7 Enterprise SP1

 

0 Kudos
Message 1 of 3
(3,446 Views)

The nodes execute in the order they are listed.  So item 1 will execute before item 2.

 

For some things, it may not matter what order you have them listed.  For others, it is very important such as when you need to set the active plot before you are able to set the properties of a plot.

 

There might be a case where the order matters, but it might be difficult to know what the best order should be.  For example, setting a maximum value before a minimum might be best is some situations, but the minimum before the maximum is better in others.

 

It is hard to tell in your example if the order would matter.  I'd need to see your VI and play with it to determine that.

Message 2 of 3
(3,431 Views)

Oh, the other thing to possibly be aware of, based on the fact that they run from top to bottom is that if one of items has an error (e.g. trying to set a property on something that doesn't exist), will cause the subsequent property nodes to fail. The option 'ignore errors inside node' will cause the property node to attempt to execute the remaining property updates even if there is an error - it will return the first one that had an error.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 3 of 3
(3,417 Views)