Detecting multiple events

Hello
I am working on using sound as a condition monitoring tool. I currently have a system setup where a microphone monitors a set of metal shears. Input is via the PC soundcard. I have a VI setup that listens for the cutting action. It then extracts a portion of the signal, in this portion it should be possible to detect a second sound which is the cut (cropped) metal falling into the bin.
I have the system working such that there are two indicators on screen. One indicator denotes a crop detected and the second indicates that it has been succesful. What I want to do is combine this into a single indicator - i.e. if crop=true and succes=true then indicator =green, and, if crop=true and success=false then indicator=red.
The problem I have is that the two events occur at different times so I need to 'latch' the first crop signal for a period of time while listening for the second event. However I can't seem to create a latch that works.
Any help greatfuly received.
Thanks
Dave Murray

One possibility is to have the first instance's result stored in a shift register (one that is initialized before you are looking for the data), which get compared with the second's result to provide your Pass/Fail. Then the shift register can be reset to its initial state. If you have a snippet of your code that you can show, either actual code or a .jpeg or .png picture of the diagram (please no BMP's) it might help.
P.M.
Message Edited by LV_Pro on 09-22-2005 09:45 AM
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • Detecting multiple key presses

    Using the code below I am trying to detect keypresses for a java applet which involves holding down of several keys at once. I have 2 problems, probably related. Firstly I can only detect 3-4 simultaneous keys being held down and secondly the keyPressed and released! events are continually fired while a key is held down not just when it was first pressed as you would think. I would like to be able to detect up to a maximum of 16 keys being held down at once, is this possible? I am working on a unix system in x-windows which I think accounts for the auto-repeat problem, but why am I having trouble detecting multiple simultaneous keys being held down?
    It there a boolean function I can call to check the state of given keys at a given time, that would be very useful?
    Any help is appreciated.
    Ian
    public void keyPressed(KeyEvent e) {
    int keyCode = e.getKeyCode();
    switch(keyCode){
    case java.awt.event.KeyEvent.VK_O: //o
         odown=true;
    break;
    case java.awt.event.KeyEvent.VK_P: //p
         pdown=true;
    break;
    case java.awt.event.KeyEvent.VK_Q: //q
         qdown=true;
    break;
    case java.awt.event.KeyEvent.VK_W: //w
         up=true;
    break;
    case java.awt.event.KeyEvent.VK_A: //a
         left=true;
    break;
    case java.awt.event.KeyEvent.VK_S: //s
         down=true;
    break;
    case java.awt.event.KeyEvent.VK_D: //d
         right=true;
    break;
    }//method keypressed
    public void keyTyped(KeyEvent e) {
    }//method keytyped
    public void keyReleased(KeyEvent e) {
    int keyCode = e.getKeyCode();
    switch(keyCode){
    case java.awt.event.KeyEvent.VK_O: //o
         odown=false;
    break;
    case java.awt.event.KeyEvent.VK_P: //p
         pdown=false;
    break;
    case java.awt.event.KeyEvent.VK_Q: //q
    qdown=false;
    break;
    case java.awt.event.KeyEvent.VK_W: //w
         up=false;
    break;
    case java.awt.event.KeyEvent.VK_A: //a
         left=false;
    break;
    case java.awt.event.KeyEvent.VK_S: //s
         down=false;
    break;
    case java.awt.event.KeyEvent.VK_D: //d
         right=false;
    break;
    }//method keyReleased

    Did you ever find a solution to this problem. I am experiencing a similar problem. I want to be able to disable the auto-repeat function of the keyboard, so that I can tell if the user is holding down the key, or pressing it several times.
    If you have found a solution please let me know at [email protected]
    Thanks,
    Ben Newton

  • Detecting multiple touches in beta 5

    I was using the example found in coding how tos for how to detect multiple touches which went something like this:
    - (void)touchesChangedWithEvent:(UIEvent*)event
    NSSet *touches = [event allTouches];
    if (touches.count > 1)
    // have multiple touches
    So now they removed this method so i switched my touch detection to use:
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    I was expecting touches.count to show me how many touches there are but this always seems to equal 1. Am I missing something or is it a simulator bug, or sdk bug?

    Well now I just feel dumb. Thanks for the quick response.

  • Multiple event structure in a while loop

    Dear All,
                   I had a multiple event structure inside a while loop. The purpose of doing so is because I had a few 2D picture on the front panel. I would like to detect which 2D pictures had been click using the mouse down event structure for 8 of my 2D pictures.
                  The problem that I faced now is that when I of the event case or one of the 2D pictures had been click, it will not exit the while loop. I had to click on all the 8 2D pictures before it will exit the loop.
                  I had uncheck the under the "Edit Event" --> "Lock Front Panel (defer processing of user action) until this event case completes". But I am still stuck inside the loop.
                  Each 2D picture will perform different action therefore I cannot have an event case of all 2D pictures inside else I would know which 2D picture had been click.
                 Is there any other way out of this situation? Pls help. Thanks a lot

    A producer/consumer architecture (look at the examples that ship with LabVIEW) is comprised of two parallel while loops. One loop contains the event structure. The other contains your consumer which is basically a queued state machine. It receives messages from the producer via a queue. Your event structure can register a separate event for each 2D picture control or it can use a single event that would determine which spefic controls was clicked on. This is a more general approach and expands easily. Here is a basic example of what I am talking about.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Event Producer-Consumer.vi ‏14 KB

  • How do I select multiple events in iCal 8.0?

    In OSX Mavericks, I used to be able to select multiple events in iCal in the event list view. I could select the initial event in the span of events to be selected. Then hold Shift while selecting the final even in the span of events. As a result, all of the events in that span would be selected.
    in OSX Yosemite, this is no longer possible. There appears to be no list view, and holding the Shift button does not allow me to select a span of events.
    What is the best way to select a span of events, say as much as 30 events?
    Thank you.

    Empty Caches
    1. Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        "Develop" menu will appear in the Safari menu bar.
        Click Develop and select "Empty Caches" from the dropdown.
    2. Quit Safari if open.
        Option click the "Go" menu in the Finder menu bar.
        Select "Library" and then "Caches".
        Look for the folder 'com.apple.Safari"
        Right click "com.apple.Safari" and select "Move to Trash"
        Relaunch Safari.

  • How do I copy multiple events from a single calendar to another calendar?

    I have multiple events from my "Family" calendar that I want to move. I would like to create a new calendar and move only specific events from my "Family" calendar to this new calendar. I have tried to select each event, then export, but this doesn't seem to work. It seems to export all events in the "Family" calendar, not just the ones that have been selected. Is there any way to do this aside from exporting each event one at a time and reimporting to a new calendar?

    Drag them there. The volume they’re put onto needs to be formatted as Mac OS Extended.
    (111592)

  • How do I delete multiple events in Calendar on iPhone or iCloud?

    If I want to delete multiple events in Calendar on iPhone or iCloud, is there any way to do it?
    I don't want to be clicking / tapping for hours...
    Thank you!

    Welcome to the Apple Community.
    Unfortunately, I don't believe that's possible.

  • Is there a way to create a multiple event screen saver from iPhoto events?

    Is there a way to create a multiple event screen saver from photos in iphoto?  I can create a single event screen saver, but don't know if it is possible to create a screen saver with more than one event.

    Drag the events you want into an album and have the screen saver run from the album.

  • How do I split a single event with many clips into multiples events, one event per date?

    I archived the video from my AVCHD camera into a Final Cut video archive. Later I imported this into iMovie. All the clips from this archive (spanning several months) are dumped into a single event. If I recall, older versions of iMovie would import video into separate events for each day. Then I would go through and give each event a meaningful name (e.g., "Mary's Birthday").
    This is what I would like. Is there a way to split this very long event into multiple events, one for each day that is present in the event?

    Not automatically but with imovie 10 you can create new events with any name you like then move clips into them from other events  (Just like FCP 10.1).   See:
    http://help.apple.com/imovie/mac/10.0/#mov1d890f00b
    You can also choose to display clips in an event grouped by date.
    Geoff

  • Can I have multiple event structures with the same event cases?

    Hello, 
    I'm doing an application that reproduces the front panel of the HP6675A power supply. To achieve this, I have done a state machine with different states
    (initialize, measures, voltage, current, ocp, ov, store, recall, etc). In each state, should have an event structure that catches the events of the buttons, like for example: if the current state is the Voltage mode and the user press the current button the next state will be the Current mode. For this in each state of the state machine should be the same event structure with the same events.
    My problem is that the Vi doesn't work properly when I have multiple event structures with the same event cases. There are some possibily to do this, and how? Or is impossible to have multiple events? I have been reading some posts, but I don't find solutions. 
    Any help is appreciated.
    Thank you very much.
    Solved!
    Go to Solution.

    natasftw wrote:
    Or as others mentioned, make two parallel loops.  In one loop, have your state machine.  In the other, have just the Event Handler.  Pass the events from the handler to the state machine by way of queues.
    A proper state machine will not need the second loop.  The "Wait For Event" or "Idle" state (whatever you want to call it) is all you really need in order to catch the user button presses.  The setup is almost there.  Maybe add a shift register to keep track of which state to go to in the case of a timeout on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there a way to detect the event when device goes to sleep and the screen blackens?

    I want to detect the event when the iOS device goes to sleep and the screen blackens?
    Is there any way to do it?

    Hi,
    A small idea, please check whether it will work or not.
    You can achieve this by using combination of DNS server and reverse proxy server.( Customized apache). Make 'A' record for www.abcd.com to reverse proxy server IP address in your DNS.
    So it will resolve your reverse proxy IP address for requests.
    Configure appche to accept incoming request for www.abcd.com and points towards www.abcd.com/parameters.
    I think this will solve your problem.  Only one condition is that proxy server will communicate with www.abcd.com on behalf of client.
    Follow the link for configuration of reverse proxy server
    http://www.slashroot.in/how-configure-basic-apache-reverse-proxy
    HTH
    Naisam

  • Using Multiple Event Listeners

    Hi,
    I have a movielcip (A) class in which I have used a Tween class effect on a child movieclip (B) scrollRect. The (B) Movieclip in turn has several movieclips whose have tween class effect being executed on thier child movieclips.
    the tweens are all unique to each movieclip
    and the event listeners are taken off once completed.
    This works all well and good in FLASH IDE...
    My problem arises when I try to view this in a browser on a Windows XP
    it doesnt work in
    Opera Version 9.63
    Firefox 2.0
    and Google Chrome 2.0
    The only browser it works fluently in is
    Internet Explorer 7.0.5
    What is happening in most cases it that the animation appears to "stick" but i think what may be happening is the listening or removal of the event listeners. The animations are left incompleted.
    Is there any rule of thumb when using multiple event listeners?
    here is a snippet of some of my code
    on click event from movieclip (A)
    private function scrollToSlidePrev(e:MouseEvent) {
                   if (((slideIndex - 1) >= 0)) {
                        nextButton.mouseEnabled = nextButton.enabled = previousButton.enabled = previousButton.mouseEnabled = false;
                        var position:Number = 0-SLIDEAREA.width;
                        var slide1:TileListSlide = slides[slideIndex] as TileListSlide;
                        var slide2:TileListSlide = slides[--slideIndex] as TileListSlide;
                        scrollSlide(position,slide1,slide2);
    tween animation in movieclip (A) on (B)
    private function scrollSlide(pos:int,slide1:TileListSlide,slide2:TileListSlide) {
                   slide1.resizeSlideTo(0.6); // execute tween on child movie clips in B
                   slide2.resizeSlideTo(1); // same as above;
                   var rect:Rectangle = sliderMc.scrollRect;
                   var tween1:Tween = new Tween(rect,"x",Regular.easeOut,rect.x,rect.x + pos,3,true);
                   tween1.addEventListener(TweenEvent.MOTION_CHANGE,setSliderScroll,false,4);
                   tween1.addEventListener(TweenEvent.MOTION_FINISH,toggleButtonEnabled,false,3);
    tween animation in movieclip (B) children
    public function resizeSlideTo(sc) {
                   var m:Matrix = tileList.transform.matrix as Matrix;
                   var p:Point = new Point (m.a, 0);
                   var tween2:Tween = new Tween(p,"x",Regular.easeOut,p.x,sc,3,true);
                   if (numericStepper != null) {
                        if (sc != 1) {
                             numericStepper.visible = false;
                             tween2.removeEventListener(TweenEvent.MOTION_FINISH,showStepper);
                        if (sc === 1) {
                             tween2.addEventListener(TweenEvent.MOTION_FINISH,showStepper,false,2);
                   tween2.addEventListener(TweenEvent.MOTION_CHANGE,setScaleOnScroll,false,3);
    here is the link
    http://visual_admin.web.aplus.net/ticker/ticker_widget.html
    the effect disables and re-enables the buttons when its done.... then the listeners are removed.
    each one with the exception cretes its own unique tween (obviously this is a custom class built as each clip)
    i really don't know what to make of it guys         

    apparantly making the tween a property of the class rather than a random variable in a function worked.....go figure

  • How do I purchase photos from multiple events?

    I want to purchase about 10 photos from multiple events. I can't seem to figure out how to make that happen so I am not spending 2.99 shipping for 2-3 photos from each event. How do you cluster them all for one shipping fee?
    Thanks
    Rojos

    Make an album, drag the pics to that Album and use that for purchase.
    Regards
    TD

  • Splitting photos without creating multiple events.

    Is this possible? I have one event in iPhoto which covers three days. I would like all my photos from this event together but I want each day sectioned off in the same event, not split into multiple events. Highlighting the photos from each day and clicking "split" puts the days all in separate events where as I want them sectioned off, but together in ONE event. I hope I am making myself clear.
    My aim is to have it looking something like this:
    Event:
    Day 1
    Day 2
    Day 3
    NOT
    Event: Day 1
    Event: Day 2
    Event: Day 3

    tensocfan
    Now with Events as you cannot have Nested Events, but it's perfectly possible with Albums:
    File -> New Folder: Name it 3 Day Event
    Then three Albums (you can even make them smart Albums: Date is Whatever)
    And drag the Albums to the Folder.
    Regards
    TD

  • Is it possible to handle multiple events using Jscript for a button in Apex

    Hi,
    I've application wherein in one of the pages for a button, I need to trigger 2 events as: 1. redirect to a new page upon 'click' of the button
    2. display a set of values on 'mouse over' that button.
    I'm able to handle both separately, but not in one button. I would like to know if there is any limitation in Apex that we cant handle multiple events? Currently I've put a text item near the button, and called the Jscript for mouse over event in that as a temporary workaround. Can someone let me know if this is feasible? If not any other alternative to handle this?
    Thanks in advance,
    gsachidh

    Hi Gsachidh,
    well interesting problem you're facinng. Indeed, it can't be specified using the 'Button Attributes' So we have to come up with an workaround.
    A quick en dirty solution would be to specify it with the 'Optional URL Redirect options'. In a normal button, with processing on same page, this would be 'no target'. but in case of additional things to be done this can be used, using an target URL. I used this many times, in example with popUp windows for refreshing the caller object when changes are made. In your case we have to add next to the href an onmouseover event. this can be done with;
    Target set to => URL
    URL - target => javascript:doSubmit('<button_name>');" onMouseOver="javascript:showTooltip('tooltip');"
    Here the " is the key, letting ApEx know the target (href) is doSubmit('<button_name>'), just like when no target would be specified and adding a new javascript event; onMouseOver.
    Although this is a dirty solution in my opinion, it is the best i could come up with. I have another idea in how to do this, that is by adding this event dynamically with javascript with an addEvent. But i don't have an example at the moment for this scenario.
    Simon
    Message was edited by:
    S1M0N

Maybe you are looking for

  • 0 in Phone Number Field

    Hey all, I was just wondering is there a way to display a phone number with the 0 at the beginning of the number. This isn't a requirement, but I would like to. Would help the user. I have already made the tables and inserted the data. I have searche

  • Modules won't load when opening

    For some reason, when I try to load Adobe Premiere Elements 9, I get a whole repeating series of dialog boxes saying that it can't load certain modules.  list shows as follows: DH_dbToVoltage1.3+  (shows twice) KDL MIDI2Bool KDL Binary Bool KDL Bool2

  • How to Post Incoming Payments

    Hi, I request you to explain the process involved to post incoming payments in F-28. Please let me know how I can track the Account number under Bank data of a customer and also what document type to be selected? If I select document type u2013 DZ sy

  • Javascript - focus() on a hidden field/ bottom of the page

    I want to focus the page on page load to the bottom of the page. is there a way i can auto focus it to the bottom of the page without using a input field. If not why cant you use a hidden field? <body onload="document.forms[0].lastElement.focus()"> <

  • APEX Webcam Plugin

    Dear Experts, I have done the following: 1. Imported the APEX Webcam Plugin that I had downloaded from APEX Webcam Plugin by Damien Antipa 2. Added a new page region . The type of this region was the  webcam plugin. 3. Modified the PL/SQL execution t