LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Utilization time of PXI

Hello

 

I have to get the time at which my PXI has shutdown and what time it started, and same thing i have log in to excel sheet.I have to genarate report in labview, how many hours we have utilized PXI in a week or month.Any Help?

 

Thank You

Pradeep

Expand.Evolve.Influence
0 Kudos
Message 1 of 7
(2,988 Views)

Pradeep,

 

just brainstorming:

Create an application you place in autostart (running after/during boot) which runs in background simply logging times every minute or 5 minutes.

An additional analysis tool reads the file(s) every week/month (and deletes them as necessary) and uses the information to calculate the up-time.

 

This will, of course, only display a rough estimation, but it is simple to implement.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(2,981 Views)

Following up on Norbert's suggestion, this Snippet is code I extracted from one of the NI-supplied Project Templates, designed to write error messages into a PXI error log.  To prevent the log file from taking over all of the disk space, it has a maximum size specified (here in a Global, but you could use a local constant) -- if the file gets too big, the first half is essentially "thrown away".

 

BS

Write Error Log.png

0 Kudos
Message 3 of 7
(2,954 Views)

Hi Norbert

 

Thank You for your suggestion

I dont want to run that program in baground all the time....while starting the PXI it should only update start time in file or log and while shut down it should update shutdown time in same file or log....I tried your suggestion and I am runnig a .exe in a start up and writing the start time in file but how to get the shutdown time? 

Expand.Evolve.Influence
0 Kudos
Message 4 of 7
(2,912 Views)

Thank You Bob

 

I will try this code...I want to log the shutdown time of PXI in a file. If i run a .exe(that .exe will only execute one time log the start time and it will stop) in start up which will log start time of PXI similarly i should log shutdown time also without running any code in background..

Expand.Evolve.Influence
0 Kudos
Message 5 of 7
(2,903 Views)

@ELNO wrote:

Hi Norbert

 

Thank You for your suggestion

I dont want to run that program in baground all the time....while starting the PXI it should only update start time in file or log and while shut down it should update shutdown time in same file or log....I tried your suggestion and I am runnig a .exe in a start up and writing the start time in file but how to get the shutdown time


If you don't have an exe already running.... i think there is no way. Maybe you can "hack" the Windows Event logs as i think the shutdown time is logged there, but as mentioned, i see this as a hack.

So the clean way is my recommendation.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(2,896 Views)

While it is easy, in principle, to have a program that runs (and stops) when the PXI starts, it's a bit trickier to do this when the PXI stops.  In our lab, the usual way to stop the PXI is to turn off its power!  Note that we are working on a VI that "predicts the future" and writes the Power Off event 5 seconds before the user flips the switch, but there are still a few details left to code ...

 

BS

 

P.S. -- lest anyone ask for more details about this project, take another look at my signature ...

0 Kudos
Message 7 of 7
(2,885 Views)