A structure of the event within a certain time out loop.

I'm relatively new to LabView and in particular the structure of the event. I was looking at the previous posts regarding the structure of the event and the difficulty to stop people. In my VI, I have two cases of event besides the time-out. I use this VI for control of stepper motor. I have 2 buttons (for each case), a movement to the left, the other to the right. It works as it is supposed to, but when I try to turn it off I have to press the two buttons before it stops. As if the loop should run everything inside before stopping.

In my VI, how can I do the execution stops when I press the stop button? I tried many configurations of the stop button and boolean logic (which I believe was correct), but I am now stuck.

Thank you very much

Alek


Tags: NI Software

Similar Questions

  • backup to the spreadsheet after a certain time out loop

    Hello

    I am writing a program that generates an analog signal, transmit to the Schmitt trigger, then puts the original signal and the outbreak of the output signal in a waveform chart. Then, he must produce a series of data in a spreadsheet file after the end of the loop.

    I got the thing to a chart of output waveform and stop it with a button, but I can't go out like a spreadsheet file. What should I do? I put both sets of output in table 1 d, but after pressing STOP, it does nothing. If I am the Save to table vi in the while loop, save them quickly triggers, but after only the first iteration.

    The analog 'noisy' is a generator of signals using a function that is rendered in a Subvi and imported in Untitled 1.

    You have a stop inside your Subvi function. No point at all with that.

  • structure of the event within the structure of the case? error or limitation of LabVIEW?

    Hello

    I am trying to reach a structure of the event within a box structure. The event is triggered by a mouse event (mouse down, move to the top).

    This vi tries to simulate behaviour of the device with a sensor, so the mouse triggered the structure of the event, won't be there in real working environment, so I can't remove the structure of the case.

    But as I noticed that if I try to click on the drawing (that my mouse events are triggered with) before activating the Boolean condition of 2D, I can access is no longer the component front (button, leads, etc.).

    They seems to be frozen. But if the case is true before you try click on the 2D drawing area, everything seems to work well.

    Is - this protected by a kind of LabVIEW bug or there is a limitation?

    These are my screws.

    Thank you

    Hello Nefertari,

    Use a Standard Architecture.

    I changed the code. I hope now that its fine.

    Please find the code updated the joint.

    LV 2012.

    Kind regards

    Leila

  • Structure of the event within the structure of the case run once

    Hi all

    I am a controller using myRIO and labview where the program compares a value of the probe in a "Preset" and then choose a structure case depending on what type of air supply is required. What can be seen on the picture, for example, is 0 if saturated air supply is necessary.

    The structure of the event is used to send a signal to step to the stepper motors to open the valves (closing is still pretty much in the same way). In any case, the event turns my valves 90 degrees. I read the sensor all a second, however, when the case remains unchanged, the case runs the event again causing my engines running at 90 degrees per second (essentially continuously). What I'm looking for is a way to send the signal to step only once until a new case is selected.

    He is not on the photo, but this is all within the large loop.

    Apologies for any bad/cringeworthy coding, it is literally my first program always using labview. I can post the full VI if you need.

    Any ideas would be very appreciated! Thank you

    Simos wrote:

    crossrulz you have a simple example by chance that uses the feedback node?

    See if that helps

  • A certain time out loop that depends on the other a case structure.

    I did a lot of research on this subject and I think that I reduced the precisoucly of the problem. I want my user to enter a password, and if the password is correct the alarm does not sound. But if that's a mistake, I want the alarm to sound. The problem is that I have no way to tell the alarm to stop the sound when the user enters because the sound is locked in a while loop . I can't seem to do this then that stop the loop for some reason when the user enters a new number.

    I would be very grateful to you, the Aboriginal people if you could help me out here. On the VI I said where is the problem. (The problem occurs inside while loop).
    If you guys have any questions please let me know and I'll try to answer them to the best of my ability.

    All entries for the while loop that are outside of the loop do not change after you enter the loop.  So if the first loop has a 'fake' wired into it, which means not to stop, he will never stop.

    You will need to have something out there that reads a new value every time.

    I must say that it looks like the structure of your program won't work, however.  The structure of the event above can shoot outside while occurs only once each time the large loop, so right now he can never more touches after a 'real' in case of emergency structures, enroll you in the lower part of the block diagram.

  • Structure of the event - controlled motor not variable

    I have a state machine that includes certain structures of the event. These event structures are used to control stepper motors using an Arduino Mega microcontroller. I'm using labview in 2012.

    The entrance to one of the events is the variable "pour the entry. I want to use it to control the motor speed and direction.

    If I control the motor as shown in the attached image Working.jpg, then the motor functions correctly. If I fix the motor to the steps variable # then the engine moves at the speed set in the right direction depending on whether the entry "pour" is positive or negative.

    However, I want to control the speed of the engine, not the number of steps, with the variable "pay Input". I checked that the values read by the indicator image INPUT_VALUE works do not are of the same order as the specified values, working, by using the "Set Speed". When I connect the value of the entry to the spindle speed of the motors of the Arduino (not_working.jpg) icon, the engine is running, apparently indefinitely at maximum speed. I don't understand why there is a difference in motor behavior between the value provided by these two methods at the entrance to the speed of the motor. I am confused by the present and don't know where to go from here.

    The structure of the event somehow behaves differently when taking a value from outside the structure to this data inside? or y at - it something to do with the opening of the structure on its first loop?

    I have also attached my vi together, even though she may not be the easiest to follow and requires an arduino Mega to run.

    Carlr wrote:

    I have a state machine that includes certain structures of the event. These event structures are used to control stepper motors using an Arduino Mega microcontroller. I'm using labview in 2012.

    The entrance to one of the events is the variable "pour the entry. I want to use it to control the motor speed and direction.

    If I control the motor as shown in the attached image Working.jpg, then the motor functions correctly. If I fix the motor to the steps variable # then the engine moves at the speed set in the right direction depending on whether the entry "pour" is positive or negative.

    However, I want to control the speed of the engine, not the number of steps, with the variable "pay Input". I checked that the values read by the indicator image INPUT_VALUE works do not are of the same order as the specified values, working, by using the "Set Speed". When I connect the value of the entry to the spindle speed of the motors of the Arduino (not_working.jpg) icon, the engine is running, apparently indefinitely at maximum speed. I don't understand why there is a difference in motor behavior between the value provided by these two methods at the entrance to the speed of the motor. I am confused by the present and don't know where to go from here.

    The structure of the event somehow behaves differently when taking a value from outside the structure to this data inside? or y at - it something to do with the opening of the structure on its first loop?

    I have also attached my vi together, even though she may not be the easiest to follow and requires an arduino Mega to run.

    You have a very inappropriate design of "state machine" - even if you do not have same event in more than one of your structures of the event (in addition to time-out), looks that get some of your treatment to go forward until you get something very specific (and in which none of your other user events are being processed).

    I strongly suggest that first set you design of State machine - perhaps follow producer/consumer Design Pattern (events) rather than having everything in a loop, the way you have.  If you keep everything in a loop, you should consider redesign so that you at least allow events to deal with rather than stay in a loop for an indefinite period!

    In any case, in the case where work, you send variable "Set Speed (steps per second)" for engines step by step write vi.  But otherwise, you're feeding 'Entry for' value - are they the same? And to let you know, you send only command "write" step by step when the input value to be paid.

    It's a big mess!  For starters, look at the attached picture, get rid of your structure of the event that has "for the entry" and replace it with what I showed in the picture. (In fact, all your event structures can / must be replaced with a similar logic.) Does not need the event structure in all this, you're just more complicated it must be!

    -DP

  • How to use a structure of the event in a Subvi

    I am using a structure of the event within a Subvi.  The Subvi has a table constructor that built tables and the structure of the event is used so that when the program runs, it allows you to change the elements of the array.  It works, but when I apply within a Subvi, it does not work properly.  This goes into a Subvi, because it will be part of a much larger progrram, so it must be modular.

    If you are using a structure of the event, it is not a Subvi.  If you worry about modularity, you should not use the structure of the event.

    You seem to have a fundamental misunderstanding of modularity.  An event structure must be placed in a while loop.  If you have a while loop in a Subvi, you have transferred control of your program to the Subvi.  You are not at this stage modular.  Your higher level GUI has no control.  You would have to create a stupid system of variables to pass data down to the loop to stop the loop and return to your main VI.  This is not a good design decision.

    Instead of searching for a way to make something broken, you should spend effort trying to understand what you really want to accomplish.  You should also spend some time to learn how to work the event structures.

    This application is small at the moment and it is already on the way to the unreadable.  It's a terrible thing to do for you.  Break these habits now.  variables are only when absolutely necessary.  Using subVIs to accomplish individual tasks, do not run the entire application.  With the structures of the event, use a value of stop button change event for will not be held hostage to the time-out.  If your variable is '2' in it, you're doing something wrong.  It has to be something different between set points, put it in the name.  If you want to make the subVIs, create an icon.

    But first and foremost, invest time in understanding dataflow

  • 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

  • manipulation of refreshment of the variables within a structure of the event?

    Hi all

    Here I have my problem: I implemented in a data visualization tool, a button to get the updated file.

    But as the mail application provides new files every 2-5 seconds, I wanted to also apply a function to auto-refresh, so that the file is retrieved every XX seconds.

    I've tried several, solution workaround naïve perhaps, but the problem is that when I start the "auto-refresh", I can't handle anything else in the Control Panel, and I can't change the value of the "automatic update control ' because no doubt... He's waiting. Please find attached the photo.

    What Miss me?

    Thanks in advance,

    Edo

    Hey Edo,

    You can use the event to wait for it. Do not use a wait within a structure of the event function.

    Mike

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

  • 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

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

  • 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

  • An interrogation continues with the Structure of the event, please help me understand

    Dear Forum,

    I'm 3 months in LabView. I created a front panel with what I consider a reasonable set of code below with a basic entry control power boulean a case controlled set of actions. I enclose a strongly striped version to the bottom of this structure with sections deleted button so that the executed code is removed to simplify just ask questions on this control structure. After the recent webinar, I understand this form of control to call a continuous structure of vote - and it makes perfect sense and seems natural for me to the point of programming of data flow.

    But according to the webinar it is preferable to use the structure of the event.

    However, the structure of the event seems really weird to me. My main question here is certainly the structure of the event MUST be voting each of the values itself anyway, otherwise how does he know that an event had occurred?

    So what is the difference between explicitly "polling" the buttons myself with a while loop and using a complex (for me) of the event with 'hidden' polling stations under?

    The vote of the 4 buttons in my example should be done at the same time if Labview is truly multithreaded/parallel? There should be no difference in the level of the computer between my code querying and the code 'hidden' the structure of the event making the mark.

    Thank you in advance for you help to clarify my confusion.

    Sincerely,

    Robert Gibbs

    rg8766 wrote:

    Surely the process:

    Check the OS press > OS encodes this trigger to send > OS sends a trigger that the button has been pressed > Labview checks if a trigger happened > Labview decodes what action has been coded in this trigger > Labview takes appropriate, based on relaxation measurements

    has more steps and is more intensive than processor

    LabVIEW checks the key > Labview performs the appropriate action when you press the button?

    BONE is already this process in any case.  If you are in fact doubly effort without worrying.  And the OS is much more efficient that your code will be.  So just let the OS do work heavy while your code sleeps.

    And think about the trigger more as an alarm clock.  You are asleep (do nothing, with no CPU) when your alarm goes off.  You wake up and perform the task that the alarm tells you to do.  Once done, you are waiting for another alarm, so you get to sleep.

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

Maybe you are looking for

  • economy Web page

    Hi, usually I loove Firefox so thanks for making my browser of choice over the years. I need to save Web pages that they are on the search screen and consult Oh and the button to submit your comments does not work so I'm here

  • AppleScript to send the shortcut keyboard to copy the cell

    Before we go too complicated, I'm starting to get a basic copy/paste using keyboard shortcuts to work. In theory, if I can copy a value of cells in another cell using keyboard shortcuts, I can use keyboard shortcuts, I need more complex scripts. Can

  • After the upgrade to 8.0.1 the remark 'you don't have the latest version Firefox' remains. What is the problem? s

    After updating Firefox to 8.0.1. the rest of the note on my start page Dutch http://www.google.nl/firefox -'U used nieuwste van Firefox versie niet. Upgrade om het beste ITU internet het vandaag you halen! »--. (you do not use the latest version of F

  • Aurora R4 new RAM not posting

    I have a R4 Aurora with 8 GB of DDR3 RAM at 2133 mhz. I bought two sticks of G. SKILL Ares 8 GB 2133 mhz RAM install, but I get a beep code from RAM to address missing whenever I start the computer. Anyone know what is happening? And you need more in

  • Confused about card video card

    I am shopping for a XPS 8500 - and was confused because the specifications of the video card on the Dell site match the specifications for the same card - not brand and model I see elsewhere - the Dell card is better. I tried the Dell chat but only g