01-28-2013 02:16 PM
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
01-28-2013 02:29 PM
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.
01-28-2013 02:33 PM
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,
01-28-2013 02:38 PM - edited 01-28-2013 02:39 PM
@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.