LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run VI in background and save system resources

Solved!
Go to solution

Hi,

 

I want to develop an application (pc, windows 7) that checks the DSR line of a serial port every 100 ms. Basically, I know how to create a VI that works with serial ports using VISA drivers. My application or VI should be invisible for the user and increment a counter variable everytime DSR level is high.

 

What is the best way to create a VI that runs in background (invisible for the user, even not shown minimized in task bar). Since the application needs to run most of the time, when the pc is running, I don't want to use too much of the computer's resources (cpu, main memory on an average office pc). The user should be able to work with other applications, like ms office, when running the VI in background.

 

Is Labview appropriate to create a background VI that checks the serial port periodically and consumes minimal system resources or are languages like c++ much better suited for saving system resources? What is the best way to create an invisible VI that runs in background?

 

Thank you for your help!

 

Tom

0 Kudos
Message 1 of 4
(3,021 Views)
Solution
Accepted by topic author t7

On any modern hardware, the difference in resource utilization between a LabVIEW application and one written in C++ for a simple task like this will be minimal. Either way you're using a tiny fraction of the available CPU time if the application is written properly.

 

To run a VI invisibly in the background, see Running a LabVIEW Application as a User-Defined Windows Service.

Message 2 of 4
(3,002 Views)

I agree with Nathan D that LabVIEW will have minimal impact on your system (C++ may be "better", but we're talking about the difference between 0.001% of resources and 0.0001%, maybe, either too small to matter).  What is more important is what system will allow you to build the application that you want, test it, and let you deploy it with confidence that it will "do what you want".

 

I'm puzzled about an application that runs in the background and contains an internal count of an event.  Makes me think about WOMs, Write-Only Memory.  What do you plan to do with this data no-one can see?

 

If I look at my PC, I can see numerous programs running that do not show up on the Task Bar, and that I don't think are "services".  Some of these might run as StartUp routines, or be started automatically when Windows starts.  I haven't really explored the "invisibility" issue -- how important is this?  [Hmm -- I wonder if you could create a custom Icon that was a single pixel, to make it basically "invisible" that way?]

 

BS

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

Thank you for your replies. I will start developing my application using Labview. The increment variable will be stored in a text or excel file, depending whats going to work better for my problem.

0 Kudos
Message 4 of 4
(2,951 Views)