LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Default save option on SubVIs and Subroutines

Hello,

 

Is there any way to save the assigned Analog and Digital I/Os as default on SubVIs or Subroutines rather than saving each time we run VIs. I have screenshot where in ai0 and ai1 physical channels are not save and each time I open it has to be assigned. 

 

Your help will be highly appreciated. Many thanks for your support and assistance. 

 

Looking forward for any leads. 

Screenshot 2023-09-22 150145.png

 

Best wishes, 

0 Kudos
Message 1 of 10
(1,016 Views)

Right-click on the control >> Data Operations >> Make Current Value Default

ZYOng_0-1697051533465.png

 

 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 10
(1,006 Views)

Thank you so much for this valuable information.

0 Kudos
Message 3 of 10
(1,002 Views)

Hello,

 

Can we even save by default for the measurement time and number of measurements? Here is screenshot for VI. Else we need to fill in each time we run VI?

 

 Thanks,

Screenshot 2023-09-29 134902.png

0 Kudos
Message 4 of 10
(994 Views)

It is applicable to all controls and indicators.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 5 of 10
(982 Views)

Oh thank you so much.

0 Kudos
Message 6 of 10
(978 Views)

Hi M405,

 


@M405 wrote:

Can we even save by default for the measurement time and number of measurements?


Using default values for all the controls is a good idea.

A better idea would be to read default values from a file and save them when the VI/executable finishes…

(That's what INI files are good for!)

 

On your VI screenshot:

  • You should learn about using proper datatypes:using DBL for integer loop counts seems unreasonable. (Learn about coercion dots!)
  • You should also learn to use better control labels - better than "OK button" and "OK button 2"! You should design frontpanels to improve the UX…
  • You should learn to avoid loops polling the UI as fast as possible! No need to burn a CPU core just to poll a button…
  • You should learn about simple state machines! Sequences are mostly NEVER a good idea in LabVIEW programming… (Each frame belongs into its own state. When those two subVI calls are the same, then you need just two states here!)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(887 Views)

Hello,

 

Many thanks for your message. Could you please help me with this one, I am new to LabVIEW it might take me some time to learn things. I am attaching the VI file for your reference.

 

Regards,

Madhusudan

0 Kudos
Message 8 of 10
(860 Views)

Hi M405,

 

could you please provide your VI downconverted for LV2019? (File->Save for previous)

(This also applies to your other thread.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(849 Views)

Hello GerdW,

 

Please find the attached 19 version as I am sending for your reference. Please do the needful and revert with updated VI file.

 

Many thanks for your support and help. 

 

Regards,

0 Kudos
Message 10 of 10
(825 Views)