LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save and load controls or indicators

Hi Jay,

 

I still don't get how you create a clone of this knob (at runtime).

 

All I get is: save your "properties" aka settings in a file/database and load/apply those settings when needed!

 

That's what I do in my measurement software everyday! Applying settings like channel names, scalings, correction factors, additional channel information, ... is loaded from file and applied to the UI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 23
(995 Views)

Hi,

 

          To be more detailed, i have uploaded a image. I'll keep it very Simple, I have created that particular configuration for the Motor device, now after few days, i want to load the same configuration with all the indicators in the same place and also colours and names of those indicators. So, how to do it?

0 Kudos
Message 12 of 23
(986 Views)

Hi Jay,

 

collect all properties of those controls you need and store them in a file. Read this configuration file when needed and apply these properties to all your controls…

 

There are example VIs coming with LabVIEW showing how to use config files…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 23
(975 Views)

Hi,

             

 

             Inorder to apply configurations for the particular control or indicator, Front panel has to have a default control or indicator. but in my problem, there will be blank parent vi and if i want to load a particular configuaration, then it ahs to automatically load all the indicators as shown in previous image.

0 Kudos
Message 14 of 23
(971 Views)

Hi Jay,

 

you cannot create controls at runtime, they have to be present before. (Scripting does not work at runtime.)

 

How can there be a blank VI when you already have created that UI you have shown in your previous post?

 

Other solution (as already suggested in your older thread): save that UI as VI and load this VI in a subpanel container. Each "configuration" will be a VI loaded into this subpanel container!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 23
(961 Views)

HI,

 

              In the image as u see the indicators, and behind there's window called parent which is also a vi, holding all these indicators, the blank vi i meant is the parent vi at the start which will be empty. So, how to load the configuaration to the parent vi which is shown in the image.

0 Kudos
Message 16 of 23
(960 Views)

Hi Jay,

 

images don't provide all the important details…

 

Are the indicators in your image part of that "parent VI" (do they have their terminals on the parent VIs BD?) or are they part of subVIs shown in subpanel containers? How did you configure all those indicators?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 23
(941 Views)

Hi, 

          

               I looked into an MDF application in labview example and programmed according to the concept. In parent BD i have only reference of the sub vi's which i load everytime.

0 Kudos
Message 18 of 23
(932 Views)

Hi Jay,

 

what's the problem with saving/loading settings for each subVI - as suggested before?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 23
(927 Views)

Hi,

 

         For example, if i load a config file,  the properties like colour, name and poisiton of the sub vi's are not loaded. Instead i get a default subvi wrt to particular indicatorsalways placed at a default position. This is the problem.

0 Kudos
Message 20 of 23
(914 Views)