Loops Parallels and Structure of the event

Hello

Is attached a valid way to the use of the structure of the event?  I keep hearing that the case of the event should include control of the event.  Can the control be placed elsewhere?  For example, if I have 2 loops, I placed a structure of the event in the 1st loop and control associated with the event in the 2nd loop, is there a potential problem?  It is true that no matter where a Boolean with a value change is read, the Ministry of value in the event structure will be fired?  See attachment.

This screenshot you posted should work for you fine.

The main reason that you hear the case of the event should contain the control for the event is so that the control is read and for locking of Boolean values, gets reset when the case of events runs.

Here since the first parallel loop runs (assuming nothing else in the loop causes the loop to get blocked), the stop button will read and reset.  The value change event will always be raised in the upper structure of event loop.

Tags: NI Software

Similar Questions

  • Control of the event: how to stop the race while loop within a structure of the event

    Hello

    I have some problems with control of a while loop inside a structure of the event (see annex VI).

    I have 3 buttons (the "Start measurement, stop, exit the program"). When a measure is running, it should be possible to stop the measure by clicking on "Stop the measure", but it does not work.

    Someone at - it an idea?

    Thank you very much and best regards,

    Michael

    Hi Michael,

    create a process parallel to your measurement. You can use the design model "producer/consumer with vents. You'll find it with «File-> new...» ».

    Another possibility would be to remove the "lock frontpanel" sign, in the case of event start measurement.

    Mike

  • problems with timing in a time loop in a structure of the event

    Hello

    I'm using labview to control three motors stepper, running the three stages of different translation in different axes (X, Y and Z). Please see the attached VI, focusing on the structure of the event on the RIGHT side.

    In the Z axis, I am trying to run the engine for 5 seconds, after clicking on a button. I have attampted to do by adding a sub of elapsed time VI within a while loop, located in the tab 'Mouse before Z down' the structure of the event. A similar "elapsed time while loop" is also included in tab 'Z reverse the mouse down' the structure of the event.

    Separately these "elapsed time loops" work very well, BUT when I run a Z direction after another, say 'Z Reverse' and then 'Before Z' then they annoyingly interact. The calendar is gone, with the moment where we add, rather than rebooting.

    No idea how I can reset the time elapsed while loops? Or is there another method better do?

    Thank you very much

    Charlie

    charlieryan wrote:

    I take a wire from the 'i' of the while loop at the entrance of the Sub autoreset - VI of tiem will blink?

    No, connect you to the "reset", not "autoreset".

  • controls and structure of the event

    I currently have a while loop that works in data flow.
    I'm hoping to change this work like a while loop and inside the while loop. It will have a structure of the event.
    Currently, if the ONLY STEP is set to TRUE.
    Then, he will enter a mode of manual programming.
    If I press CONTINUE. He will return to the automatic mode
    If I press ADV. He'll jump the current position.
    If I press stop. It stops at the current position
    If I press ADV & STOP. It will stop the program
    If I press ADV & STOP & DELETE. It will stop and remove the current log file.
    I don't know if anyone can point me in the right direction.
    It seems that its impossible?


  • Stop the execution of a loop in a structure of the event

    I tried searching the forums to avoid posting a duplicate, but more I couldn't open most of the vi as they were higher.

    I put in a dummy while loop in an event structire I intend to use. Once I have begin to execute the while loop, I am not able to stop using a control for some reason any the fornt panel control.

    I am not able to change the vale of the shutdown command at all. I tried to create a separate event for the STOP, and I still couldn't stop the program when the While loop was running.

    I guess I'm missing something really small. I would appreciate your comments on this.

    Thank you

    Nevil

    Right-click on the structure of the event and choose 'edit events' in the case that gives you bad.

    Make sure that the check box lock the front panel is not checked.

    I suspect that yours is checked, so your front is locked until the end of the event, so you can never stop your loop.

  • Structure of the matter and structure of the event with a condition of the indicator (boolean)

    Hello

    I read a lot of posts but I can't solve my problem. I would like to set up a business structure and the structure of the event, and the condition to run the code inside is a Boolean indicator, in this case called Wahnelt (screenshot). I know I should use signal value, but I don't know how to implement. Here is the program:

    Any help will be more thankful

    a state machine with timer elapsed...

  • Produce data of a loop with a structure of the event

    I'm relatively new to Labview programming (as discussed in my program below). I found a vi online which collects data from an analog USB card to 9237 bridge. The upper part of the vi is which collects the data. The original place the output into a chart, but I changed it to a digital indicator.

    The lower part, trying to get the operator to use the start, stop, buttons to interact with the system to reset. I used an event structure to do this. It all works well, except the event that the value of the load of data (from the loop above) cells. I want to follow up on the new value continuously, but is only once. All other features work fine. Can someone explain how I would best accomplish this?

    Any help would be apprciated.

    Why do you use a queue to pass data to a loop at the other?  The reason why it doesn't work once, it is the lower loop will wait until an event has occurred.

    I would eliminate the queue.  Wire the Total in a property for the total value (signalling) node.  That will trigger the occurrence for Total: change value event.

    Don't read property nodes in the upper loop when you have indicators and the son here to read from.

  • How to control a VI (with a while loop and a structure of the event) from an another VI

    Hello

    I have the main VI which I want to be driven from an another VI. But I can't do that and I don't know what is happening.

    For example: VI main, I have a while loop with a structure of the event, there is a Boolean controller controlling a Boolean LED, which is inside the structure of the event. And the other VI, there is just a Boolean controller and functions of applications to open the main VI.

    How can I control the Boolean LED in VI main, changing the State of the Boolean controller in an another VI?

    Thank you.

    There are different options, but depending on what you want to do. For this example I can't give you a specific solution.

    I do not understand why you do what you do. Why do you call your 'principle VI' dynamically? What is the advantage to do? There are also other ways to call a VI dynamically, based on real cases (for example the method "call and forget", etc...).

    In you principle VI, control you Boolean ("THATCHER") is not the case of corresponding event. This is not usually a good practice, keep it inside.

    Also, why you try to communicate with the caller and callee VI through such a way to twist? There are better ways to do it.

    In one of my projects, I use the user event to launch orders in case of case of appellant VI.

    some Associates more readings for you:

    http://www.notatamelion.com/2015/03/23/how-to-make-dynamic-subvis/

    http://forums.NI.com/T5/LabVIEW/Dr-Damien-s-development-event-structures-III-communicating-with/m-p/...

  • Structure of the event inside while loop

    I'm still fairly new to Labview and this may seem a simple question.  I'm doing a Subvi to display, edit, and create configuration files.  I use a ListBox to list all sections of a config file and structure of the event to update the values in each section, when they are clicked.  The problem is that the structure of the event seems to be a break the while loop so that the buttons do not work until the event has executed.  What I would like is the while loop to run continuously and the event to run only when I click in the listbox control.  I hope this makes sense.  There is a peak in the diagram below. Thank you

    There are a number of issues with your code that could cause problems:

    1. You must use the FP. Open method to open the front panel of a VI and of the public Service. Close method to close. I don't remember exactly the problem, but starting with the 7 worm nor indicated that these methods were the preferred way to perform these tasks.
    2. Based on what seems to be the code, the event for the control of Presets of wood should be a change the value - not a mouse down event. After changing the type of event, use the event data NewVal to drive the indexer table index entry.
    3. The buttons Ok and cancel them should be handled in their own events to change the value. The value change event Cancel would exit the loop, while passing the output error (which indicates that cancel was pressed) and default values for the other 4 outputs. The change of the value Ok event would leave the loop by passing the values that the operator had concluded the 4 controls on the front panel.
    4. An event of timeout with a very short time (1 msec) would stop loop if an error has occurred, or the output of the gate AND is set to true.
    5. The wait function is not necessary, as is the case outside the loop structure.

    Mike...

  • structure of the event

    Hi, I'm new to Labview. May I ask - is it possible to use 'match model' within the structure of the event to detect the shift? For example, if the event detects 'one', it will go in the first round, if detect 'two', it will go to the second event...

    Your help will be very appreciated! Thank you..

    Hello Yee,

    do you really need events and structure of the event at all?

    Why not just use a structure case manages your values according to a the string received?

    Like this:

  • Doubt in the structure of the event

    Hi all

    I am developing an app for my instruments that is user interfaced.i am new do VI architecture. In my program I use architecture producer and consumer, structure of the matter and structure of the event. In this framework programme first four are working properly, but the fifth framework structure of the case does not good. I have attached my program then please read it tell me what I did wrong?

    Thanks in advance

    Here is an example. Sorry, the pattern is a little messy.

  • Several loops in the structure of the event

    Hello

    I am writing a program that uses data from an aerial camera to control a robot differentially articulated around a track. I'm new to LabVIEW and I have a question to get the structure of the event and while loops to work as I want. My code currently has three while loops, running in parallel, to treat the image in the necessary data, one to use the data to locate the robot and the last to issue commands to the robot. I'm trying to add in a Subvi calibration that will recalibrate the camera early upward, and whenever the user clicks on the calibration button. Basically, I want to stop/pause the three while the curls then run the Subvi, then start the loops up using up-to-date data of the Subvi.

    I thought that a structure of the event would be the best way to do this, but I can't seem to make it work properly. I have provided a fake version of the main VI. If someone could point me in the right direction on how to do it and also if anyone knows a good place for the tutorials for this sort of thing that would be great.

    Thanks in advance

    ~ Nick

    Thanks BowenM,

    I'll look in producer/consumer architecture and see if I can make it work.

    ~ Nick

  • Structure of the event with gray and disabled controls

    I'm working on a data acquisition program that uses the structure of the event to manage the graphic user interface.  I have a 'start logging' button that raises an event when the value changes and starts to collect data.  While collecting data, the program disables and gray on all controls on the front panel except the button "stop logging" that ends a while loop with in the event of data logging.  If this event is active only when you press "stop recording."  There are other events that are triggered by a mouse up/down, action others controls disabled on the front panel.  The problem is that, while the program collect data if you click on one controls disabled and gray that has a mouse up/down, event, the program seems to hang and will not push the button ' stop logging.  I don't know if his attempts to run another event, but he continues to logging data, I just can't stop it.  I have to use the Cancel button to stop the program.

    The real problem is that a control, even when disabled and grayed out, can still trigger a mouse to the high-low event - controlled, it true?  Also, what happens if an event is raised during execution, another event my understanding was that a single event can run at a time.

    Thank you

    Doug

    Doug,

    By reading between the lines, here a bit...  Looks like you have your data collection and logging code in the box to Start Logging event.  If so, this is part of the problem.  No other case of event cannot run until this one is over.  Move data collection and the registration code to a parallel loop.  Have this loop to sit in an inactive state until you press the Start Logging button.  Then, in case for the button change send a command via a queue to the loop of logging and out the case of the event.  The event loop is then immediately ready to respond to the next event.

    Generally the code within a case of event should run quickly, no more than 10s of milliseconds for maybe 100 ms to avoid slow response to another event.

    Look at the producer/consumer (events) design pattern which comes with LV for an example.

    Lynn

  • Can I detect and handle an event already within a structure of the event?

    I have a VI that would do what I want, if I could detect and handle an event of second mouse click while I'm already handling a previous event (selection from popup menu).

    I hope that the picture is clear, but in words what I want is the following: I have first right-click on a chart and select a context menu item, which specifies a graphic manipulation of properties.  Often, this manipulation requires clicking on a second graph to get a reference (for example if I want to copy some of the properties of the first chart on the chart of the target).  It is, it means I'm trying to detect a second event already within a structure of the event.

    I think I could do with a state machine and some registers at offset, and if it's the easiest way, I'll do it.  I would be interested to know whether, if there is a way to detect and manage events 'nested' as I suggested.

    Thank you!

    Your code is not really that complicated.

    Yet, the problem is that confuse you it upward with the main state machine. I would use it in a small parallel loop that only manages events associated with the menu shortcuts. All this should be able to run in parallel in any event, even if the main loop updates the data in the chart at the same time, for example.

    I don't like the dialog box, it hampers the flow of work, but if you use it, use two button dialog so that the user can also cancel if necessary. Instead of the dialog box, you should just temporarily move the cursor on. I also do little to check before operating on the second graph of reason and give a time limit for the second operation.

    Here is a quick project to a more atomic shortcuts Manager. Modify if needed. There are probably bugs.

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

Maybe you are looking for

  • Blu Ray error "Mediasmart DVD does not support playback of Blu - Ray disc on a virtual device"

    Blu - Ray has suddenly stopped playing Blu-Rays, with the error message "Mediasmart DVD does not support playback of Blu - Ray disc on a virtual device. A Blu - Ray disc must be inserted into a BD - ROM drive for reading. » I don't think it's a hardw

  • Computer sees the USB devices that are not there.

    Original title: having trouble with my usb ports A usb controller named USB Mass Storage Device seems to be find ghost devices plugged into my machine. I don't know whether to disable it or uninstall it. Whenever I try to work with it it says that wi

  • Using my laptop as a SOUND system.

    My laptop is running Windows XP Pro.I have 5000 LifeCam installed and using a USB port.  I can set the parameters of 'speech' in the control panel to use the LifeCam and properly train the microphone and testing of the cheek through my speakers very

  • LaserJet M1536 ToolboxFX error

    HP LaserJet M1536dnf MFP C24F1A.  I have a new Dell inspiron N7110 computer Windows 7-64 bit.  Switch from a USB connection to a wired (Ethernet network connection).  Everything works including network, printing, scan etc, except that I can't get my

  • AMD WIN7 DRIVER FOR HPPAVILLION E038TX

    I haverecently bought computer hp laptop Pavilion 15 e038tx. It comes with 4 gb/500/3 rd gen amd of i3/1 GB graphics card. I was shocked to see that there is no driver for win7. If I use win8. I tried all the drivers of win8 on win7 64. they work per