create subroutines for several structures of the event and common stop button

Hi guys,.

I wonder if there is a better way to design algorithm below scenerio that similar technical rehearsal for each structure of the event.

Please find in annex vi where I designed the code to a boolean (D). I want to design a similar code for all other bolleans. (In the present design code, photo is displayed when the mouse is flown over D). I obviously have other pictures for the other,(A,B,C,E,F) booleans. Can we have a kind of subroutines for other Boolean types and a single stop for all the application button.

Thank you very much in advance for your support.

Sorry (I forgot to add vi) Please find attached.

Tags: NI Software

Similar Questions

  • LabVIEW 2012 while the structure of the event does not stop

    I am LabVIEW 2012.

    An example of a while loop with the structure of the event inside can not be stopped with the stop key, Boolean.  Something wrong?

    Please see the attached VI.

    Thank you.

    Yes, something is wrong. You must add one for the event in order to detect a change in value on the stop button.

    The thing is now your structure for the event rest waiting for one of the event which she handles and ight now, it handles the "close panel" event, the 'timeout' event is too manipulated, but since you do not have anything related to the terminal of timeout (top left of the structure of the event) the timeout is - 1. So, when you run the VI the while loop is stuck in the first iteration and is waiting for a sign nearby, the stop button will only take into account after that same structure intercepts an event; I think it's because LabVIEW will execute the code related to the Terminal stop of the while until after the rest of the code that he has completed execution of the loop.

    Hope this helps

  • Call for a VI in a secondary with parameters within a structure of the event and a button give up

    Hi all

    I have a control with a tab control panel and two tabs have a panel of sup in them.  When running, I load the screw I want panels of void.  In the structure of control panel event, I want to start each screws and monitor the executing State, so I can give up the VI during his execution.  A method that I use can run the VI and the abort event will work (see example).  The second method that I use does not work and that's what I want to do!  I have several entries to the VI I want past that placing the VI in the case where blocks everything and wait the end of VI, so I can't monitor the State of execution.

    I've attached an example of what I want to do.

    Any help appreciated.

    Martin


  • Events between 2 structures of the event and the queues.

    Hello world

    Attached is an example of two event structures inside while loops.

    The loop at the bottom is in pause or release by a queue.

    I don't understand why game event is not recorded on the lower node the first time, that it is drawn.

    any idea?

    Thank you very much

    Best regards

    Thank you, you were perfectly right I just reversed the order of execution with the wire of the error and it works fine.

    Thank you

  • Create alerts for several systems at the same time - hyperic Can do?

    If I create an alert for a process or an agent to say 'availability' under open source license,
    for the EA version, can this alert that is set to 1 solaris system, be used to monitor all my Solaris systems or I have to create separate alerts for each system?

    I see I can do various tests of systems, but right now I'm just their configuration on 1 System. He had to be able to do this to a multiple of systems...

    Yes, you can do it with HQ-EE.  You can apply an alert to all the resources of the same type (i.e. Solaris platforms).  You can also apply an alert to every Member of a compatible group.

  • How to use the structures of the event for long-running tasks

    I created a state machine that scans a cluster of Boolean controls in a State of 'home '. Most of the States run a Subvi or two in ~ 100 ms or less.

    However, a State run for 10 seconds.

    The code works but the user interface is limited because the controls are outside the cluster because they provide inputs to the structure of State machine case but do not cause changes in the State. In other words, I all orders cluster stacked vertically on one side of the main panel and do not have the flexibility to move the controls to the more intuitive positions on the Panel.

    My question: How can I convert this code in a structure of the event and keep this long term 'event' and prevent that the operator by clicking another button event during the execution of this event?

    Thank you

    You say you have controls outside of your main code... You should really put these inside and manipulate them in a State of your state machine is initialized. This allows you to make changes to the code easier and limits of line entering your outside loop.

    You can do different things to lock the user.

    You can disable specific controls so that they can't be clicked or edited.

    You can use the palette of the mouse to define the busy cursor and disabled again once finished, I do this a lot during treatment when my code something loads the user just clicked.

    One of my favorites is to set a Boolean value in your data that passes through you event titled structure "disable mouse." When the value is True, a mouse down event will effectively reject the event, clicking on disable. I also added an event mouse move where if the bool disable the mouse is set to True, it moves an indicator of string with the mouse by telling the user why it is disabled.

    If you want more specific suggestions, I suggest to post an excerpt of your code, or attach your screws, so that we can better help you.

  • 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

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

  • 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

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

  • How to stop the While loop in the Structure of the event with the same button?

    Hello

    I have a problem. I want to use a single control to activate an event in a structure of the event and the same control to end a while loop in this case.

    It is possible to use 2 controls to do this, but I need to be alone.

    Thank you

    You should NEVER place while loops inside the case of the event, and it is never necessary to do. Think about it: all you have to do is spin the code. You can easily use the outside while loop for everything. Simply place the code of the loop internal (without the inner loop) inside the case of delay and manipulate the time-out period between a pending finished and the infinite (-1), depending on the State of the Boolean value.

    A very simple example (LV 8.0)

  • Button value change records in the structure of the event, but does not change appeaance?

    Hello world

    A quick question... I hope someone can answer...

    I have a code that uses a PS button within a structure of event to trigger a signal of AO... My code is below. The code works fine and the OD goes off when you press the button E-Stim... But when pushed the button does not change with reliability the appearance (i.e. of the gray 'off' red 'on' color)... Sometimes color changes; no other time not... If I remove the structure of the event and the survey button in the appearance changes as expected.

    What is going on? I would like the button to change the colors on the user interface to indicate that it works... Should I programmatically control the color?

    Kind regards

    Jack

    I guess that when query you the button you have some delay in your loop? Locking means that the button will change its value when you press it, then switch back to the original value once the value of the control has been used by the code. When you ask, this means that until he reaches the next iteration of the loop, but in the case where the structure that will happen immediately.

    The default setting for the buttons to modify its behavior as in most of the application would be latch releasing. You then raise the event when the button of the mouse over the control. This also allows "drag" control if you push down on the subject, given that you do not release control in this case.

  • structure of the event copy

    Hello

    I use LV DSC RT 8.2.1

    Why can't I copy & paste a structure of the event and its description of the events (in the same VI)?

    (I can create a copy of a structure of the event, but his description of the events are empty)

    Is it possible to do?

    Amitai Abramson.

    You can attach an example?

    I can copy & paste an event very well structure. Same ctrl + do drag retains all events intact.

  • How can I set up a structure of the event that sends text when the user presses the button "Return"?

    I'm new to programming of the Structure of the event.  I am trying a program which causes the content of a control to the string to be processed when the user presses the button back in after typing in the control of the chain.  I think (I hope!) that it is simple, I just can't understand how do.

    Basically, I would take the attached VI and change so that the user can send the value of control 'String In' to the indicator "String Out" either by pressing the 'Return' key or press the button 'send string. '

    Any help would be greatly appreciated.

    This example has nothing to do with the RETURN key specifically.  It fires all simply whenever the value of the control is changed.  If you click outside the text box or on another still controls the value changes and still the event is raised.  This is often the desired so if it works in your application, you good to go.

    You CAN ONLY answer a particular key if you wish.  Set your event to meet 'This VI' > key down.  Then, read the proposal Vcle on the left side of the structure of the event and compare it to the RETURN (for example).  The Boolean result of the comparison gets connected to a structure to deal with your code to run inside.  You can also wire Vcle directly to a case structure and execute different code based on which key was pressed last.

Maybe you are looking for

  • PROTECTED R700 on docking station / command screen

    Hello I'm on a Toshiba protégé R700 on a docking station and I have problems in installing the screen of the built-in or external.Is it really necessary to press FN + F5 to switch the view when the apparatus? My scenario: Laptop on the dock, using ex

  • export a list of open files in an application?

    Hay, I have a bunch of files open quicktime (files audio aif) I would really create/save/export a list (text file) all open files so that I can start then to organize and group several files in folders etc... are there intelligent Terminal scripts or

  • Problem of pointer to the top of the page turn mouse

    Hello, I have a HP Invent Lap Top, model computer HP G70 laptop with Windows Vista Home Premium.  Integrated the mouse pointer does not work above A CERTAIN POINT on screens online.  Do you know what could be causing this please?  I had the Lap Top n

  • C4480 ink used for F4480

    Hello I have a hp deskjet F4480 printer. I bought a c4480 ink, can be used for my F4480 printer? concerning Peter

  • HP mini 5101 laptop

    cannot switch wireless... There's always orange... pls help