Why do event structures trigger duplicate events for value changed, sometimes?

In this simple VI, an event structure is used to trap a value change within a color array.
However, when you run the VI and change a color, it triggers the event structure twice.  The second time the structure executes under the value change event, an impossible state exists where the structure is executing as if oldVal<>newVal, but they are in fact, equal.
I have had to write around this many times.  Why?
Attachments:
doubleEventExample.vi ‏91 KB

For completeness, I reported it also in the February bug thread, so it should get noticed:
http://forums.ni.com/ni/board/message?board.id=Bre​akPoint&message.id=3385#M3385
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Event structure: have one event trigger another event

    I have an event structure with two events. I want the finalization of the first event to trigger the second event. Both events are triggered by a boolean value change, say "boolean 1" and "boolean 2". Can I have a local variable of boolean 2 inside event 1. By changing its value, it should trigger event 2. However, this doesn't seem to be working. (see attached example)
    any help?
    Solved!
    Go to Solution.
    Attachments:
    test.vi ‏9 KB

    Tim's reply is the answer you are looking for.
    I would like suggest that you create a sub-VI that doesw the work in the second event you want to fire so tht rather than resorting to having one event trigger another, you can simply use the sub-VI that does the work in event_2 after the sub-VI that does the work for event_1.
    If you decide to stick one event triggering another, please clearly document the sceme in BOTH events. What you want to avoid is latter deciding event_1 should be triggered by Event_2 and the next thing you know, your app hangs.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Rais the event to trigger the Workflow for promotion/demotion

    I am not able to rais the event to trigger the Workflow for promotion/demotion. Is there any standard Object type for promotion/demotion.
            Please repaly.

    Hello Sudheendra,
    Pls visit to following URLs.
    [http://help.sap.com/saphelp_mdm550/helpdata/en/42/f1a957ebfb1a61e10000000a422035/frameset.htm]
    [http://help.sap.com/saphelp_mdm550/helpdata/en/45/0068570b0c0487e10000000a155369/frameset.htm]
    [http://help.sap.com/saphelp_mdm550/helpdata/en/45/efdc5bb7b404a9e10000000a114a6b/frameset.htm]
    [http://help.sap.com/saphelp_mdm550/helpdata/en/45/0068570b0c0487e10000000a155369/frameset.htm]
    Hope it will be helpful to you.
    With regards,
    Krutarth

  • Can I use an event structure within another event structure

    Hi
    Can use an event structure within another event structure?
    Thanks
    Yasamin
    Solved!
    Go to Solution.

    I attached my Vi from my old project (MY OLD VI). It is worked correctly.
    But I decided that use event structure instead of case structure.
    I attached my new VI as a picture and as a LabVIEW VI too (network_analyzer_8510_920527 Frequency Sweep.vi )
    My graphs show by pressing "case 5: button (Bottom of page right hand).
    Then I want to show each of graph in a large window( in a new VI) by clicking a key (for example "show 1").
    Thanks
    Yasamin
    Attachments:
    my VI.JPG ‏256 KB
    network_analyzer_8510_920527 Frequency Sweep.vi ‏72 KB
    MY OLD VI.vi ‏69 KB

  • Problems using event structure to write new parameter values to VISA

    Attachments:
    FMA_event_2.vi ‏28 KB
    FMA_event_2.vi ‏28 KB

    It seems I'm also having trouble using forums..not sure what happened...updated and corrected thread: http://forums.ni.com/t5/LabVIEW/Problems-using-event-structure-to-write-new-parameter-values-to/td-p...

  • If change in PO value, need other rel stategy made for value change only

    I have customized PO Relase strategy based on value. working correctly.
    In that, if there is a change in PO value after the PO release, then Release strategy is being redetermined according to new value. But user wants that if there is a change in PO value, it should follow different rel startegy for which change value is >0 USD(not regular release startegy defined for each value range).
    For this to happen, for value change, what kind of characteristic(table field) I can use as criteria so that new release startegy can be determined for any change value after final relaese?
    Is ther any possible way to make this happen? Pl. suggest me different ways.
    Vijay

    Dear Vijay,
    In order for another release strategy to getting determined, the PO should have another set of value
    to meet the characteristic for the new release strategy or else it will use back the same release strategy
    with approval reset and management need to reapprove again the same release strategy.
    Based on your description, there is no need for another release strategy to get determined if the PO
    still contain the same set value that meet the previous release strategy . Let say you increase the
    total value of the PO, incase the release strategy still meet the current approve release, it should reset
    it again but not another release strategy that not meet with value in the PO.
    If you create another new release strategy that the criteria overlay the characteristic of this old release strategy,
    for new PO, no release strategy will be getting determine.
    Best Regards,
    Ian

  • How to Transition to a Specific Case from an Event Structure Trigger?

    Can someone help me troubleshoot my program. I've attached my VI so you can follow along with what I am describing. So here is the scenario:
    I have a program that consists of four test states, stop test, request test info, and end program (cluster of 7 booleans). Each test state sends a serial command to a DUT, receives ACK packet, opens relays which disconnects the serial connection and DUT will continuously test by itself. If the user wants the end the test early, they can hit the "Stop current test" which will close the relay reestablishing serial communication, wait 10 secs for device to enumerate on the PC, and then send the serial command to stop the test. From here, the user can request test information from the DUT by hitting the "Request info" button.
    So my dilemma is when I try to implement a time limit for cases 2 - 4. For case "M1-Idle", the program works flawlessly since there is no time limit. The program will send the serial command, transitions to "Open Relay" case and switch back to the "Idle" state to wait for the "Stop" command. The user has to hit stop whenever to close the relay, request info and/or continue testing.
    For case 2 through 4, there is max time limit of 3 hours. This is where I am having difficulty opening the relays and then entering the timer count down case structure to start the timer. Question is, if I am using the Event Structure to trigger on a user action event (i.e. user presses "Run M2-Normal" - Menu.M 2: Value Change) it sends the command and move on to "Open relay" to break the serial connection as intended. Since the next state of "open relay" is "Idle" how can I add case selector to select "M2 - Timer" instead of "Idle" given that it was based on user selection of "Run M2" event?
    Is that even possible? I tried using the feedback node on the state enum but its coming from the case state and not the event state so it doesn't enter properly into the timer state. Any help or ideas is greatly appreciated. Thanks in advanced.
    Main_Working_Copy.vi is the main portion of the program.
    Best regards,
    Henry
    Attachments:
    Main.zip ‏106 KB

    Hi Ofek_zeevi,
    Welcome to the Support Communities!
    The article below explains how to gift a song in the iTunes Store.
    Some songs are not available as an individual purchase.
    iTunes 11 for Mac: Give music and video
    http://support.apple.com/kb/PH12293
    I hope this information helps ....
    Have a great day!
    - Judy

  • Why does my ical show duplicate events?

    Why does my ical keep creating duplicate events on multiple devices!!!!!  I have turned off icloud but it keeps getting worse!  I'm up to 5 entries for all birthdays.

    Have you seen this ?
    https://discussions.apple.com/message/8210764#8210764

  • Event Structure Trigger Controller

    Hi Everyone.  I'm working on a motion control system for a flight simulator base using Labview.  My code uses a while loop with a few case structures to constantly transmit data to a second computer where it is conditioned into base motion data.  Currently, these transmissions occur in real-time: I cannot input three different commands and execute them at once.
    I want to be able to input multiple different values into a seperate controller and "start" them all together.  An event structure seems like it would be the perfect solution to my problem, but I'm having difficulty with the program timing out or receiving the wrong inputs, which causes some diasterous effects on the machine.  Any help on where I should place this event structure, how to wire the inputs to existing controls, or any helpful tips are greatly appreciated.
    Attachments:
    HostControler2.vi ‏78 KB

    1. Your event structure must be inside a while loop to trigger on more than just a single event. http://zone.ni.com/reference/en-XX/help/371361H-01/glang/event_structure/
              In your VI the event structure will only ever fire once when you click "Start 2". Then it will never fire again.
    2. Every control that you want an event to fire on must be registered and handled in an event case. They can all be in the same case, as long as they are registered in there somewhere.
    3. Try to keep your block diagram on a single screen, it makes it easier to follow. (Unless your screen is actually twice as high and wide as mine?)
    4. Try to keep all wires visible and all data flow from left to right, wires shouldn't be going backwards or behind objects etc. That will also make it easier to follow.
    5. You are already using basic state machines, you probably don't need to have a while loop in a while loop.
    6. If you need different actions performed asynchronously you will likely need more than one while loop (executing asynchronously, not nested) using queues to communicate between them.
    7. Do you really need to continuously transmit data or only on change?
    There's more but that should give you a good start.
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • How can I stop an event structure detecting keydown events until the vi has initialised?

    My application has a sequence structure with 3 frames. First one initialises some front pane objects and controls, the second communicates with an external device via a serial port to a start condition and waits for this to complete by polling the device. The third contains the event structure which reads the device when the spacebar is pressed. The problem is that any pressing of the spacebar when the application is in the first 2 frames of the secquence structure is stored and executed as soon as the third frame becomes active. I have tried using dynamic Event registration but to no avail. Am I doing something wrong? can the keyboard be disabled until the second frame complete
    s?

    I usually avoid sequence structures in favor of driving execution order through data dependency (error clusters are great for that). However, since you've already got one, you coul try to add another frame right before your event structure. In that frame, place another event structure that can trap that stray keyboard event. Put a tiny timeout value on it so it doesn't appear to "pause" your VI's response. That event structure will catch any bogus key presses that happen during initialization.
    Having said all that, I still think the behavior is not proper. The event should not be handled if it happened before your VI gets to the event structure. For now, you can try that workaround.
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • DAQmx in Event structure / avoid multiple events

    Hi all
    I've started creating program for acquisition and analysis of data . I don't have much experience in LabVIEW, but it's important to me to start creating this application in good way. Can you give me some advice about things below?
    I prepared template with Event structure, based on some article .
    First question is how exactly place DAQmx blocks in it. Now they are all on one state of case structure "test", but I'm not sure that's correct because most of the example on NI side have initialization (like sample rate, number of saple) outside of the loop? It's important to make it possible to change parameter between measurements.
    Second. How to avoid multiple events. In example: button TEST is pressed, measurement is taken. This measurement take a long time. I've started bored, and some other buttons (maybe TEST ) accidentally were pressed. When measurement is completed  it would be good idea to destroy this events associated with accidently pressed buttons. It is possible to do it? What's the best way when there's a lot of buttons(when analysis part of program will be added)?
    Best Regards
    PS. sorry about my english
    Attachments:
    pgm.vi ‏33 KB
    Enum_Events.ctl ‏5 KB

    Dear Finch!
    Welcome to NI Forums!
    My first advice regarding your code would be to use shift registers instead of Queues as your state storage, since (as you've said) there is no reason to store multiple events that have happened. The state machine design pattern, which I strongly recommend in this scenario is built into LabVIEW, you can use it as a template if you go to the New.. menu.
    Please check out these materials for further discussion about state machines.
    You are correct in that most of the DAQmx VIs can be placed outside of the loop, only DAQmx Read (the function we actually use more then once) must be placed inside the loop, the rest can stay out. If you want to modify some parameters (like Timing) mid-execution, you only have to stop the task, set them, then start it again.
    This can be easily done in a different state, which can execute only when some parameters have changed.
    Also, if you want your user to be unable to interact with certain controls while the test is being taken, you can programmatically disable them with a Property Node. 
    Please get back to me if you have any other questions.
    Best regards:
    Andrew Valko
    NI Hungary
    Andrew Valko
    National Instruments Hungary

  • Event for value change of an input field

    Hello,
    I'm a newbie in WD4A.
    I've got a input field. Is there a event that's fired, if the value of an input field is changed?
    Regards Christian

    No.  There is only an event when the user presses enter.  You can check the online help for all events of all UI elements.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d7/ef8841e3af1609e10000000a155106/frameset.htm
    In 7.02 there is an AJAX based change event on the inputField, but it is not available as a normal WD Event. It instead triggers the attached SearchHelp without the WD Phase Model.  This is the new SuggestValues feature in 7.02.

  • Event structure mouse up event outside icon bounds

    I've just noticed that the 'mouse up' event only works if the mouse cursor remains hovering over the control panel icon associated with it.
    It's a problem for me because I have a slider bar which passes values (via an event queue, then RS232 to hardware) when the slider value changes. But that can generate lots of queued up serial writes if I slide quickly back and forth with the slider, so I use a mouse up event to flush the queue. It appears to work, but if I click and drag, sliding the cursor outside the slider bar area, it fails to recognise the mouse up event.   

    Hi Graham,
    Is it the default behaviour that the Mouse Up event only works while the mouse is above the control itself. If you want to have a slightly larger area, you can use the Mouse Up event of the Pane, and then check the co-ordinates of the mouse cursor before doing your processing.
    Regards,
    Imtiaz Chowdhury
    Head of Digital Technologies
    Brand786

  • New Page in ALV for Value Change on a Field

    Is it possible to trigger a new page while prinitng from ALV whenever a value changes in a column.
    Thank you,
    Shashi Reddy

    Hi,
    Yes it is possible to add page breaks on a particular column while previewing/printing from ALV.
    Declare a structure like
    DATA:  gs_print    type lvc_s_prnt.
    and before calling set_table_for_first_display, write
    gs_print-grpchgedit = 'X'.
    Now pass this structure to the method as follows:
        call method grid->set_table_for_first_display
             exporting
               is_print         = gs_print
               is_layout        = gs_layout
               is_variant       = gs_variant
               i_save           = 'A'
               i_default        = 'X'
             changing
               it_fieldcatalog = gt_fieldcat[]
               it_outtab        = g_t_outtab[]
               it_sort          = gt_sort[].
    Run the report. Now when you are in the print preview mode, press the sort ascending or descending button on toolbar (without selecting a column). A dialog box appears asking for sort order. Add the required field, from the available list on right hand side, on which you want a page-break. In the last column titled NG of this sort order dialog box, write * for page feed or UL for line feed. Press Copy button to see the effect.
    Hope this helps.
    Regards
    Shehryar

  • Mysterious "New Event"s and duplicate events

    I sync my iPhone with my iCal calendars manually via USB, and lately I've been having an issue with events showing up in my iPhone calendar that aren't in my iCal calendar. Sometimes they are just called "New Event", while other times they have only the title of a real event.
    I cannot figure out why these keep appearing, as they aren't in my iCal calendar. I've tried to delete the calendars from my iPhone by deselecting the "Sync Calendars" option, but that doesn't seem to clear them from the iPhone. I've also tried to replace the ones on the iPhone with the ones on my computer using the "Replace Information" option, to no avail.
    Is there anything I can do?

    Hi Paul,
    I tested with 3.7.1.4 and 3.7.1.5. In both versions I can see the issue.
    reg
    Dasun.

Maybe you are looking for

  • Unplanned depriciation run error

    Depriciation posting run by AFAB, msg comes. Message no. AA730 restart is not possible for the above period. Error: Last posting run terminated 2009/12. give me solution... Moderator: Please, search before posting

  • Change Infotype - History

    Hi Experts, I'm facing issue with SAP HR : I'm using PA30 to change IT0002, IT0105 and IT0315. I'm using the "change" icon and I'm adding a new start date : I'm expecting SAP to create a new recording so I can track the history. Nevertheless, it over

  • Media Encoder has loaded project but does not Encode

    I'm working on a large project (60minutes long).  I'm ready to export.  The project takes about half hour to load into AME but it doesnt go any further.  It says Encoding on the status but the que time is yet to start.  An hour later stil no change.

  • Auto Update Illustrator CS6 version 16.0.3 error code U44M1P7

    I have received a failure code several times already.  The eror code is:  U44M1P7.  Currently running OS Windows 7.0. Please advise if anyone has a fix. Thank you

  • Using javascript:SP.UI.ModalDialog.showModalDialog with Workflow Initiation

    I'm trying to use "javascript:SP.UI.ModalDialog.showModalDialog" with a workflow initiation page.  I can get it to start but the "Cancel" Button doesn't work.  Can anyone give me a clue? javascript:SP.UI.ModalDialog.showModalDialog({url:"{SiteUrl}/Wo