Malfunction of the Structure of the event?

Apparently, an event structure keeps listening events even if the structure has to be inactive as it is located in the inactive case of a box structure. See the attached example.

Explanations, comments or whatever? Is this yet another bug or a significant feature of LabVIEW?

Thank you

Peter

Peter,

to add to the post correct Dennis:

You can either Open the front panel for your events in order to prevent the structure from the event to block the front panel, or you can cancel the registration of events. The unregister method requires registered custom events. For instructions, see this KB .

hope this helps,

Norbert

Tags: NI Software

Similar Questions

  • using the structure of the event in the LabVIEW classes

    Hello

    I'm new in the use of LabVIEW classes, so don't know much how I can use them.

    In my main program, I have clusters with five elements in each. The elements are controls two States and in some groups, there are three States controls. The user will press the buttons (controls), and different things will happen. In my first program were I not using classes, I had a structure of the event and the controls were cases of event in the structure.

    Is it possible to somehow use an event of cases in one of the methods that is created in the classes, so that say, that's not in the main program?

    I have attached two photos: I wanted to have a structure of the event in servoTouchEvent (in left.tri.lvclass) who is a child.

    Let me know if my explanation is not clear.

    Grateful for the help!

    Hello

    Yes, you can have a structure of the event in a Subvi rather in your main VI of top-level UI. The trick is to use the 'Save for events' and passing in references to orders that you want to have the event trigger structure for. The refnum output since the function is entered in the terminal of dynamic event of the structure of the event who could live in a Subvi. You can add instances of event where you will see these control events as dynamic events then you can do something with. These excerpts from shows all the code in a simple diagram, but the stuff in the structure of disable diagram could easily transformed into a Subvi:

     

    All this can be done without classes. What will buy classes you include the ability to encapsulate your screws and also perform different code based on what object on the hierarchy of the parent-child classes is on a wire. If the behavior of your code is different between 2-3 State and controls (which I do not know what state controls 3 you are referring), you can take advantage of the classes.

  • major error with the structure of the event

    IM under LABVIEW 13.0 PRO

    I don't know when this strarted bug happening, but now when I add a business to a structure of the event. Freezes in LabVIEW. I have to close labview with the Task Manager.

    It doesn't matter what code I'm working with, even a new VI, with nothing else than a structure of the event.

    I tried this on my desktop PC, my laptop and my CPU DAQ.

    The error occurs on my desktop and my laptop. But it does not occur on my CPU DAQ.

    Whenever I click on add event usually case, you get a popup to configure and add cases, but with the popup error never comes to the top and labview crashes.

    Theres no code to share the problem ocured when adding events to the event structure. It happened with any structure of the event, in any code, all the time.

    I spoke to an engineer of apllication of labview and suggested to delete the labview.ini file located in the installation of labview directory. I did this and the problem was solved.

    Still not sure what caused this to happen.

  • Structure of the event in primary vi and sub - VI with queues

    Hi all

    I have an application that uses the architecture of producer-consumer in which a queue transmits messages of a main VI by a Subvi, in response to the events of the user in the front panel. Inside the Sub VI, the queue is removed and treaty based on the corresponding message, and the result is displayed on the façade the sub of VI. User events are captured in the main VI using a Structure of the event. This works as expected.

    However, I also the controls on the Panel before the sub - VI to change the queue. My approach is to have another structure of the event in the VI sub for this. However, while the events in the main work of fine VI, events of sub - VI never treated.

    A simplified sandbox VI of what I'm trying to do is attached. As you can see, the main VI events are triggered as expected, but events in the sub VI are never triggered.

    I watched this white paper: detect an event in a Subvi from a high level VI , but it's not exactly what I'm trying to do. Instead, I'm just trying to detect an event generated within the Subvi. I searched this forum and found some research related, but none of them seemed to answer what I'm trying to do.

    Thank you

    Matt

    Your major issue here is the loop location.  While the structure should be inside the Subvi to make a message in the appropriate queue manager.  In fact, you should have 2 loops within your Subvi: 1) the QMH and (2) of the event loop.  You must use a user event to congratulate the event loop in the Subvi to stop.  You should NOT use the time-out of the Structure of the event unless you absolutely must.  And since everything in the Subvi is the message function, you do not have expectations.  They will be inactive (no CPU using) when there are no items to process from the queue or queue.

  • How to create a Structure of the event, repeating a task until a push a buttom

    Hello!

    I want to make a program that repeats a task until a push a buttom (indicating to begin another task). I know how to do this with a structure of the case, but I want to know how to deal with the event. Any idea?

    OK, I'm going to help you a bit.

    Here's how it works: the upper part (producer loop) will pass the value of the OK button (switch released) to the Message Handling loop (consumer).  When the button is true the consumer runs the code in the case of the real and enqueus another loyal to himself and then wait 1 second.  When the OK button is False, the value false is appeared on the front of the queue and the message handler runs if false, empty the rest of the queue and waits for the next message the event loop.

    The Stop button (by releasing Latch) exits the event and the queue is destroyed causing the Dequeue return an error and leaves the message loop.

    This is obviously an extremely simplified QMH.  To read up more about concepts go to file > Create Project > and click on the "More information" link

  • Control the Structure of the event with text file

    I'm new relativaly in LabVIEW (experience only about 2 weeks). I am currently control a stepper motor using a structure of the event. Similar to the sample code given by LIFA, I entered my settings how the engine not move away, then press a button on the windows before, and it works this way. I also have other equipment that works as well in LabVIEW, as a transnational step; all components operate individually.

    Now, I'm trying to make the more automated system and to ensure that all the different equipment work in the same code. So, I tried to implement a structure of the event using a text as an input file to try to control events. The text file has a table 1 d of numbers going down vertically (only the line numbers change). So, I used a table of index function to take the numbers one by one, use a loop (while loop in this example) to go to the bottom of the column of numbers. However, the event not register the change, even if the indicator shows the value is changing.

    Attached, it's my test code and the text file that I use to try to control the structure of the event. Please let me know what I am doing wrong. Thank you.

    Oh, now I understand what you tried to say. I'm using a loop and a case structure to activate different events with the entries in the table. I thought case structures and event were the same, but you taught me the event structures are used just for the façade stuff. Thank you all!

  • How to avoid multiple simple clicks in the Structures of the event

    I use the event structures in my program and I want to avoid the case when pressed by mistake on the button to click several times, because if the user presses the button to click several times the event is logged repeatedly and funtion within 'Change of value' is repeated several times as well. I want to avoid this scenario.

    Can someone please help in this regard.

    Well, there is the "Lock Front Panel up to that end case of event.  You may also disable the button until a timeout occurs.  Another option if you have LabVIEW 2013 or later version is to limit the number of event (option just below the locking of the front panel in the dialog box change events).

  • How to control the structure of the event

    What I'm trying to do, it's when the condtion is true, I want that the structure of the event to excute. But the event structure wil excute not except if he's changed the puch model, any idea how?

    It is more likely that he wants the sequence of events that he has set up to run after the result once changes.  If you change the logic to check the values after each numeric change (2), you will need to learn how to check to make sure that the latest iteration was not true.  Otherwise, it will start the sequence over and over.

    Really, you have to escape completely the structure of the event.  This isn't what you want.  Your code lends itself to a great state machine.

    You'll want to ask you a few things:

    (1) I want my code to run continuously or I just want to check double-digit times? (your code is currently the second)

    (2) I want the user to be able to stop my code once the sequence begins? (it is usually a Yes)

    (3) what I want 6 Road, path 5 or the comparison to happen first?  I want all run at the same time?  Do I need one before the other? (currently, you cannot predict what will happen first).

    You will need to understand the topics are: State of the machines, the flow of data, structures, business, calendar, and race conditions.  Now, you need to get you into trouble.

  • Front panel locked, but not due to the structure of the event

    Hi it LV community.

    I did a staemachine program that executes an oscilloscope (screenshot of a provided below... the State of the problem). I ran my program yesterday and it worked very well. Then, like a model, a dialog box opens and I just clicked on it in a hurry. now my front hangs as soon as I move the above-mentioned State "the Oscilloscope settings.

    As indicated, I have go a repeat loop that collects successive impulses of my oscilloscope and displays on the front panel (it works fine). In parallel, I have a structure of the event that makes the tail for the real-time feedback of changes to parameters that I placed on the façade (exodus of state change).

    Here's the problem: as soon as I State 'Oscilloscope Settings' using a Boolean button on the front panel for get me there, the front hangs... No event triggered by this point, and even if it did, I already deselected the "Lock panel until the end of the matter for this event" checkbox in the case where the structure menu.

    So WHY is my front lock now? Thoughts anyone?

    Read the detailed help for event structures.

    He urged that a single event structure serve in a VI. There are moments where more can be used effectively, but caution and a thorough understanding of the structure are needed.

    The problem is that you have several structures of the event in the various cases of the state machine and they are set to respond to the same events.

    When the button Set Oscilloscope, the structures of the event in the purchase Menu and home screen States receive the event. The two lock the screen, but only one of these cases may work. It can transfer control to the State of the Oscilloscope settings, but the other event responding to this same event structure maintains the locked Panel.

    The solution is not not to release any of the event. The default value is usually the best setting. The best solution is to spend on an architecture of producer/consumer (events). Who uses two parallel loops. The producer has the one and the only structure of the event and passes orders to consumer loop through a queue.

    Probalby want as the mechanical action on the buttons to lock when you press. Put kiosks inside the respective case of event changed value and local variables becomes unnecessary.

    Lynn

  • reset the timer using a structure of the event

    I wrote a simple code to count the second and the timer can be reset if I press the button "reset".

    It works; However, there are two problems,

    1. when I run the program, the timer takes 1 second to start

    2 when I press the reset button, the timer also takes a second to answer

    I think it's the 1000ms that is connected to the left corner of the structure of the event. Is there a better way to overcome this problem? (the timer starts and resets immediately

    When I launch the program and press the "reset" button)

    Thank you!!

    Dear ivy037

    You can make the time outside the structure of the event as in the attached code.  I would like to know if this is satisfactory.

    Thank you

  • At all indexes on tables of the same value in the structure of the event

    Hello

    I have a panel with the four bays and I use a structure of the event.

    Now, I want that change of the index of array_1 also affects the index of 3 other tables at the same index.

    But there is only a property "value Exchange" and no property 'index-change' in the properties of the table.

    So I read the 'index' property and write in the other table.

    But: It seems as if I have to do so within the period of waiting-section of the structure of the event.

    Is there another way to do this?

    Thanks for help

    You can use the mouse event on each table to detec the event (of course, that will attract not only a change of index, but I don't think you care too) and then use the 'values of the indices' property on all the table to set.

    See annex VI (LV2012), hope this helps

  • How to merge the event structures?

    I have a program of VI script that reads a text file of records and displays a structure of the event.  It works very well because it creates all the controls and indicators I need associated with the defined registry and code backend (i.e. the structure of the event).

    After I generated all this code, I copy and paste in the main VI I develop.  Everything works very well.  The only problem is that there are 100 text files from separate registry.  This means that I end up with 100 separate event structures.  Although it works, it takes a lot of space and I prefer to combine them.  However, each event structure has anywhere from 15 to 75 entries, so to do this manually is not an option.

    Is it possible to selectively merge the event automatically structures?

    I guess I could write a labview scripting routine that could get a reference to the structure of the event in VI, then merge... but part of the problem there is that there are a handful of structures of event I want to separate them just because they are not associated with the set of registers, that I mentioned.


  • down arrow key in the structure of the event

    Hello

    I use arrows on my keyboard to control program (UP DOWN LEFT RIGHT)

    Using the button down in the structure of the event, I know what key

    But I need to detect that 2 buttons are pressed at the same time make different case for this. I don't know haw to handle this.

    Any suggestions appreciated

    Keep a table of four Boolean values in a shift register, then turn on each element or off function on a key or key release events. The number of values Boolean true will show you the State of all buttons at any time.

  • structure of the event to turn on and off a LED

    Good afternoon

    I would like to activate a part of my algorithm according to the value in another part. To make it easier, I symbolize the value by a button and tried a structure of user event to turn on or turn off an LED located in another while loop.

    I can turn on the LED, but unfortunately I can't spend off of the LED thereafter.

    It is possible to change the structure of the event and select the option "change value". However, I would like the fatest way to turn on and off using the structure of the event and the Bay. I mean I would like activate a part of the algorithm only if the button is enabled for not having a continuous audit of the value of the button by the structure of the event.

    Please, if anyone has an idea to turn off the LED (after the switch on), add a comment without hesitation.

    I will be happy to solve this simple problem.

    Thanks in advance for your help.

    Ragards

    You have a race condition.

    When you click stop, it's a race about whether if the event gets not saved and destroyed by the removal of the stem all loop against sending the same user in the lower loop.

    Why it only seems to happen with the case of false must be a quirk of how the code is compiled and the order, it is run.

    If you put a step between your Boolean switch and LED, for me anyway, the error is now generated on the true case of the structure of matter (always false for switch.).

    If you put a constant error in the lower loop and wire while guaranteeing the Unregister event so that you now it does not run until the two while loops are arrested, then I don't see a mistake regardless of the value of the Boolean switch when you click stop.

  • Right-click in the structure of the event for Mac OS

    I put a right-click to activate a case of event (with the mouse down? function) in a structure of the event. It works fine in Windows 7.

    But when I try this in Mac 10.10. This does not at all.

    I connected an indicator in the "button" in the case of the mouse down and found the two clicks left and do a right-click returns 1.

    In Windows 7, left click returns 1 and do a right-click returns the value 2.

    Does anyone know how to activate the right click for the structure of the event under Mac OS?


Maybe you are looking for

  • NB100: Using BT/WiFi / 3G separately

    On NB100 to use 3G, I need to activate the WiFi/BT on the go, where I need 3G only, which allows WiFi/BT drain battery unnecessarily. Often, I need only to BT (for mouse) and don't need to use WiFi or 3G. I heard that NB200 can use BT/WiFi / 3G separ

  • Can I use a Satellite P840/019 keyboard in Satellite P840/00 s?

    From what I understand a P840/019 has a backlit keyboard. I can buy this keyboard separately from http://store.emprgroup.com.au/c-41707-keyboard.aspx here My question is can I Exchange my p840/00s with the keyboard and the use of the backlight functi

  • you want some advice on project

    Hi all I'm looking for advice on a course of im project starting soon. Information on the project: im going to have a computer configuration on say the otherside of the building which will be connected to a relay to turn the relay card.  I have a com

  • Errors, addition of Win7 workstations to the domain

    Greetings! I just started one already existing, although that paralyzed, installation of Windows Small Business 2011. Active Directory seems to be set up correctly, and I have no problems connecting to shared folders or devices by using the credentia

  • Startup error: RUNDLL error loading C:WINDOWS\melpre.dll AND Windows Explorer error - must close

    RUNDLL says "the specified module could not be found.  This error occurs only on the most operational of our user accounts (we have 4) Windows Explorer needs to close happens on each user: AppName: explorer.exe AppVer: 6.0.2900.5512 ModName: akagocel