help of event structure

Hello

Attached is a simplified version of my program, but that is the problem. I have labview update of a string, so in the program copied string1 to string2. When channel 2 is changed, I want that the structure of the event to turn on a light for 1 second.

It works if I manually update string2, not when labview copies a value in string2. For example, change string1 and string2 update labview does not raise the changed event string2, but if I type manually directly in string2, light works as it should.

Any ideas on how to change the properties or events so that the structure of the event resumes the value change when labview updates the string 2 and not only I type directly in string2?

Thank you.

Hello gemini,.

When you trigger an event in each iteration of the loop, you will always have the light...

-Create a valuechange event 'string' which triggers the string2...

-You need not wait multi-object when you use the time-out of the structure of the event...

-You must create an event of STOP button too...

Tags: NI Software

Similar Questions

  • Event Structure/AC help

    Hello

    I'm stuck... I have some difficulty to find out how to make my VI attached to behave according to the needs. The highest level 'EventStructure.vi' VI is an interface user of façade to a printing application label (using ActiveX). Loading the VI he sits in internally while loop until printing or buttons on front of output. If the product "select" drop-down has a change of value I love out to the special label for this product file and read a serial number from the label file variable and indicate the serial number on the front. I wish I had the façade VI keep this serial number that there is another change of the value on "Select Product" but right now it only he holds on the front panel so that the next time through the whole loop. Also, the string containing the path to the file of labels only holds in memory until the next time through the whole loop where it is cleared. Is it possible to have these values stored in memory and only change when there is a change in value on the drop-down list box "Select Product"? I do not understand that this behavior is the General event Structures work, but I am unable to find a better way to do it without using a Structure of the event. The sub - vi 'GetNextSerialNumber' calls to an external application using ActiveX and it takes a while (4-5 seconds) so that the application load and process the ActiveX controls so I want to just call the external application when there is a value change on the drop-down list box "Select Product".

    You need to store values that you want to keep in the shift registers. This will allow you to pass the value from one iteration of the loop to the other.

  • Reading of RS232 event structure

    Hello

    I use the Write.vi to read RS232 attached as a starting point and do RS232 - help.vi him. successfully, the original written 1 posts, then wait a little, then reads 1 message. What I'm trying to do is to be able to read several messages. So I would write 1 message and I would read 1, 2 or 3 messages back or however many messages to ever come back, I guess that.

    Here is how I modified the original vi to get where I am now:

    I tried to add a structure of the event around half 'read' RS232 program. My structure of event triggers when the bytes to read the changes, this value can range from 0 to several bytes to be read, or muliple bytes to read 0. Up to half of the time I would trigger and not need, so I then added the accession of case which only works when the bytes to read the value is not 0, which means that it must be something waiting to be read whenever the program inserts this box. (I hope that's clear).

    At the moment, my program will not read and I don't know why. Through the program of first base, I can read and write properly. (I just hooked pins 2 and 3 on my cable so I read everything I write for testing purposes). So I know that the problem is spoil me the 2nd joint program

    Any help would be appreciated! Thank you.

    EDIT: I added 2 .jpgs incase you are on an different labview version.

    Better.

    But I don't think that permutation of the structure of the event for the structure of the case actually has really helped what.  In fact he madet worse.  You had the case of locking Panel event before the value until the end of the event.  But with the structure of the event within the structure of the case, there is a chance that the structure of the event will never run and therefore the façade will be locked up forever.

    1. you want to only 1 VISA close.

    2. event structure has been set.  I also added an event for writing switch is restored.  So now, it'll write if you change the channel or when you turn the switch to True.  (Note, you will not be able to always send the same string as in the original example because you must press the power button or change the channel.

    3. I used the structure of the event to stop the loop of both Scripture by trigger on the event that the button is pressed.

    4. I don't know what you mean by a «black» read

  • Two loops of event Structure: hang

    Hello

    I have a wired problem when I try to use two loops with two event structures (see VI below).

    The problem is that you can stop the measurement and close the VI with X but not to stop it only with STOP button: this would lock the façade.

    Here my (rather long and perhaps not quite understandable) description of VI:

    A structure must respond on the user interface and the other a certain action. The first uses only user events: change value button START, PANEL NARROW? and the value enum STATE changes. The second event structure uses those registered dynamically: start the event user & user close event. Action when the STATE changes from button should always be done. When you press start the startup user event disables the START button and activates a loop in the second structure that should make continuous measurement. Now, we can always change the STATUS button and information (this works). The measurement loop should stop if the STOP button is true. Later START is enabled again and we should be able to press START again. It does not work as the front panel is locked. Curiously the last implemented user action works very well: by pressing X of VI, the PANEL CLOSE? is called in the first loop and should stop the two loops: If the measurement loop is running, STOP is True first, stop the loop measurement. Then a secondary structure event waits until the JUDGMENT is again set to False. If the measure is not in the process of running the first loop stops. In both cases, the event close user is sent to the second loop, successfully stop.

    I'm really confused, because I have no idea what is wrong. I would greatly appreciate any help on this.

    Best regards

    Daniel

    Thank you very much! This solves the problem. I did not understand that structures of events queued events even if they are not "active".

    (Finally there is even no need one notifier, you can just change the value of the real STOP button and will raise the event close user, comapare attached, work VI)

    Thanks again,

    Daniel

  • Clear VISA with event structure

    Hello

    I have a number of virtual serial ports of bluetooth as stream very quickly as soon as you open them with VISA configures port. I have set up/open these ports one after the other and it takes a lot of time (2 min), I think it's because they are com ports virtual bluetooth.  However, as soon as a single port is open, the data streams in and fills the buffer (eventually crashing the program), while I open other ports. I was invisioning something similar to an interrupt driven microprocessor to erase the buffer whenver it exceeds 2000 bytes to the port, my friend told me about event structures is similar to interrrupts. So, ideally, I would like to create a user event customized, defined by the property (bytes to the port) of a VISA com port node when it exceeds 2000 bytes. I would like just to run code that was going to free the buffer when occurs the same. Seems like a simple idea, I searched and did not find what I wanted to do.  Any help would be appreciated

    Thank you

    Chris

    Its delicate, but I think it would work.

    LV allows multithreading, so you can certainly run screws in parallel which are completely independent of each other.  But the challenge is that your code cannot access the same COM port simultaneously.  But the way you described the problem, which could be circumvented.  I think your 'COMPortMonitor' could sit and wait for each port to open before their follow-up... so that your main loop before opening the following COM port.

    Here's what the flow would look like:

    VI of HAND PORTMONITOR.VI                                      

    0 Begin execution of this

    1 separate launch PORTMONITOR.VI

    2 open COM1 begin implementation of this loop

    3 tell PORTMONITOR COM1 is open

    4 begin to monitor COM1

    5 open COM1 empty COM2 buffer when it becomes large

    7 tell PORTMONITOR COM2 is open

    8. start monitoring COM2

    9 empty COM1 & COM2 when they become large

    10 stop this loop when last COM is open

    11 more...

    In step 5, your parallel loop will work with COM1... so that your main loop is busy opening COM2.  In theory, I expect to run independently.  And you can try to put them in separate threads, too.  This links talking about parallel loops in series:

    http://forums.NI.com/T5/LabVIEW/multiple-parallel-asynchronous-continuous-serial-visa-reads/m-p/8090...

    BTW: I think that you must ensure that your VISA application is asynchronous to operate (right-click on them).

  • How to raise events from within an event to an another event-structure

    Hello

    I have two events-structures (struct1 struct2) that are running on the same parallel of time in a loop.

    Currently there is a keydown event in struct1, so when I press a button, then the corresponding event runs in struct1.

    STRUCT2 is used to execute a custom-Petite runtime menu entries.

    What I want to do is to choose a menu entry (which runs a struct2 event) and the of inside this event I want to trigger an event in struct1 (means simulates keypress?).

    Is this possible?

    Thanks for the help

    Use the event to the button, not the keydown event.

    Then in the second structure of the event, use the Value property (signs) of the ok button to trigger the value Change event.

    Felix

  • help on event data node

    How do you find help on the various members of the node of event data in a Structure of the event.  For example, 'Time' seems to be a number of seconds after a few references, but I can't find any help about it.  Thanks in advance.

    The help is there, but buried.  Consider an empty event Structure, which looks like this:

    Buried using the event Structures is this Note: for more information on the elements of event data, click on the Details link in the case of subjects of class descriptions of the event control, Application componentand VI .  Note the three links (to get help).  Timeout being event pane ID, I clicked on this link to get to the Help Page of Application events, where, under the first registration, Activation of the Application, there is a link to Details .  By clicking on that got this:

    who says that time parameter is simply the clock of millisecond corresponding to the time where the event occurred.

    Yes, the information is there, and Yes, Altenbach is true it might be just a little more accessible...

    Bob Schor

  • event structure and while loop iteration

    Hello

    It took me time to identify the problem I have, but I think I've nailed it and need help to solve.

    I am right to say that a while loop that contains a structure of the event will travel only once and then wait for another event to occur before a loop again?

    The question I have is that I need mark to a timestamp of a data acquisition driver (DataTaker) value, and whenever he changes the Labview event structure would take care of the rest of the incoming data.

    So is there a way to make everything in continuous loop on questioning my value of timestamps from my Datataker driver so that I can create an event Value (Signaling) for the Structure of the event to take care of?

    Thank you

    Richard

    Two options.

    1 put the stuff event to query a regular base in its own while loop that runs in parallel to the loop containing the structure of the event.

    2 put the stuff that you need mark in the case of delay of the structure of the event and a thread time-out value in the upper left corner of the structure.  Now, if no event to occur in this time, the structure of the event will run the case of timeout and the loop will iterate again.  The only problem with this method is that the case of timeout to run irregularly, or never at all if it turns out that events come more frequently than the timeout value.

  • 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.


  • Event structure/state machine

    Here's the scenario.

    I use the buttons controlled by the user in an event structure to control a state machine. Currently, I have a different State for each button. However, 4 or 5 of these buttons could ideally correspond to the State, which is what I would like to get... Each of these 4 or 5 buttons causes flow data and the results are stored in a table, but listened data are different for each button! Therefore, if each of those 4 or 5 buttons caused the same condition occur how I could decipher what button was pushed? Ideally, I would have 4 or 5 different paintings once all the buttons are out of the same State.

    Is there anyway that I can achieve this?

    Hi the shots.

    you have access to the refnum of the element inside the event. With the Ref, you can simply get the name or any other property of the control to distinguish them.

    Mike

  • Structure of the event in the event structure

    Is it possible that I can have a structure of the event, which is in another structure of the event? When I run the code, I can't use other buttons. (See chart for details)

    Do not put the event structures in the structures of the event! There is never any reason to do so.

    Redefine architecture your code in a correct state machine.

    (By default, events lock the façade until the event ends and if you raise the event internal or external, first of all, the other event can never fire because the current event can never accomplish or is inaccessible by data stream.)

  • mouse event structure entrance decoration

    I want one of my events in my event structure to detect my mouse entering a specific decoration that surrounds a control. I used the property pane to find what decoration is # but now I don't know how to call this specific décor as one of my events.

    The goal is that I want the user to have pushed a button to make a data folder before hitting to start generating data. I need the user to get an error message that they did not create the folder if they get even close to the Start button. I don't want to get the error after what they already hit early, because my Start button is linked to the data to a network variable that will get the ready message even if my host program has generated an error.

    Decorations of the façade are not the type of objects that can be associated with events.

    I think you have several options.

    1. follow the mouse move event and to compare the coordinates of the mouse with a few constants that you set that based on the location of the decoration.  This seems to be a large number of polling stations.

    2. not to associate your button start a dependent shared variable in the network.  When you press the Start button, make your comparison, if that's OK, and if not, the error.  If it is allowed, activate another hidden Boot button that is associated with your shared variable.

    3. use the mouse down? event on the Start button.  If you find that it is not a valid time press the button, ignore the event.

    4. use the event mouse input on on the button itself.

    5. use the event mouse entry on another button, which is located behind the actual button.  It could be transparent, or disabled, or disabled and greyed.

    6. If the button get press, the program automatically creates the folder for them instead to raise a dialog box and forcing them to manually.

    I think #6 or #2 would be the best option.  As a user, I would find it quite annoying that whenever I swept the mouse over an area of the screen especially involuntarily to have a pop up dialog box.

  • Output of the application using the event structures

    Hello

    In my project I used event structure that works well.

    Now I want to exit (close) demand when I press the EXIT button on the front.

    Here, I joined my project as an indication.

    Concerning

    Hari

    Hi thinnker,

    You must change the configuration of node Sub VI for this... This, then it will open whenever you call...

  • Which situations give an event structure do not capture a Boolean value changes?

    LabVIEW 9 x 86

    Windows 7 x 64

    I have an event structure that works very well.  It has 5 cases, each triggered by a change in value of various indicators.

    I added another case of event, I'm trying to raise the case of the event with the express control "Out of time", I made a deal to raise when the Boolean value "out of time".  The structure of the event does not run when the value changes.

    In addition, once figured out how to make this indicator to trigger structure of the event, I would like to only trigger when the value goes from 0 to 1 and not from 1 to 0

    Search the forums for "event to change value" and "value traffic".

    The value (I guess you have on the structure of your event, bar header you seems to miss information.) the change is triggered only when the user enters new data in a control, or you write a new value programmatically by using the Value property node (signaling).  Completed just by a program written for a local variable, or do not ' value' property node.

    To trigger that in a sense, you can put the code in the event of a case within a case structure so that it runs only when it it True (or False, if that's what it takes.)

  • The quit event structure works when I switch the cdaq to crio

    I changed my structure of producer of written consumer 2009 for use crio in 2010 and my event structure enough work. The event source is the same.

    Panel controls raise no events on targets in real time as the cRIO, as these systems have not really accessible facades by the user.  When they do not display a façade, it runs on the separate development of the cRIO system; LabVIEW just give a homogeneous appearance.

Maybe you are looking for