Log Alarm Only Once

Hi everyone,
I have an interesting issue with logging a 'thermocouple disconnected' alarm as part of a condition monitoring application.
I am logging thermocouple readings at 5 Hz  when a thermocouple becomes disconnected the reading rises to 1372, which is detected and should sound an alarm.  The application builds a string at this time (and publishes to a table) telling the user which thermocouple has disconnected, and any action undertaken (for example, turning the heater off).
I would usually include a snippet, although the code uses property nodes (as the error log code is in another loop) making it pretty much unreadable.
My issue is that the alarm is published on every iteration.  I need to keep checking for other thermocouple failures but disable one which has already occured.  I thought about setting a 'already written' variable in a shift register for each error case but this was getting messy quickly.
Any help (or ideas of a better way to do this!) are appreciated,
Pete
Regards,
Peter D
Solved!
Go to Solution.

egraham wrote:
One method still appears faster and I wonder why this faster method isn't the one we should be using???
Because your method is not the fastest.
Yes, I was sloppy in my code and there was an additional buffer allocation due to the autoindexing branch of the array. If we index inside the inner for loop, we eliminate that extra buffer allocation and speed it up by more than a factor of two. (I did the autoindex for quicker coding and cleaner diagram, because it does not really matter in your application).
Also, don't underestimate the new compiler. For some reason your "delete..insert" does not cause a buffer allocation, something that might not be guaranteed in all cases. (tools...profile...show buffer allocations). It might also well be different on older LabVIEW versions. (I have not tried). It might also be different on different CPUs (My times are quite slow because they were done on a very old Athlon XP).
First, let's make sure we benchmark the right code. We don't do a single replacement as in your benchmark, but there is also an outer shift register where we keep the rotated array. You should also disable debugging, because loops have more debugging overhead, skewing the results.
Attached is a simple draft with 5 code alternatives. Just run and select one algorithm at a time via the enum selector. The time in ms will be graphed. (There are probably some bugs, please verify correct operation).
Loop In Place: Using a loop and the "in place element" structure to rotate rows down.
Loop Original: Using a loop and the proper inner indexing.
Loop_autoindex: Same as (2) but with autoidenxing, causing a second buffer allocation.
Delete_Insert: Your code (delete last, insert new element at the beginning).
Insert_Delete: Basically same as (4) but with operations reversed.
Here are my results: algorithm incremeneted every 40 iterations)
 (1) and (2) are fastest, (3) is slowest, and (4)&(5) are somewhere in the middle, or about half he speed of the first two.
Feel free to find a fster method for the same task. There problaby is......
Also note that the real case has a 2D array of strings, so things might again be slighly different (not tested).
Just some food for thought....
LabVIEW Champion . Do more with less code and in less time .
Attachments:
shift array elements_compare5Algorithm.vi ‏22 KB
ShiftArrayBenchmark.PNG ‏18 KB

Similar Messages

  • I can open the window only once, once i close it, i need to restart my laptop to open firefox again

    i can open my firefox window only once, if i close it, i cannot open it again, it is not working. i need to restart my laptop again to open it. This had been happening from the date i did the recent update for the new version.

    No, as many times as you need. Log into the App store with the same Apple ID you used when you first downloaded it. Where it says Purchase,  option click and it will change to install. Next time you download it, before you install, keep a copy on a USB drive or external drive to save downloading it again and wasting power and Bandwidth.
    Good Luck

  • How to make variableExpresion to be executed only once

    Hi Sir/Friend
    i have required to generate jasper report here i want to assign value to a variable only once... and the same variable is using for further expression how it can be done plz help me i m not getting this plz....
    with regards
    kotresh

    Thank you for replying!
    So which tone is used by calendar alarm that I should change? I see ringing tone, video call tone, message alert tone, email alert, keyboard tone.
    Actually I never let my cell phone ring, so I already set the ringing type as "silent".

  • What is the best approach for executing this code only once?

    Hi,
    What would be the best way to this using JSF/Java web architecture? I have a login page, login.jsf, that submits login credentials to another servlet and if successful, is redirected to a login success page, which I have called "main.jsf", my application's main page. What I want to do, however, is when the login success mechanism redirects to my application, I want to run a bit of Java code (which requires access to the session object) that executes only once, and then redirects to my application's main page.
    In other words, I could put this Java code on my application's main page, but then it would execute every time a user visited it.
    Any advice on the most efficient way to do this?
    Thanks, - Dave

    laredotornado wrote:
    Thanks for your reply but I have a question. If the filter is executed on every page, then, assuming the user is logged in, the code would be executed every time. How can I create this such that my code snippet is executed only once, preferably after the user is re-directed to the login success page?It is more secure. On login just put the User object as attribute of HttpSession and check in the filter if it is there.

  • Send Email Notification only once

    I've configured my User Form to send out Email Notifications, based on whether or not a particular attribute (usually a Checkbox) is "Yes" or "No".
    When the checkbox is ticked, my Update-User Workflow sends out Email Notifications.
    The obvious problem is : if another Administrator logs into IDM, views that same User Form, and then clicks SAVE, naturally, my Workflow sends out the Email notifications AGAIN.
    Everytime the Form is processed, emails are sent (*because the checkbox is ticked*).
    How can I solve this problem? How can I ensure that Email Notifications are sent only ONCE ?
    Thanks.

    I tried to do it like this :
    *<Action id='1' name='email12' application='com.waveset.provision.WorkflowServices'>*
    *<Condition>*
    *<and>*
    *<isTrue>*
    *<ref>user.global.checkbox</ref>*
    *</isTrue>*
    *<isnull>*
    *<ref>user.update.accounts[Lighthouse].changes[checkbox].old</ref>*
    *</isnull>*
    *</and>*
    *</Condition>*
    *<Argument name='op' value='notify'/>*
    In other words : send the Email ONLY if the "Old" value of the checkbox is NULL. (if the checkbox was not previously ticked).
    But, it didn't work. The email was sent again.
    Perhaps, my syntax is wrong?

  • Redirected printers using Remote Desktop Easy Print driver work only once during session

    Hello all
    We are running Windows Server 2012 R2 Remote Desktop Services Sessions hosts with printer redirection allowed using only the Easy Print Driver, we have no other drivers installed on the servers. All client printers are redirected and can print fine, but
    only once per session! We have tested with several different client printers and they all work a single time in each session. After that the user needs to log off and then back on again to be able to print once again, but only once. Needless to say, our users
    are annoyed. If I look at the c:\windows\system32\spool\printers folder while jobs are printing, but failing, I can see the spool files appearing and disappearing as jobs are spooled. No errors in the event logs accompany the behaviour. Our clients are running
    Windows 7, 8 and 8.1. All exhibit the same problem. The error looks a little like what is described here:
    http://support.microsoft.com/kb/2925429
    While similar, this problem describes a scenario where Easy Print is not used, but XPS is, and since Easy Print is based on XPS and the behaviour is very similar, I am tempted to make a connection.
    I have checked all the usual stuff with permissions etc, and no manufacturer provided drivers are present. The problem appears on newly installed systems as well as one that have been running for some time. Restarting the spooler services does not resolve
    the problem. Actually I do not think it is related to the spooler service or driver framework at all, but rather is an Easy Print driver issue that is occurring much later in the process, if not I would see some errors in the logs and no jobs would print at
    all.
    Anyone ever heard of something like this?
    Thanks
    Morgan

    Hi Morgan,
    Based from your description, users can only print once during single RDP session, I suggest you check if this issue also happens locally.
    In addition, after the first print attempt, does any other issue exist on the RDP session?
    Is the server fully patched? If there are any available driver updates, please also apply them. If there are any third party software installed, try disable/uninstall them to see if the issue persists.
    You can also enable print auditing to get more detailed information about this issue.
    More information for you:
    Auditing Printing Events
    https://technet.microsoft.com/en-us/library/cc976774.aspx
    Logging Spooler Events
    https://technet.microsoft.com/en-us/library/cc976746.aspx
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]

  • Custom Render service is called only once, why?

    Hi All,
    I've created a custom render service in order to prepopulate principals name on each step of my process.
    The input form of the process is a Document Form cause users attach files to the form and it is routed to next station with the attachments.
    "Call Render Service only once" checkbox in advanced settings is unchecked.
    When the process is initiated my custom render is invoked fine, but when it reaches the assign task activity the form is opened but no render service is invoked.
    Why is it happens?
    Thanks in advance, Yan.

    Hi Parth,
    I'm writing to the log file every time that my custom service is invoked.
    When I open a form for a first time in workspace I see that it was invoked but when it reaches "assign task" activity and opened again the service is not invoked.
    I have only one form variable.
    Yan.

  • Is there any way to log alarms to a SQL database?

    Using Lookout 5.1, I have an application where it would be useful for Historical purposes to log alarm messages (generation, acknowledgement, completion) to an SQL database.  It is desired to run a 3rd party application in order to compute response times, and determine historical trends that might be discernable from the frequency of particular alarms (equpment out of calibration, equipment needing replacement, etc...).
    Is there any way to acquire information on alarms, their generation and completion?
    David Dudley

    After all the reliability and integration headaches we've had with Lookout 5.0, it was an uphill battle just to get those above me to upgrade to 5.1.  I'm not about to start that mess again, in order to upgrade to 6.0, and in addition, if I went to them and said "It'd be nice to do .... to Lookout, and it will only cost us $$$ in order to do ....", I think I'd be kicked out of their office before I finished the sentence.
    We've finally got Lookout 5.1 into a condition where it works reliably *most* of the time.  I'm not about to start another upgrade path, unless it were to something else.  Lookout seems fine for "small" systems, which are worked on by a single user, but in this case, we've got over 5000 tags from some 60 PLC's we're handling, with around 2000 or so discrete alarms.  The system is maintained by me, and I do *some* development on it, but we also have 3 or 4 other people who also work on the *same* system, which in the current design, with a single lookout file, and no discrete process database system, makes it extremely difficult, since only one of the users can be working on the system at a time*, and they MUST do it on the production system, as you can't merge pieces from different developers into the single operating system.
    Can Citadel 5 be added or merged into Lookout 5.1?
    David

  • Calling a setup only once

    CAn anybody help me in this.
    I have a configuration setup which has to be called only once for every user when tomcat is started.
    can anybody suggest me where can i put my code.
    1)in a servlet and call it in web.xml
    2)in my logonaction class
    where can i put it.
    Thanks

    If you need the code to be run once, when the user logs in, then the idea of putting it in a class that gets instantiated, and then stored in the session upon login might be your best (and frankly, easiest) option.

  • Need help in executing EEM applet only once

    Do we have any sample script for EEM applet counter ?  We want applet to execute once after reload after matching a string . We tried couple of solutions like “ server suspend  “( customer does not like server suspend)   and event counter ( this does not allow syslog string matching ). Please let me know if there are any options.
    At the router reload, match the string , bring down the interface and run this applet only once . I have been trying multiple messages in Bootup log for this for bringing the interface down.
    The issue we are facing is that most of the bootup log messages can be triggered when the router is up as well which will result in triggering of the applet which is what we want to avoid.
    event manager applet Interface_down
    event syslog pattern "SPA removed from subslot 0/0"
    trigger delay 10
    action 1.0 cli command "enable"
    action 1.5 cli command "config t"
    action 2.0 cli command "interface gi0/0/0"
    action 2.5 cli command "shutdown"
    action 3.0 cli command "end"
    event manager applet Interface_up
    event syslog pattern "Bulk Sync succeeded"
    trigger delay 100
    action 1.0 cli command "enable"
    action 1.5 cli command "config t"
    action 2.0 cli command "interface gi0/0/0"
    action 2.5 cli command "no shutdown"
    action 3.0 cli command "end"
    end

    This is a bit dirty but you can create an applet to run at startup that creates the event detection applet. Then at the end of the detection applet, have it remove itself from the running config. This means that the  applet running at startup will always create the event detection applet but the event detection applet will only ever run once for that router boot period as it deletes itself after first run.
    The problem is that when you want to have one applet create another applet, you have issues with the inverted commas being correctly configured for the second applet which will cause it to run once, but fail after that. The way you can get around this is to write the applet to a text file on the flash and then copy the contents of the text file to the running config at boot. This preserves the structure of the applet being created and ensures that it will function correctly.
    The following example builds the event detection applet at system restart (BUILDAPPLET)  by copying the file "eventapplet.txt" to running config. The event detection applet (EVENTDETECT) detects a syslog pattern, in this case exiting global config, and runs the applet sending a puts command and outputting HELLO. The event detection applet then removes itself from the running config.
    !# configure the router
    conf t
    !# turn off file prompting to let the BUILDAPPLET run when copying
    file prompt quiet
    !# create the applet that runs at system restart and copies the flash applet to the running config
    event manager applet BUILDAPPLET
     event syslog pattern "%SYS-5-RESTART"
     action 10 cli command "en"
     action 11 cli command "copy flash:eventapplet.txt running-config"
    !# exit
    end
    !######## Create the flash file containing your run once applet ########
    ! enter the tclsh so we can write our applet to a file - put your event detection applet in here between the {} that you want to run once
    tclsh
    puts [open "flash:eventapplet.txt" w+] {
    event manager applet EVENTDETECT
     event syslog pattern "%SYS-5-CONFIG_I"
     action 1.0 puts "HELLO"
     action 2.0 cli command "en"
     action 3.0 cli command "conf t"
     action 4.0 cli command "no event manager applet EVENTDETECT"

  • When I long in and type my sync key its said : incorrect key.I worked only once

    I have Firefox 4 on Mac. I have sync for Iphone settled. I have Home app' in the Iphone...I cannot log in, response : incorrect Sync Key. But it worked only once.
    I want uninstall all the stuff and start again, how?

    Sounds as if you are trying to create a new Sync account. You need to treat that software reload as a '''new device''' for purposes of Sync.
    https://support.mozilla.com/en-US/kb/add-a-device-to-firefox-sync#w_add-another-computer

  • Materialized View to run only once in a year...

    Hi everybody...
    I want to create a materialized view which will run only once in a year and specifically some minutes after 00:00 a.m. on new year's day,
    so i created the following:
    CREATE MATERIALIZED VIEW <mv_name>
    BUILD IMMEDIATE
    REFRESH START WITH TO_DATE('01/01/2007 00:15:00','DD/MM/RRRR HH24:MI:SS')
    NEXT SYSDATE+366
    I have two notes:
    1) how to declare the refresh to be done the first new year's day after the day it'll be created , i mean not static date (01/01/2007)
    2)some years are leap and some are not , so in order to run every new year's day how should i transform the above..????
    3)is there any view which displays the next run of a materialized view..???
    the view DBA_MV_REFRESH_TIMES displays the last refresh of mv's...
    I use Oracle 10.2.0.1 on XP ...
    Thanks , a lot
    Simon

    1).
    use the expression that evaluates to next january first.
    SQL> select sysdate, add_months(trunc(sysdate, 'yyyy'), 12) from dual ;
    SYSDATE     ADD_MONTHS(
    19-JUN-2006 01-JAN-2007
    1 row selected.
    SQL>2). for this also use the same expression that will evaluate to the january first of the year after that.

  • Animated gif plays only once

    I am using Captivate 5.5 on a Windows machine. I inserted an animated gif into my Captivate, using insert > animation...  Then, I inserted a button. When I pressed F4 to preview the animation, it played only once. I put a check mark on the loop on the timing of the properties of the animation. Still, it played only once. It stopped when the play head stoped moving. I cannot make the animated gif play continuously. Does anybody know how to make the animated gif play continuously?
    thaks.

    You can try this:
    Stick this in the header area of your code
    <script type="text/javascript"> function showBuyLink() {
    document.getElementById("buylink").style.visibility = "visible";
    } // adjust this as needed, 1 sec = 1000
    setTimeout("showBuyLink()", 5000);
    </script>
    Stick this around your buy link code.
    <div id="buylink" style="visibility: hidden"> <!-- put all your add to cart buy links and images inside this hidden div --> <p style="text-align:center; font-size:26px;"> <a href="http://mybuylink">Add to Cart or Buy Link</a> </p> </div>
    Yopu can rename "buylink", but you have to make sure you rename all instances or it will kill the script.
    If you're not comfortable incorporating that, unfortunately, the other option would be to create a Flash animation and put a button in the last frame.
    That would be just as difficult (if not worse) as writing (or tweaking) a javascript to delay the hotspot, and even worse because it would be invisible to phone users. Additionally, people who disable javascript would never see the link if you did add the script.
    There isn't any way to do this with HTML or CSS, and you now know the flaws with the methods that will work.

  • DSC 8.6.1 doesn't log alarms

    My alarms are not being logged in DSC 8.6.1.
    I can tell that the alarms are being properly generated when I monitor them in the Distributed System Manger.  In keeping with previous posts, I know that the MSSQL server is running in the taskbar.  I've also tried changing the permissions for NETWORK SERVICE in the citadel directory.
    When I try to monitor alarms in LV, it returns error code 1967386611: HIST_RunAlarmQueryCORE.vi, Citadel:  (Hex 0x8ABC100D) The given Citadel database is not currently configured to log alarms to a relational database.
    I also notice that the time stamp on all of the citadel files is not being updated with each alarm, so it really seems like the alarms not being logged.
    I have alarm logging enabled in all the appropriate places (at the variable, and in the library properties).
    When I check the alarm log history in MAX, there is nothing there.
    Thanks,
    Charlie

    Hello David,
    I have the same Problem with LabVIEW and DSC8.5.1 and, yes, SQL-Server 2000 was installed before I tried to install DSC the first time.
    But after I uninstalled the DSC, SQL-Server-Express 2005 and the old 2000-Version and reinstalled the complete DSC-Module it still didn't work. MAX doesn't display any error message but doesn't also show any data. ldf- and mdf-Files are not contained in the database folder.
    Right after installation and first reboot I get an Error-Message: IN MSDE Security Setup Error „NI MSDE is not accessable or currently logged
    user doesn't have sysadmin permissions“. I found a post for this issue, but the suggested solutions didn't work for me too ( http://forums.ni.com/ni/board/message?board.id=170&message.id=243298). And if I try to use the DSC's alarm-loging feature I end up with the Error:"...database is not currently configured to log alarms...".
    The DSC and the application we developed work fine on two other
    XP-Pro-PC's and I was surprised to get in trouble with installing it on
    the customers PC.
    The Windows XP Pro has been installed by our customer and I don't want to touch that installation. My user account has admin permissions. I have no clue how to fix this and I hope you have an idea what to try next.
    Thanks in advance,
    Thomas

  • Some of my albums are in double in my iPod touch but they are only once in my iTunes, how can I delete the one in excess on my iPod

    Some of my music albums are doubled in my iPod Touch 4th generation, but they are only once in my iTunes library. how can I remove the one in excess in my iPod

    swipe to the right on the individual podcast, this will allow you to delete them right on the iPad.

Maybe you are looking for

  • Cannot log in to itunes on my windows 8 computer

    Just got a new computer running on the Windows 8 opperating system and i cannot login to the itunes store. Message reads "iTunes is temporarily unavailable. Please try again later."  Well, it's been doing this for a month.Everything is up-to-date and

  • Regarding Value and Binding properties of af:inputTextBox

    Hi All, I am using JDeveloper 11.1.1.6.0. I want to set the value for af:inputTextBox from the backing bean. I observed there are two properties for this component, 'Value' and 'binding'. So, I thought of using 'Value' property. For this I created a

  • Conect wifi imac and tv panasonic tx-p55vt30 problem

    help me conect wifi imac and tv panasonic tx-p55vt30

  • Editing HTML affects Browsing

    In the FAQ of help-info.de I find the following: Q: Is there a way to specify that as soon as a page loads in the "main" window of the CHM viewer, I should be able to immediately use the PgUp, PgDn, Up-Arrow or Down-Arrow keys on the keyboard, withou

  • How to store complex data in session object

    Hi All,         I have a requirement like this, I have to store some complex data(like some object) in webdynpro session object. I know that i can store some string value in session by using wdScopeUtil and is it possible to store some complex data l