LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limitation on controls and indicators

Hello,

I am developing a test suite in LabVIEW and trying to find out is there any limitation when we define controls/indicators in the front panel which could slow down execution test time significantly?

 

/Thanks

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

Controls and indicators should be used for user interface items only. Do not use them as variables. LabVIEW is a data flow language and in essence the wire is the variable. Depending on what type of performance you are trying to achieve updates to the UI can impact your performance. If collecting data at a high rate you can only update the display a few times a second rather than for every data point. You can use a wire to hold the data. Update the wire value at your collection rate but only update the indicator occasionally. Generally it is a good idea to separate your processing code from your user interface. You can pass updates to the user interface using queues, notifiers or user events. Separating the two helps to make you code more modular, reusable and easier to maintain.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 4
(2,163 Views)

If I am using more than 20 variables, what is the best method?  In C or similar language, we use like local 1, local 2 and etc.  How about in LabVIEW?

 

Thanks,

0 Kudos
Message 3 of 4
(2,159 Views)

@K.Vins wrote:

If I am using more than 20 variables, what is the best method?  In C or similar language, we use like local 1, local 2 and etc.  How about in LabVIEW?

 

Thanks,


As I stated, LabVIEW does not have a concept of variables like traditional text based languages. The wires are the data. If you have lots of related items you can create a cluster (use a typedef) to bundle the elements reducing the number of wires that run through your code but you would still be working with the wire itself. Unlike test languages you do not need to create local variables to hold temporary data. The wire itself will carry the value to the next operation. The best thing you can do for yourself is to not make LabVIEW look or act like a text based language. Spend a little time getting familiar with how data flow works and you will find it is quite powerful.

 

You could post your code so that we could give you better advice. Hard to give specific advice without seeing any code.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 4 of 4
(2,154 Views)