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

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

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

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

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

  • Hello... I'm having a problem with ps cc ever time that I create a layer mask

    Hello... I'm having a problem with ps cc ever time I create a layer mask and choose the brush in a first time, he began to remove the areas IM brushing away then stopped. After pressing X button was able to brush the image and then he kept repeating the process of pressing X and it pixlelated areas of the image. And now the masks brush and layer don't work at all whenever I start a new project.

    Hi dtain,

    Can you please try reset tool.

    To reset a tool, you must first have the selected tool. Then Ctrl-click (Windows users: right click) the button tool preset in the Tool Options bar.

    When you click this button, you will see a small menu and you can select Tool Reset to reset the current tool to its default value or reset all tools to deliver all the tools to its default value. Once selected, the tool will act as the first time you have used it.

    Using this simple method to reset your tool with a single click, you can quickly remedy any situation where the tool does not correctly and to maintain the flow of creativity going.

    ~ Jitendra

  • Structure of the event: problem with data transfer

    Hello everyone,

    for three days I'm troubleshooting an issue in LabView with the event structures. I really hope someone can help here, because I can't find anything on the entire WEB.

    I had six groups of equal to a VI entry, each containing five checks enum (among others) where the user can specify some configuration of measurement data. I want the program to do is: to recognize if a any of these enum values has been changed and if yes, then submit the values containing the cluster in a subvi then calculates the wiring and affect the material of the ports. In addition, i need to submit the number of the enum element that was changed, so the program is able to clear the user input in the case of a breach (e.g. If the user sets two entries of enum control 1 meter and 2 Group 1 and then tries to set a third counter of entry to port 3, the program displays a message and deletes third entry as the number of entries of counter is limited to 2 per cluster).

    To resolve this problem, I used a structure of the event with 6 x 5 cases (change of enum value 1 Group 1 Group 1 enum value 2 change... and so on until the change in the value enum 5 Group 6).

    The problem is that if the user changes a value, the event structure reacts and performs the proper case; However VALUES of the cluster, the user changed are not subject to the SECOND time that an event occurs. It is a kind of a situation, "n-1". For example, if all five controls Enum of Group 1 are 'disabled' first and the user sets enum 3 of 'Meter entry', the structure of the event runs but submits the values previous to the Subvi (all enums 'Disabled'). When the user makes the second change, say that enum SWITCH1 to "Analog Input", the structure of the event is running again and passes the values of the FIRST user to the Subvi editing, then the Subvi gets data "enum 3 meter inlet and all other disabled enumerations.

    In easier words: if I have new values on my cluster "Kanal 1" (left side of the screenshot) and run the structure of the event, on the right side to "Kanal 1" indicator, I get the previous values (n-1).

    The structure of my event is in a while loop. If I create a timeout every 10 ms, and a loop of 250 ms the waiting time, I got the 80% chance that the recent changes are transferred to the Subvi correctly, in other cases I have a delay of the 1 step as described above. It seems to be directly based on the time that I specify the while to wait - but I can't explain it and I cannot accept a less than 100% chance to transfer the correct data, nor can I accept delays of a few seconds for each loop run. If I indicate timeout (infinite) get delayed 1-1 step values in all cases.

    When I specify cases of event to react on "all items value change" of the structure of the event behaves properly - but then I can't handle indicate which element has changed, as the CtlRef of output in case of a structure does not specify "enum 1, enum 2..." but only "Group 1".

    Does anyone have a solution to this? It is certainly a problem with the structure of the event, but I can't understand what to change.

    Thank you much in advance,

    Mr. Boiger

    This is because the terminal is read until the structure of the event runs.   Terminal is read, the event structure is waiting for an event.  The change in value.  Business events are running, but the value is the old value.

    Put the terminal inside the event.

    Or, you can display the connector called "New value" on the side left (stretching down from the border of the node 'CtrRef').  Use a wire one to come.

  • I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 10:08 minutes or so.

    I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 8 concerts after 10 minutes. I have to force them to quit, but I don't know what I am closing or why they open in the first place. Applications downloaded on iTunes?

    In addition, the Console has opened with the same message several times, but I don't know what that means.

    Any help would be appreciated.

    Hello

    The last is a picture of the Terminal window.

    Just because it lists 'Console' does not mean that it has nothing to do with this application.

    You have not said why or what you're trying to install so I can't help with that.

    You can use the activity monitor to leave their.

    After you select an item, use the X in a type of stop sign icon and confirm force quit.

    21:36 Thursday; September 15, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • How to manage the structure of the event with two loops

    I have a question about the structure of the user event with 2 buttons?

    key 1: START LOGGING DATA

    key 2: STOP LOGGING DATA

    How do I control my

    structure of the event so that it will work? because now that the loop is save data... I can't stop the loop, when I clicked on buttons.

    super_saiyans wrote:

    the problem with moving it is that I don't have control of the DATA RECORD STARTING?

    Of course, you do.  When you get your press conference button, you say your state machine to move to the State of logging.  You must also make sure that you return to visit the State to wait for the event to check out the events of the stop button.

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

  • Synchronization of 2 loops while one with a structure of the event.

    Hi fellow users of LabVIEW

    I try to incorporate a structure of the event in my current exisiting VI to Save certain values of control as shown in this post

    http://forums.NI.com/T5/LabVIEW/using-the-quot-make-current-values-default-quot-as-a-control-on/TD-p...

    It's the VI that I use as model with my exisiting VI.

    http://forums.NI.com/NI/attachments/NI/170/547715/1/defaults%20Demo.LLB

    In case the 'stop, change the value' I use in the main VI and a 'real' constant instead of Boolean control of wire structure. While the loops are not connected. The table that I use in my exisiting VI (another while loop) is indexed and unbundled to be used here.

    The work combined well screw and it gives me the results, my question is, in the long run it will give me issues. Do I still need to synchronize?

    Thanks for all the help.

    There's no problem because loop additional lower with the structure of the event.

    Personally, I worry about the top loop. Why so complicated? Why so much duplicate code? Why all these hidden indicators serve as local variables?

    Why don't simply place you the table in the entire cluster in a shift register and the index and ungroup by name wharever value, that you need to access. No hidden local variables or indicators.

  • Structure of the event in timed loop

    Quick question on the structures of timed loops\event

    What is a good or a bad idea to use structures of event call loops - as opposed to while loops. ?  I guess I like the idea of call loops - because you can prioritize them - so if there are some important things you need priority of 100% in the background - but for the user interface, you can configure it to run slower\or run to a different priority level.

    I just wanted to check it is not a reason why I shouldn't do that - since all the examples don't do that.

    JP

    I don't think it's a good idea. Your timed loop can stop waiting for an event. There is no advantage of placing the structure of the event in a timed loop. It is possible to assign priorities to other objects outside of the call loops. For example, you can the priorities given to subVIs. I'm reasonably sure that the structure of the event can work at other priorities if you do not the activities of the user interface. Maybe someone of NOR can confirm this.

    But the goal of a timed loop is to have a deterministic periodic job. The structure of the event must be used for asynchronous events. The two disagree with them if they are in the same spot.

  • Good afternoon! I had a problem with Adobe Muse to pay. I was transferred to the free subscription. In a letter to the mailbox said he indicated that the need to update the card payment in detail, but I can do, and the site gives a

    Good afternoon! I had a problem with Adobe Muse to pay. I was transferred to the free subscription. In a letter to the mailbox said he indicated that the need to update the card payment in detail, but I can do, and the site gives an error. Credit card remains the same.

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • my iphone 6 is not the Japan but still having a problem with his camera shttuer. sound is not being muted when the phone is silent. Help!

    my iphone 6 is not the Japan but still having a problem with his camera shttuer. sound is not being muted when the phone is silent. Help!

    The Japan is by far the only country where the shutter is forced to be on

  • 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


Maybe you are looking for