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

Tags: NI Software

Similar Questions

  • multiple messages from several loops in the structure of the event

    Hey guys,.

    I have two questions, first of all, what is the best way to receive messages in case of structure? I've been watching the user events, and which seems to be a good option if I want to never send a single message. Ive never found an example where the regester for events has a second event its looking. I currently use queues to the structure of the event to my other loops.

    My second question is I want to even send messages to the structure of the event, my current thinking is that it would make things easier to follow if the structure of the event sent all messages to the individual lines. Is it more appropriate to have just a loop of talk directly to one another through the queues already in place?

    IM thinking ill put in place a user for handlng errors event but I'm not sure on other messages.

    Thank you guys

    You can get events for individual events. Better yet, you can use clusters to group the different events and access them individually (see below).

  • Activation of the loops through the events

    Hey guys.

    Let me start of by saying that I am self taught in LabVIEW and just started. The problems I encounter are so simple.

    Let me describe what I do, and then the problem that I need help. I am trying to automate a research facility that uses a series of valves, a massspectrometer and a potentiostat. I want a VI where I can press a button that causes the valves to open and close, in a given order, after which the massspec should make an experience, the experience, the valves must open closes in a certain order and return to an "inactive" State In fact I want several of these buttons for a different experience.

    Now to my problem: I did a VI that does something in the sense of what I wanted using events and while loops. See attachment for a simplified version. It uses a structure of the event with two buttons which activate their own business structure. However, if I place the eventstructure outside the while loop, the event is still running. If I place the event indoors (as in the example) the while loop I have to press one for each stage of the structure of the case. Note that "business" in the structure of the case are identical in the example, but they will not be in my final version of the program. Finally, the LEDS indicate whether the valve is open or closed. The LED matrix, y at - it instead a DAQ assistant.

    I hope that people can help me, please tell me if it needs to be clarified.

    It looks like you want a State in queue Machine or the Machine of State JKI.

  • event handler programmatically for different loop than the event itself

    Hello

    I'm driving a car of mine using compactDAQ in labview. I have two parallel looping using queues. One is for the tips - READ LOOP playback engine - (running more often), and the other for writing to the engine in bits - LOOP to WRITE.

    When I shoot a little some (by CAR), the motor starts to move with a pre-defined pace and to a predefined position. So far so good. Thus, when the engine starts, it replaces two bits:

    -sets bit BUSY (indicating the movement)

    -Disable INP bit, which indicates that the motor is not in a position

    As soon as the engine reaches its final destination the BUSY bit is cleared and the bit of the INP is set.

    The question is: How can I sign up for the BUSY bit (INP or both) goes high (or low) in LOOP WRITE, given that the bit is read LOOP read? Is it possible to do using queues? I read something about the events, but I don't know exactly how incorporating them in line-ups. Is this OK same design for the engine management?

    I have attached some of my code, where I have a structure of the event, where a condition is the change of the busy flag that is updated in LOOP READ. However the structure of the event will never run.

    I would like my RTO case run once and then expects busy go upstairs, and then again for INP to go UP and after that the next case is running (stop or other).

    I know that my code is not perfect, but I'm pretty new to labview...

    Thanks for any information that can help

    User events are just another way to communicate between the 2 loops.  Queues are also used to communicate between two loops.  If you already have a queue from one loop at the other, you could just keep using that.  I have recommended the user events due to the structure of the event you have included in your loop of producer.  User events can be triggered at any time you want.  You can have the code in your block diagram that uses the Event.vi user generate causes the structure of the event with the other loop turns off.  Event structures are usually turns off when a Panel before its value control has changed, but they can also be configured for these user events.

    You can really make this communication between your two loops in different ways.  If you use a LabVIEW 2012 I strongly recommended to take a look at the producer/consumer model, which is available for you to look at this common architecture and compare it to what you have now.  If you have not 2012 try to look at the example in my last post on the producer/consumer with user events.  You will find more success using architectures such as these.

  • Several dates for the event display

    I'm creating an application where a person can post an event with the lists up to 20 days to complete the form. I save these dates (one to twenty individual units, using a 20060810 type code, separated by a delimiter) in a single field.

    I'm trying to figure out how I can build an efficient query to find a beach in a set of date codes that answers the question 'what happens between 8/1 and 8/6' for example. I know how to find things by day, of course.

    Is this possible?

    During the night, I decided to address the issue in a different way (separate table), so my needs are resolved. That said, after a night to reflect on the subject, I think not that the task could be done by a single SQL statement. Thanks for the offer of help!

  • Structures of the event?

    I'm having a problem with several event shooting incorrectly structures. I have attached a simple VI illustrating the issue. Basically, I want that the user presses space on several occasions, but the event only fires once. Each event after fire incorrectly as if space was pressed again.


  • generate the event user triggers two events structure

    Hello

    I would like to generate a while a user event that triggers events in two or more loops loop event.

    I have attached a non-fonctionnel project VI, so easier to show what I would understand.

    My experience is that user generated event cause that a case of Structure of the event, not both. Why? What if I want the two loops of the event that will be raised? How can you make with the user event?

    Maybe someone could explain this a bit deeper?

    Thank you very much!

    Kind regards

    PS. : new problem with forum upload file...

    So here's the VI in my dropbox:

    https://DL.dropboxusercontent.com/u/8148153/draft_to_show.VI

    Classic mistake.

    You need TWO 'register for events', the output of each class to a separate structure of the event.  Then it won't work.

  • No response to the events of the cluster.

    Hi all

    I am preparing for the CLD and find a problem with the exercise of ATM Simulator as shown in the attached file.

    Please follow the below steps to reproduce this problem.

    1 extract the files.

    2. open atm.lvproj, and then run main.vi.

    3 press card Simulator to enable user input.

    4. put 12345 in user input, and then press ENTER.

    5. left and right menu will display its function and you should be able to press the left and right, but they have no answer to your intervention.

    If you have an idea, please share it with goodness.

    Please note that I use LV2010, but I'm going down my code to 8.5 so that we can share more.

    Sincerely, Kate

    There are serious problems with dataflow doe to wrong choice of program design.

    You shouldn't ever have event inside the strctures case structures, especially structures event, each in a situation different from the structure of the case. Event structures are not dataflow leads, so they queue of events even if there is now way to the service of the event due to issues of data flow. Your events are defined to lock the front until the end of the event, so any event that cannot be handled by the program crashes to the top of the façade for ever.

    So: Get rid of the box structure and use a structure of single event with several instances of the event. That should be all you need. The structure of the event should be directly on the diagram of the while loop. Simplify! Put your business structure housing unique timeout and modulate the duration of the time-out period by an if necessary shift register.

    A good tool is also highlighted. Use the VI while looking at the chart in Slow Motion. You'll see where it gets stuck.

  • 24 v digital signal of the event from the host to the fpga power on/off

    Hello forums or

    Sheet material

    cRIO-9074

    module or 9472 digital module 24 V output c series

    To expand on the topic described,

    I want to be able send a trigger to alarm the fpga digital 9472 out that lasts 30 seconds using the operating system time real clock time on the host computer

    The way I approached this problem is that

    In the loop where the event occurs, if the event trigger is defined then the fgv has a time stamp when the event occurred is sent.

    In the loop that communicates with the control of fpga, I write to the control based on the condition that the difference of the current time checked and fgv time is 30 seconds or less, then it will send the value true, otherwise send fake and wait for the next occurrence of the event.

    The main problem after implementation of this is that 9472 led does not turn off when the false value is sent to it.

    cordially Mzamanstl

    Timer Keeper SD is a FGV so that it is written for her, once the event occurs

    So if the event occurs so timestamp is stored and then the difference of the timestamp result is<30>

    then a true value will be sent to the module of 9472

    So basically I want the light and I want to do the 24 v output for 30 seconds then turn off and wait for the next occurrence

    I think the method that I test it with is not very good, because I realize other factors that may contribute to this problem, so I think I found another way to test

    and I will try it but its will take time.

    cordially Mzamanstl

  • No bar reading HTML5 for video of the event, someone at - it workaround?

    I have several videos of the event in my project CP6 and after weeks of fighting and with assistance from the allstars Forum project works flawless in SWF and. EXE to publish, so of course the bossman wants on his iphone and tablets. No problem, after following the advice of the Captivate Forum of God I built the HTML5 functionailty in the project initially so no HTML5 tracker do issues here! Except that I forgot that the HTML5 video playback controls are based off of the browser so my Swf player bars are gone when published on HTML5. I'm looking for some examples, trial and error or advice on getting control of playback bar on my videos of the event. And no I don't want the PlayBar project to fight against it, it must be 'on its own' as it is now as a 'pop up' (Show/Hide button control) on a single slide. On this simple slide, I have about 7 videos of the event which are skipped upward, game bar controlled and closed by a user individually.

    I know that it becomes one big problem with others then all the ideas, advice, examples would be great for everyone!

    Thank you!

    SWF playback controls.JPGHTML5 no playbars.JPG

    Hello

    I got the answer from the team concerned, the video playback is a skin (.swf file), and HTML5 does not load the .swf

    Thank you

    Vikram

  • structure of the event + while loop

    Hello, I am trying to understand how to unite two while loops in attached VI for half a day

    The first loop creates a state machine solid which reacts on each key and runs one of the structure cases. (that part works very well)

    The second loop, always generates the random number, but it stops the generation during the time where one of the structure cases events are executed. (this is the part ticky)

    Any suggestions?

    If you want your random number to stop so that the user triggered events are running, you should be able to simplify your design a lot.

    It can be done with a loop using the case of timeout.

  • Feedback in the structure of the event loop

    Hello

    My application allows users to charge one of several screws in a secondary. Each VI disolaying one part of the system. The user enters the name of the required VI and pressing return or entry (Num pad) the VI is responsible. I would like to add that a THST feature allows user to go back and forth between these screws loaded I am writing a unique index to each VI in a table in the same event handler. I use your comments but the table is rewritten to each key index ieonly event of it currently oaded VI is written on the chalkboard at index 0. It's confusing as roads, refnum, etc. are transmitted to the next iteration (of while loop) very well using shift registers

    Any suggestions would be welcome

    If I understand correctly, you can have any or all running, regardless if you are looking to them or not, so I would say that the simplest solution is to build a picture of the vi refs (which is done easily at the stage of init with constants of vi - REF) and use a control of the ring with the names. On the event of modification of the order value, empty side and insert the new REF.

    /Y

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

Maybe you are looking for

  • If I delete firefox, I lose thunderbird?

    I want to keep thunderbird email, but get rid of the firefox browser. Can I do this?

  • Satellite P100-188 - is there an option of fingerprints

    I heard that the design of the keyboard on this model is bad - is that true? Also, is there an option of fingerprints? I saw what appeared to be a sweep feature of fingerprint under the trackpad on this model, but there is no mention of such a thing

  • Equium L20-197: no not line-in jack - how to record from an external audio source

    Hello I am generally very happy with my Equium L20, but I now find some trouble which I assume are from cost reduction. For example, there are no micro shipped, so need to buy one for Voip purposes. And I would like to use this notebook to record fro

  • How to find a complete product specification of Lenovo serial number?

    I buy a lot of Lenovo used equipment. The selling company doesn't have a detailed specification of all.They gave me the serial number of equipment.How do I get the configuration complete a product and its internal components?Is it possible to Lenovo

  • Awk on terminal command

    Hello I'm new to the mac terminal. I'm doing an awk command that runs through a series of files .txt for a specific word "Deet". Because the files contain this word several times, I want the command to find the last word "Deet" and enter the name of