Start event from case structure

I'm running my main programm inside an event of an eventstructure.
Beside this main event I additionally have 3 other events in this event structure.
To save "screen space" I would like to start indirectly one of my other events from a case
placed inside another event.
Is this possible - would be glad if you have an example.

You are still completely misunderstanding the purpose of the event structure (see also my answer the other thread).
The main code of the program does NOT belong inside an event structure. What good is an event structure if it is tied up indefinitely inside one of the event cases???
An event structure is most useful for dealing with interactions by the user and must be ready to handle those at any time. It is not a tool to "save screen space" (whatever that means). If you are running out of diagram space, consider wrapping your code segments into subVIs.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Effect to image at drag start event from tilelist to canvas

    hello
    i just want to give effects to image at drag start event
    from tile list to canvas
    <mx:TileList dragEnabled="true"
    dragStart="moveeffect(event);">
    private function moveeffect(event:DragEvent):void{
    In this function how can i get image

    DragEvent has property called dragInitiator. That might help.
    Otherwise, you can add mouseDown event listener to your
    TileList and in that handler do something like:
    var initiator:UIComponent = UIComponent(event.currentTarget);
    and then add any effects to the initiator.
    ATTA

  • How extract data from case structure

    Hi all, I would like to extract the data from case structure, it's circled in red in the attached file. How should I do it? Thanks for taking your time to look at my post. Your help is greatly appreciated.
    Attachments:
    bp.jpg ‏161 KB

    Thank you guys for your prompt reply.
    As u can see from the vi, there's an error, I need the values in the circled area to be passed on to the block ( Bundled by name)
    Thanks !
    Attachments:
    fyp_bp_only.vi ‏90 KB
    fyp_bp_only.vi ‏90 KB

  • Is there a known issue with emailing from case structures

    Hi,
    I am working on a quality control vi for data coming in as a text string. I need to be able to have the vi perform a check with the responce to the check (true or false) will cause different steps to then be performed. I was able to get the vi to perform 1 check and email out if the responce was false. When I tried to add a second check if the responce was true, the vi would run without any errors but would not email out or would only email out from the first check even if the first check passed and it was the second check that failed. This was all done without case structures. I then started using case structures with the true responce leading to other checks but the false responce leading to an email generation. For some reason even a simple one check with the email generation happening in the false case will not work. There are no errors or anything, it goes through the whole process correctly but will not send an email. Please help!!
    Tim Koles

    Hi,
    Here is the vi and the sample text file it calls for. You will of course have to change the path name. Feel free to call me if you have any other questions. Thanks
    Tim
    410-326-7259
    Attachments:
    SPLIT_WEATHER15.TXT ‏130 KB
    Weather QCexample.vi ‏63 KB

  • Converting from case structure to arrays

    I am working on a set up that write out 8 digit binary to a connector block. I had it set up with a case structure but there are over 40 different writes and it is becoming way too convoluted. I know it would be much easier to do this with arrays but I have no idea how to use them, please help.
    Here is my current program:
    Attachments:
    42sampleWorkingCode.vi ‏974 KB

    Here is a quick attempt to do everything with arrays. See if it makes sense to you. As you can see, the code is much simpler. (LabVIEW 8.0).
    You should be able to adapt some of the ideas. Many additional simplifications are possible, for example you could calculate the port 0 values directly from the outputs of the upper Q&R function. Try it!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    timedBackboneWithLEDnewlogoMOD.vi ‏384 KB

  • Usage of Events over Case Structure

    Hi,
    I want to Know what are the advantages if using Events over case strutures.
    Is memory useage less in case of events.
    With regards,
    Suresh Thangappan
    Suresh Thangappan

    Hi Suresh
    I think you can't just compare these two structure types, as they have a different purpose.
    I assume you're about to create an application, so I'd suggest you to study the producer consumer design pattern. There are both of these structures used to separate program-logic and reaction to user-inputs.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Feedback node from case structure

    checkLED.vi is my first rev of this. Then I realized I can incorporate the 345/348 selection into the case structure, which resulted in checkLED2.vi. However as soon as I did this, the feedback loop inserted itself. I don't understand why this happened and what it means. The string coming from the case structure is an INPUT to the two 34970 vis. There is no feedback going on here. If Labview sees this as feedback, why didn't it insert the feedback node in checkLED.vi?
    Attachments:
    checkLEDs.vi ‏23 KB
    checkLEDs2.vi ‏23 KB

    Look at the dataflow you have created by moving the strings into the case statement. The case statement requires data from the iteration terminal and from the VI in the sequence structure. The sequence structure requires data from the switch VI which in turn requires data from the case statement. This is a clear feedback situation that you did not have before.

  • Event in case structure

    Dear all,
    I am using Event Structure in a Tab Control.
    On page 1, there is a Table Control and when the mouse is clicked on it, it returns the Cell Value. The event is working ablsolutely fine, but the problem is i have no idea how to Stop the Event.
    I am attaching my Vi here. Pls have a look at it and let me know of a possible solution.
    Thanks,
    Ritesh
    Solved!
    Go to Solution.
    Attachments:
    Event in Tab.vi ‏18 KB

    ritesh024 wrote:
    But, it means that the Events in Page 1 are getting triggered even when the Control is on Page 2.
    That would take the unnecessary memory and time as there is no need for the events on Page 1 to run when the Control is on a different page.
    No, the event will not get "triggered", because if you are on the other tab it is impossible to fire the table event and a mouse up cannot occur. The event structure is in memory no matter what and placing it inside a case structure only complicates the code and can will lead to problems.
    The event structure should always be in the dataflow, the tab position is irrelevant. Never hide an event structures inside a case structure!
    Here's a quick example (LV 8.5). Tab 1 has your table and senses the cell position. Tab 2 has a light switch. As you can see there is no case structure needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Event_in_TabMOD.vi ‏19 KB

  • Merging Signals From Case Structure

    Hello,
    I am making a scanning program which requires several cases to be evaluated within two for loops. I've hooked up both conditions in a while loop, and I know that because of the conditions only one of the wires will be executed. In two of them I modify a parameter and one I leave it alone, but I am unsure of how to connect the three to the module on the right. Any tips?
    Thanks for your help,
    gordonj005
    Solved!
    Go to Solution.

    When you drop a new case structure onto the block diagram, LabVIEW creates a structure with two cases by default.
    To add additional cases, right-click on the case structure and select "Add case".  You can either "Add case after" or "Add case before".
    You can learn a lot by experimenting, right-clicking on things and examining your options, and using the LabVIEW help.  Since it seems that you're pretty new at this (not knowing how to create additional cases was the clue-in), I'm trying to give you some tools for learning on your own.  I'm not trying to be mean. 

  • Switching from case to event structure

    I once down converted some LV 7.0 code to 6.0 and it (automatically) converted an event structure to a case structure.  When trying to upgrade some code to change a case structure to an event structure, I didn't see any means for doing that (a flat sequence, yes... event structure, no).
    Is there a way to convert a case to an event structure -- if not, why not?
       ...Dan

    No, the question is very valid!
    The resulting code does not need to make sense immediately, but I have desired this functionality (=convert case structure to event structure) at several occasions. I have many legacy programs that were made before the introduction of the event structure. Some contain big case structures with many cases, one is the "idle" case which only contains a small wait statement, while others are executed if certain controls change their value. (Sort of a poor man's event structure emulation ). Upgrading this old code would require a simple replacement of the case structure with an event structure so each event case contains the code of one of the original cases, followed by a quick manual cleanup (assignment of the event triggers, etc.).
    Without such a conversion tool, my code upgrade is major work, especially if there are many cases and dozens of shift registers crossing the case structure. Basically, I need to rebuild things from scratch.
    Summary: It would be useful to be able to easily convert between event structure and case structure and vice versa using a "replace" command. I even remember asking for this functionality.  I would use it!
    LabVIEW Champion . Do more with less code and in less time .

  • Case structure back and forth from LED

    Hello, I'm trying to make a case structure switch back and forth everytime a boolean LED indicator goes off. I want case one to start when a button is pushed, switch to case two when an LED indicator goes on, then switch back to case one when that same LED goes on again, then case two the next time the light goes on, and so on. The LED is set to go on every ten seconds. So far i have the case structure in a while loop but im not sure how to get them to switch back and forth using this one LED. Any suggestions?

    Then you have two asynchronous parallel loops, and you want one of them to receive information (Boolean) from the other in order to determine its state.
    If the loop with the elapsed time contains nothing but elapsed time, then consider moving it to the first loop.
    Otherwise, you should use a form of synchronization communication, such as a Notifier or User Event, to send data from your loop with the elapsed time to your loop with the case structure.

  • Case structure/event counting

    Thanks so much everyone for your help. I was
    able to get it to work. I now have a second question that I have been
    wrestling with on my program for some time. I am hoping to be able to
    count the number of times each event happens, be it >0, <0 or 0.
    So far, I haven't been having a lot of luck on figuring this out.
    The
    way my program works is that the case structures control the opening of
    solenoid valves. I am running a while loop to keep the program running,
    but would like to be able to at least count the number of times each of
    the cases are true in an effort to figure out the amount of time each
    of the solenoids is open during a run.
    What I really need
    to do is be able to run each case for a maximum of 10 minutes each, and
    then stop the case from running. I know this is an in depth problem,
    but simply counting the number of times each of the cases run would be
    a huge start for me.
    Thanks again for the help on the other problem.
    Tim

    You need three different counters, one for each event. Right now you increment the same number, irrespective of case, so you might as well do this outside the case structure or even just use the iteration terminal. Also, the counter should be blue (I32). You also need to initialize the shift registers.
    Here's a simple example (LabVIEW 8.0) that uses an array of three elements to keep count of the three cases. See if this makes sense.
    Message Edited by altenbach on 08-27-2008 09:30 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    countCases.vi ‏13 KB

  • Transfering a case structure to event structure

    Hi, I am trying to transfer case structures that are currently set up to a control that if on prompt the user where to save and then save all following files to that location till end of program and if off the do nothing. I would like to enable these to be switched on and off at any point and know to use an event structure. The problem is I am new to coding with an event structure and have been able to get the button to work but not continuously save. I attached a screen shot of the original case structure and was wondering if someone could show me how to change it to the event structure format with the same functionality. I'm getting a little lost and confused. Thanks!
    Attachments:
    alltruecases.jpg ‏534 KB

    I can't attach the vi due to the size and I do not think a simplified piece of code is going to help. I did however go through and stitch two jpegs together of the main two sequences. hopefully this gives a better idea of what I am trying to do and where to go from here. thank you.
    Attachments:
    1.jpg ‏669 KB
    2.jpg ‏317 KB

  • Event structure vs case structure?

    I am developing an application that is fairly user input based... lots of boolean control buttons to do different things.
    In the past, I have avoided "value change" event structures, and instead went with a while loop, stacked sequence, and series of case structures. After having done it, I decided this was a terrible idea. This time, I intend to build an array from the booleans, convert it to a number, and feed it in to a single case structure. This will give me the option to add cases for different combinations of the booleans being pressed.
    I guess the question is: What is the best method for doing something like this?  Does one have advantages over the other?
    Edit: I wasn't that clear.  I would like a comparison between the "value change" event structure method, and just feeding everything in to an array -> case structure.  I also am worried that with the bool array -> case structure that I will run in to problems where I end up with too many control variables, and the value of the resulting number gets ugly very quickly. The application has several buttons... next, last, save, load, several different configure setup buttons etc.
    Thanks!
    Solved!
    Go to Solution.

    Aalenox wrote:
    I am developing an application that is fairly user input based... lots of boolean control buttons to do different things.
    In the past, I have avoided "value change" event structures, and instead went with a while loop, stacked sequence, and series of case structures. After having done it, I decided this was a terrible idea. This time, I intend to build an array from the booleans, convert it to a number, and feed it in to a single case structure. This will give me the option to add cases for different combinations of the booleans being pressed.
    I guess the question is: What is the best method for doing something like this?  Does one have advantages over the other?
    Edit: I wasn't that clear.  I would like a comparison between the "value change" event structure method, and just feeding everything in to an array -> case structure.  I also am worried that with the bool array -> case structure that I will run in to problems where I end up with too many control variables, and the value of the resulting number gets ugly very quickly. The application has several buttons... next, last, save, load, several different configure setup buttons etc.
    Thanks!
    Event structure. Among other things, it will allow your loop to "sleep." then wake up when an event happens. With a case structure it's going to be constantly polling. Event structure is pretty much always the right way to go in newer versions of LabVIEW that have it available. I assure you, your first solution was aboslutely wrong and you noticed that, your second is better and was common the way before event structures existed, now that event structures exist, you should go with those.
    CLA, LabVIEW Versions 2010-2013

  • Case structure & event structure

    1.What are the disadvantages of case strucure?
    2.What are the advantages of event structure?

    Are these test questions? I could name 10 for each, but why are you asking?
    While there are often many ways to accomplish the same thing, Case structures and Event structures serve different purposes. Straight from the Help file:
    Case Structure
    Has one or more subdiagrams, or cases, exactly one of which
    executes when the structure executes. The value wired to the selector terminal
    determines which case to execute and can be Boolean, string, integer, or
    enumerated type. Right-click the structure border to add or delete cases. Use
    the Labeling tool to enter value(s) in the case selector label and configure the
    value(s) handled by each case.
    Event Structure (Not in Base Package)
    Has one or more
    subdiagrams, or event cases, exactly one of which executes when the structure
    executes. The Event structure waits until an event happens, then executes the
    appropriate case to handle that event.
    Right-click the structure border to add new event cases and configure which
    events to handle. Wire a value to the Timeout
    terminal at the top left of the Event structure to specify the number of
    milliseconds the Event structure should wait for an event to occur. The default
    is –1, indicating never to time out.

Maybe you are looking for

  • Is that true, use 16 Ggo RAM on mac mini mid 2011?

    is that true, to use 16 Ggo RAM on mac mini mid 2011?

  • ADobe Bridge show Quicktime icon

    When viewing clips stored on my external drive in the view panel all I see is the Quicktime icon and no obvious way to play them. 1. How do I change the Quicktime icon to a thumbnail view? 2. How do I view them? The clip is HDV footage. Thanks Kent

  • Doubt in creating APD

    Hi All, I wanted to know why is so that while creating an APD, the base query shold not have any free characteristics or anything in filter? Warm regards, Sharmishtha

  • Illustrator CS3 really hates my mouse scroll wheel

    CS3 Web Premium arrived on Friday and I'm loving it so far, but I'm having a bit of trouble with Illustrator. Haven't really used it before, I come from the Macromedia user base and upgraded from Studio 8. What happens is, whenever I use the scroll w

  • Displaying one record at a time

    Is any body able to help me? I need to display one record at a time from a Select statement. Could I copy the results of the Select query from a table into an array for later display or is there a better alternative. Please, any part knowledge with r