Jump to content

Fastest run-time start-up with minimal usage of OS, CPU, memory


Recommended Posts

Hi folks - I have to install a Labview program on a product's embedded Windows 10 computer that at this time has zero NI software on it. The program needs to run immediately after computer boot-up, do its thing in under a minute, and then quit. I really need this program to start running as quickly as possible, and then after quitting leave nothing NI-related running. Do any of you have experience with this kind of situation? Are there any INI file settings or other configurations that will make LabVIEW Run-Time and NI-VISA run with minimal overhead and minimal sub-processes? For example, I don't want any NI processes to look for network connectivity at all nor attempt to "phone home". Also, after quitting I could halt specific processes and services that NI has left running.

Thanks very much,  -Joe

 

Link to comment

Hi Joe,

First of all, I would use Task Scheduler to configure your executable to run once at startup, with "highest priority". You can also experiment with the setting "run whether user is logged on or not" and with running it in the account "NT AUTHORITY\SYSTEM": I think that this will allow your task to run before Windows logs you in as a user. You will also want to get rid of most unnecessary tasks in Task Scheduler, disable unnecessary services (including NI services), and minimize the number of logs that Windows creates. Also you'll want to check the configuration of your BIOS/UEFI: minimize startup delays, power-on self-tests, disable unused hardware (e.g. unused COM ports).

You mentioned LV runtime engine and VISA. I don't know what hardware you control through VISA, but if it's an RS232 instrument and if you can use a USB/COM adapter, and if your adapter could be built using an FTDI chip, then you don't need VISA: you can use in FTDI driver. I can share a LV wrapper for this driver. No guarantee that this approach is faster than VISA, but it could be worth trying.

One more idea: if your application is really light, you may want to consider an older version of LV, maybe as old as LV6 or LV7.11: they can work without runtime engines installed, all you'll need is a few DLLs. Fewer things to load from the drive and fewer services to worry about after your application exits.

Finally, you used the word "embedded". I don't know if you just mean a physically embedded PC running regular commercial Windows or a truly customized version of Windows, like Windows 10 Enterprise LTSC. If it's the latter, there are lots of things that you can customize in it, including throwing out most things that you don't need, enabling keyboard filter (e.g. to block Ctrl-Alt-Del), universal write filter (UWF) to block writes to the hard drive (this can also speed up the process, since your disk writes will actually go to a dedicated part of RAM). To learn more about using Windows 10 LTSC for building a "kiosk"-type application, check out https://solidusintegration.com/sikiosk.html.

Best,

Sergey

Edited by Sergey L
  • Thanks 1
Link to comment

Hi Sergey - Thank you very much for the really helpful reply!  That is a lot of good advice.  I have some work to do.  We do disable much Windows functionality using their "policy" editor.  I didn't think of the NI Services that are enabled to start up with the system.  I just looked at those:

image.png.c9bcf776490339a9462c4f59646f299a.png

I'll experiment with how much of this I can disable and still have LabVIEW Run-Time execute properly!

Good point about NI-VISA.  Upon review, yes I am only using it for RS232 communication for this particular project.  Thanks for mentioning the FTDI driver.  You made me remember also the .NET SerialPort class that already resides in Windows.  I just now wired up a few functions to remind myself how that class works:

image.png.585ebe659bc285bb2e031997d2a9c83f.png

 

Thanks again,   -Joe

 

Link to comment

Some ideas:

Create an installer including the runtime engine and select only the components you really need.

Instead of the .NET for serial communication, you can use the lvserial driver. Basically it is a DLL calling the windows API with a minimal footprint. The labview API is very similar to what you know from VISA.

  • Like 1
  • Thanks 1
Link to comment

Hello Martin, thanks very much!  Back in 2008 I ceased the practice of including LabVIEW Run-Time (and other drivers) in my app installer, and have been installing those separately.  I forgot about the run-time components selection, thanks for pointing that out, I'll try that.  For the app today, I don't need any of the checked subcomponents below.

image.png.bb0ffd32c3f0d76d9592e4ecfd1d3501.png

Thanks for the link to your lvserial driver package.  Brings back pre-VISA memories!

-Joe

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.