LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

if no screen activity happens for a predefined time show dialog

Hi I need to lock my screen, ie bring up a login screen if my vi has been left with no activity for a predefined time(say 5 mins). How do I do this? I have considered the wait for front panel activity but i am not really too sure how to work this.
Any help gratefully accepted
Alexi
0 Kudos
Message 1 of 11
(4,222 Views)
Sounds like you need a screen saver.


alexi wrote:
> Hi I need to lock my screen, ie bring up a login screen if my vi has
> been left with no activity for a predefined time(say 5 mins). How do I
> do this? I have considered the wait for front panel activity but i am
> not really too sure how to work this.
> Any help gratefully accepted
> Alexi
0 Kudos
Message 2 of 11
(4,222 Views)
That depends upon how your LabVIEW program is written.
Some of mine run in loops:
Check the inputs / do something / wait 250ms / repeat
I can easily put a counter in that: 4 loops/sec * 60 sec/minute * 5 minutes.
Reset the counter if a change (input) occurs.
Run lock/login if counter hits the 5 minute limit.

Is there room for that in your program?

Les.Hammer@CompleteTest.com
0 Kudos
Message 3 of 11
(4,222 Views)
I don't see how this and several other questions about LabVIEW even belong
on this board. You could try experimenting with LabVIEW and doing some
programming or maybe learn the basis of programming... (any language)

"alexi" wrote in message
news:5065000000080000006FCE0000-1079395200000@exchange.ni.com...
> Hi I need to lock my screen, ie bring up a login screen if my vi has
> been left with no activity for a predefined time(say 5 mins). How do I
> do this? I have considered the wait for front panel activity but i am
> not really too sure how to work this.
> Any help gratefully accepted
> Alexi
0 Kudos
Message 4 of 11
(4,222 Views)
On Sun, 18 Apr 2004 09:28:47 -0400, Tom Byers wrote:
> I don't see how this and several other questions about LabVIEW even
> belong on this board. You could try experimenting with LabVIEW and
> doing some programming or maybe learn the basis of programming... (any
> language)

Hello TommyB,

Why are you being so sassy? Too much coffee this morning? Nobody got on
your case about that silly "Help with Hex conversion" question 😛 We all
have our bad days. Besides this is LabVIEW - a programming language for
non-programmers. I have seen several of Alexi's questions and I think
they are appropriate for _this_ forum.

Just some friendly usenet info... Since you're using Outlook as your news
agent, you should consider changing your email address to a f
ake one or
put a "killspam" somewhere after the @. Otherwise, you'll get blasted
with spam. Also, if you plan to make flaming a habit, it's best not to
use an email address that you like 😉
0 Kudos
Message 5 of 11
(4,222 Views)
Questions about Labview don't belong on the Labview Discussion Forum? Exactly what do you think this is for?

If the best you can come up with is to suggest "... try experimenting with LabVIEW ...", may I suggest you leave the answers to people who are interested in helping out.
0 Kudos
Message 6 of 11
(4,222 Views)
Hi,
as Shan pointed out, the forum is for getting help, not jumping on people who cannot immediately think how to do something. (rant over)
Anyway if you're using something like LabVIEW 7 (or even 6.1) there's event structures. You can put a timeout on this, so that if one of the other events doesn't fire, then the timeout action occurs. I've Written on in LabVIEW 7, and saved a copy for 6.1 too.
Hope this helps

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
Download All
Message 7 of 11
(4,222 Views)
Oops - don't you just hate it when you get halfway through a reply and hit the wrong key. Sorry.
In terms of locking the screen, you'll need to interface with the microsoft Windows SDK (the .dll's inside of Windows itself) to get the lock screen like that. Have a look on the internet in general if anyone has done something like this before, and either copy the calls to the dll, or if they've provided a dll of their own, then use that.

Thanks
Sacha.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 8 of 11
(4,222 Views)
When using events in labview, only the labview application is monitored for any sort of activity. Which means if the labview application window is not in focus there will be no effect.

There is a Windows API Toolkit (written in LabView) you can use to monitor any keyboard activity (regardless what application), ther is also a Mouse VI Library which monitors any mouse movement and clicks for any application. Search these two files in the Developer Exchange at NI's site.

-Joe
0 Kudos
Message 9 of 11
(3,992 Views)
Thanks v much for your help, I now managed to figure it out.

I am very grateful to everyone who has helped me so far, I am not a programmer and do find it difficult to get to grips with some LV functionality, but this forum has greatly helped me to develop, not only by my own questions being answered but by reading other's.

I was hesitant before posting initially but I figured that if I have learnt by reading others' questions at my level of learning then others will benefit from reading my questions who are also learning.

Thanks so much for your time in helping me
Alexi
0 Kudos
Message 10 of 11
(4,222 Views)