10-02-2009 01:30 PM
icemaker wrote:
Looks like the first call will work for me.
If you use First Call, and the error happens, it sends an email. Assuming you don't shut down the software, someone fixes the error condition. Then error happens again. No email.
10-02-2009 01:43 PM
10-05-2009 07:34 AM - edited 10-05-2009 07:35 AM
Hi
Something like this maybe:
This VI should have the same function as yours, but only send one email per error. I say "should" because I can't test it properly without a mailserver. There are most certainly a couple of bugs in there, but I hope the main idea comes across. What is missing right now is a way to reset the alarms. As it is now when an alarm has triggered it will remain triggered until you restart the VI. Hope this helps you in the right direction
Best Regards
David
10-05-2009 02:30 PM
I tested that snippet and it seems to function partly. It only alarms on the 4th set point change. I am trying to figure it out as it is a much much neater way of wiring up my program.
I also have just started testing the program on my actual system and have noticed a problem with my programming. The voltage is not always on they intermittantly kick on whenver the machine I am monitring requestes heat. When it kicks on the voltage steps up from 0 to 6, so as I have it programmed now it warns when its on the way up to the specified voltage. What I need to do is take only the peak and compare it to my set point and ignore when it is 0. Sounds confusing but that is about the easiest way to explain it.
Thanks to all for the help so far.
10-07-2009 05:56 AM
Hi again
Had some time to do some tests. I'd forgotten a shift registrar on the for loop. I also replaced the e-mail with a popup (be carefull not the get caught in popup-lock) and the DAQ Assistant with a manual input so you can run test easier. Here's a snippet:
If I understand your intent correctly you just wnat to compare the peak value to the setpoint? As you are reading the values one at a time you would have to save them (maybe in a shiftregister) so you can compare the current and previous values and find the peak. Or you could read more values at a time and use some built in functions
10-14-2009 10:41 AM
10-15-2009 02:14 AM
Hi
That depends on a few things. At the moment you are reading one sample on demand so you get only a singel sample per iteration. One way to go would be to use the Peak Detector PtByPt VI, which takes single values. It is included in LV Full and above. You could also use the Collector Express VI to build an array for you as the samples are coming in. Then you can use the Amplitudes and Levels Express VI or the Peak Detector VI to find the peaks.
Another way would be to read more samples per iteration and then use the Peak detector or Amplitudes Express directly, but that may not be preactical for you. Will require more rewriting of your VI. Have a look at the different options and see what you think suits you.
Best Regards
David