It is currently Wed Aug 22, 2018 6:43 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Safety while working alone
PostPosted: Thu Jan 25, 2018 10:35 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Sep 11, 2004 11:54 am
Posts: 532
Location: UK
Hi,
I have a long term background task relating to the safety of programmers (me and you) working alone for significant parts of the day, during which a medical emergency could arise.

As part of this I need to detect if the computer has received a mouse or keyboard input to any application. The detection needs to be carried out by a small background task that will not cause AntiVirus software to kick off. As a guide, the monitoring interval needs to be in the order of a minute. (Probability of recovery from a stroke goes down 10% per minute without intervention.)

The same task will be checking PIR motion sensors, pinging a comms path to the first responder (to confirm a help message could be sent) and other things.

I am NOT intending to produce a safety critical item, but on the balance of probabilities I would rather have a dumb bit of software checking I'm alive and kicking rather than cooling down on the floor!

Any ideas or suggestions would be welcome...
Regards,
RichardL


Top
 Profile  
Reply with quote  
 Post subject: Re: Safety while working alone
PostPosted: Thu Jan 25, 2018 11:59 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1330
Location: Germany
Here I see a problem with computers and the operating systems (Windows, Linux, Mac)
These are NOT always fully available. This means that they are not real-time operating systems.
An alternative would be to avoid micro-controllers.
In the industry there are controllers that can also communicate over a network and process various sensors.
The programming can be carried out via Codesys.
Redundant systems are also possible.

In any case, micro controllers are more reliable. But there can be no absolute security.

Translated with www.DeepL.com/Translator

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Safety while working alone
PostPosted: Thu Jan 25, 2018 1:29 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Nov 03, 2008 9:56 pm
Posts: 534
Did you look into smartwatches/fitness trackers? They monitor heart rate and they also have motion sensors, bluetooth...


Top
 Profile  
Reply with quote  
 Post subject: Re: Safety while working alone
PostPosted: Sat Mar 10, 2018 6:11 am 
Offline
User
User

Joined: Wed Apr 02, 2014 12:45 am
Posts: 27
:lol:
Here's a start..
But what if I need to go get a coffee, or have a bowel movement?

Code:
Procedure.l GetIdleTime() ; Returns the time, in MS, since the last input was received.
  Protected lipi.LASTINPUTINFO
  lipi\cbSize = SizeOf(LASTINPUTINFO)
  GetLastInputInfo_(@lipi)
  ProcedureReturn (GetTickCount_() - lipi\dwTime)
EndProcedure

Procedure _EXAMPLE_DETECT_KBM_IDLE(MaxTimeMS.l = 60000) ; Loop runs until you Don't provide input for 60 straight seconds, then quits.
  Repeat
    If GetIdleTime() >= MaxTimeMS
      Debug "IDLE TIMEOUT!"
      Break
    EndIf
    Delay(1)
  ForEver
  Debug "Call For Help!"
EndProcedure

_EXAMPLE_DETECT_KBM_IDLE()


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye