Chicago LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Property Node Presentation for Chicago LabVIEW User Group

Property nodes presented by Matt Fitzsimons and Al Rudnick at DeVry in Addison on February 27, 2015.  Feedback is welcome and thank you to everyone that attended on a bitterly cold and snowy day.

Matt

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 1 of 8
(8,120 Views)

Matt,

Thanks for the presentation and sharing!

Rob

Message 2 of 8
(6,338 Views)

Matt,

Thanks for the presentation and for sharing your knowledge.

Carlos D. Garcia

P: 847-299-1188 X-346

F: 847-299-3061

Message 3 of 8
(6,338 Views)

Matt

I knew there's performance penalty using property node or a reference, but did not realize that the penalty is so heavy. Have to be careful in future. Thank you.

What's your experience in passing data between VIs using LV2 style globals (i.e, shift registers)? Can you comment on usage of normal global variables and LV2 style globals?

Thanks.

Ian Ren

0 Kudos
Message 4 of 8
(6,338 Views)

Thanks to all that presented.  Always pick up something new.  Lets keep it goin.  Dave

0 Kudos
Message 5 of 8
(6,338 Views)

Sorry for the delayed response.  Typed up this answer a few weeks back but forgot to post.

I think that global variables get a bad reputation in LabVIEW because we have seen them used wrong by developers over the years.  They do not enforce the strict data flow you would get by using only using wires and terminals.  Global variables are prone to race conditions that are difficult to debug and isolate because they work correctly then fail at some point due to a timing issue.  This is compounded by the global variable access by multiple Vis.  The same can be true for using local variables but it is isolated to a single VI.  If used with care there is no issue using a global or local variable.

You should be aware that of the slight performance hit from using local or global variables.  LabVIEW will create a copy on each read of local or global variables.  In a loop or operating on large data sets these can become problematic.  A simple fix for this is to read your local or global variable outside of the loop and pass in the data.

From LabVIEW Help:

In LabVIEW, you read data from or write data to a front panel object using its block diagram terminal. However, a front panel object has only one block diagram terminal, and your application might need to access the data in that terminal from more than one location.  Local and global variables pass information between locations in the application that you cannot connect with a wire. Use local variables to access front panel objects from more than one location in a single VI. Use global variables to access and pass data among several VIs.

Sources

http://zone.ni.com/reference/en-XX/help/371361L-01/lvconcepts/local_and_global_variables/

http://digital.ni.com/public.nsf/allkb/37002ACC84B961CA86256D9C00760EE2

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 6 of 8
(6,338 Views)

Performance times in milliseconds for 50,000 updates.

globalPerformance.PNG

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 7 of 8
(6,338 Views)

Thanks for the information.

Carlos D. Garcia

P: 847-299-1188 X-346

F: 847-299-3061

0 Kudos
Message 8 of 8
(6,338 Views)