LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to programmatically write data in a control

Hi, I have a situation in which I have not found a definitive solution.

I have a dashboard with a Profile Table with 4 fields (Name, Privileges, Age, Comments) I have all data for the different persons in one CSV file.

Now in the dashboard I must be able to edit (overwritte) the info of each person so my question would be what is the best way with programming to write data in a control (local variable, property node, etc.) and why?

I appreciate any help or opinion, thanks.

0 Kudos
Message 1 of 4
(2,517 Views)

Locals perform better than property nodes. But use locals sparingly. They are easily abused.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 2 of 4
(2,512 Views)

Hello AYanez,

 

This is a very common question, and there are various discussions in different places - the pros and cons of these approaches are covered extensively in the LabVIEW Core training, in particular.  You should have access to the online version of this training if you have a current support contract.  The short answer is that there isn't a "best" way that works for all situations- this is why the options exist. You also didn't specify implicit or explicit property nodes, which complicates things a bit.

 

Some things to consider, though:

 

Local Variables:

-Faster

-Single VI

-Break dataflow

-Less Control over cluster elements

-Cannot trigger events

 

Implicit Property nodes

-Slower

-Single VI

-Break dataflow

-Full control over individual cluster element updates

-Access to other properties of control or indicator

-Can trigger events using Value(Signaling)

-Allow error handling

 

Explicit Property nodes

-Slower

-Usable from anywhere (read- subVIs)

-Utilize/enforce dataflow due to reference wire dependency.

-Full control over individual cluster element updates

-Access to other properties of control or indicator

-Can trigger events using Value(Signaling)

-Allow error handling.

 

That's not a comprehensive list, but should get you started.  I'd suggest doing a bit of research and if possible going through some of the basic LabVIEW training material.

 

Regards,

Tom L.
0 Kudos
Message 3 of 4
(2,507 Views)

0utlaw is spot on,

 

I tend to use Implicit or explicit property nodes depending how I am using the data.

 

The non-signaling value method is importnt if you are using event structures and don't want to generate an event when you change a value in background.

 

For simpler apps, i cheat and use local variables, You can get into a whole lot of strife if you are running multiple write from parallel loops. 

iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 4 of 4
(2,473 Views)