LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advantage of CVTs

Solved!
Go to solution

Hey everybody,

 

I want to use CVTs instead of a variable to transfer data from some parallel loops to another. The data can be lossy since I only need the most current value. I have read this thread whitepapter: CVTs

I see that they behave similar to global variables, but what is the advantage or difference between them. Do they have higher performance or use less memory?

 

 

kind regards

Slev1n

Message 1 of 4
(3,693 Views)
Solution
Accepted by topic author Slev1n

The main idea behind CVT is that it's dynamic - whereas you normally need to define your global variables up front (unless it's just a variant), you can dynamically add/update data to the CVT. This makes it very useful when you have a very modular/flexible application (e.g. loading in different hardware, custom variables etc.).

 

For example, you could have a DAQ module which is configured by the user to configure any number of DAQ tasks/channels - the data from these goes into the CVT. You could then write a common user interface which uses the API to list the current signals from the CVT and select which ones you want to log/display. If you change the DAQ task (or add another...e.g. to read from an instrument), you wouldn't need to modify your logging / display components.

 

I've written my own version of the CVT library - it's essentially the same principle but it has some extra features (e.g. storing additional attributes about a signal, generating a user event on data update etc.)/performance considerations (storing the variant in a DVR).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 4
(3,683 Views)

Hi Slev1n,

 

The answer is Here.

 

Regards.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 3 of 4
(3,675 Views)

I should mention that the Global Variable will be a little faster and use less memory than the CVT.  But, as already said, they are set in stone.  Globals must be defined and then specifically called where they are used.

 

CVT is dynamic.  You can create variable names on the fly and get/set the value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,633 Views)