01-12-2016 12:20 PM - edited 01-12-2016 12:27 PM
Hello,
I am making a basic programme for fall detection for the elderly. Right now, face detection is employed to identify a face, and should it fall below a certain level which can be adjusted, a warning light triggers. Using the smtp email example in labview, i have gotten the thing to send an email.
However, what i want is an automated sending of email when the warning light triggers and when it has been lighted up for say a min or something like that.
First image shows the whole programme, second image the email part in question, and the third image shows the specific part of the warning light level detector.
Does anyone know how to do it?
01-12-2016 12:27 PM
The code snapshots tell very little about your code, it's better to upload the actual code.
You can create a timer action engine that starts timing when the threshold is passed. If whatever you are measuring goes back to an acceptable level, then stop the timer. If one minute passes, then generate a user event to send the email.
01-12-2016 12:27 PM
To start with your program is one big loop. This is NEVER a good idea.
Consider breaking your program down into discrete steps and use a state machine architecture.
Then adding a timer between when a "fall" is detected and when the email is sent would be trivial.
01-12-2016 12:37 PM
My rar file is too big - how can i upload it here?
01-12-2016 12:47 PM - edited 01-12-2016 12:52 PM
Removed some unnecessary stuff.
This zip file should work i think.
Open face recognition with point following.vi for the programme which works prior to me adding the email thingy inside.
01-12-2016 01:54 PM
I can't view it because I'm using LabVIEW 2014, but I am not sure it would be too useful if I could. As RTSLVU stated, everything in one big loop is hard to maintain. It is fragile, and very hard to debug. We probably don't have the hardware connected that you do either. Often what people will do is upload a stripped down version of their code that just highlights the issue. You can generate random data or use your equipment to generate actual data, then after the indicator is filled with date just right click and change to a constant.
01-12-2016
02:29 PM
- last edited on
05-13-2025
12:03 PM
by
Content Cleaner
I don't have IMAQ so I could not run your code and looking at your block diagram made my head hurt.
Simple state machine tutorial http://www.ni.com/tutorial/7595/en/
Even if you are not "jumping states" a simple state machine architecture makes programs easier to troubleshoot and add functions to.
01-12-2016 02:41 PM
I suggested using the elapsed timer function resetting it when the warning is not active, and posted an example.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-14-2016 01:31 AM
Posting this here since this is the singapore forum for labview.
I am trying to send an sms using email smtp function. Does anyone know the appropiate smtp and port number for singapore phone carries such as singtel?
Best if it uses TLS authentication as well
01-14-2016
07:35 AM
- last edited on
05-13-2025
12:03 PM
by
Content Cleaner
I thought there were updated VIs for doing authenticated mail, but I never used them. What version of LabVIEW are you using? Whenever the built in functions fail me, because of things like TLS I go with this function that just sends an email through Gmail.
https://forums.ni.com/t5/Example-Code/GMAIL-vi/ta-p/3996207
I'd first see if you can send an SMS by sending an email manually, then I'd try using that function if you can't get the native functions to work. Oh and you may need to login to Gmail after attempting to send the message, and turn on less security allowing for older applications to send gmail email.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord