KirinFrost Posted January 12, 2016 Report Share Posted January 12, 2016 (edited) 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. Here is how my programme looks like so far: The specific section of the email part in question: Any ideas? Edited January 12, 2016 by KirinFrost Quote Link to comment
hooovahh Posted January 12, 2016 Report Share Posted January 12, 2016 My suggestion is to refactor your code so no one VI takes up more than one screen. Or if it does it scrolls in only one direction. Oh and I'd also run your code through the VI analyzer to get an idea of what things can be improved, like wires going backwards, objects on top of each other, measuring code complexity and finding recommendations for compartmentalizing the code into subVIs, etc. But to your specific question I'd say the simple solution is to used the Elapsed Timer express VI and configure it to tell you if some amount of time has gone by, and your condition has been true this whole time, resetting it if the condition is no longer true. There is an input to the express VI for this. Quote Link to comment
KirinFrost Posted January 12, 2016 Author Report Share Posted January 12, 2016 But to your specific question I'd say the simple solution is to used the Elapsed Timer express VI and configure it to tell you if some amount of time has gone by, and your condition has been true this whole time, resetting it if the condition is no longer true. There is an input to the express VI for this. I have no idea how to do that lol. Do you want me to take multiple screenshots of my programme so that you can see them in detail? Quote Link to comment
hooovahh Posted January 12, 2016 Report Share Posted January 12, 2016 Posting code on the forums can be done in several ways. Taking screenshots of open windows is not one of them, pictures cannot be debugged or executed. The comparison is you wouldn't take screenshots of notepad and post them on C++ forums. Most people use snippets for small single VIs, which embeds the code in the PNG picture. http://www.ni.com/tutorial/9330/en/ Other ways are zipping the project and all code dependencies outside of standard libraries shipped with LabVIEW, then posting that zip. Drop down the Elapsed Time express VI (timing palette or search the palette), open the Context Help (CTRL+H) then hover over the function. It will describe how to use it and what it can be used to do. Then you could write a simple test VI that demonstrates how it works. Hopefully once you use it, looking at the inputs and outputs, the usage will be clear. Quote Link to comment
KirinFrost Posted January 12, 2016 Author Report Share Posted January 12, 2016 (edited) 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.Face project 2.zip Edited January 12, 2016 by KirinFrost Quote Link to comment
hooovahh Posted January 12, 2016 Report Share Posted January 12, 2016 Did you read the Elapsed Timer function? Did you write a test VI? What is unclear about what I described? You may also benefit from some free training. -LabVEW Basics -DAQ Application Tutorials -cRIO Developer's Guide Learn NI Training Resource Videos 3 Hour LabVIEW Introduction 6 Hour LabVIEW IntroductionSelf Paced training for studentsSelf Paced training beginner to advanced, SSP RequiredLabVIEW Wiki on Training Send Email On Timer.vi Quote Link to comment
KirinFrost Posted January 12, 2016 Author Report Share Posted January 12, 2016 Oh, thought you wanted to see my code so i uploaded it. Quote Link to comment
hooovahh Posted January 12, 2016 Report Share Posted January 12, 2016 You mentioned taking multiple screenshots to see it in detail and so I wanted to describe how to share code. But at the same time I wanted to give you the information on how to find the information yourself. Quote Link to comment
Benoit Posted January 13, 2016 Report Share Posted January 13, 2016 I'm agree with hooovahh, you need to follow some training on Labview. think about state machine. it might help you to refactor your code. Your timer could be in a global functional (sub vi with a while loop that stop imediately and a shift register) so it can be called everywhere in your code and wont stp any process. Quote Link to comment
ShaunR Posted January 13, 2016 Report Share Posted January 13, 2016 (edited) 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. Here is how my programme looks like so far: ace conditions" that Event Driven programming allows and the highly probable "hang" due to not triggering an event and stalling your main loop.. I would suggest, instead, you just use a normal case structure instead of an event case, and wire the warning light to it and add a bit of logic to prevent it firing over and over again. Edited January 13, 2016 by ShaunR Quote Link to comment
KirinFrost Posted January 14, 2016 Author Report Share Posted January 14, 2016 Anyway the thing works now except for one small problem. Thanks all.I noticed that the boxes created to show the facial features (eye,nose and lips) of the person keeps blinking. It seems to be telling me it cant detect it constantly all the time. Since the programme is meant to send an email when a feature is below a certain level after a certain period of time, because of the fact that it keeps blinking, it cant last long enough for the email to be sent.Any ideas? Quote Link to comment
Benoit Posted January 14, 2016 Report Share Posted January 14, 2016 When a control or indicator is blinking it's usualy because you are refreshing the value of it. State macine and if you can learn about producer consumer it might help.... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.