Retrieves the number of iteration of the event structure

Hello

Is there a way to extract many times wherever a labview routine goes in a structure of the event?

Thank you

hiNi.

I don't know what you mean by a routine in a structure of the event.

If you have the structure of the event, in a while loop as usual, then the value of the final iteration will tell you how many times the structure has executed.  If you want the count for a particular case, use a shift register with a function of increment in the case of interest and other wired straight through.

Lynn

Tags: NI Software

Similar Questions

  • Structure of the event in the event structure

    Is it possible that I can have a structure of the event, which is in another structure of the event? When I run the code, I can't use other buttons. (See chart for details)

    Do not put the event structures in the structures of the event! There is never any reason to do so.

    Redefine architecture your code in a correct state machine.

    (By default, events lock the façade until the event ends and if you raise the event internal or external, first of all, the other event can never fire because the current event can never accomplish or is inaccessible by data stream.)

  • Flashing light without the event Structure

    Hey everybody, this question should be worded a bit better than my past. I've finally finished Core 1 and 2 so now I really have a grip on what I ask. Haha!

    In any case, I have a game custom sensors that interface via a com port and a weight which is summarized output.  The weight is then put through a business structure to give different sizes "bucket".  The various cases of output values to a slider that the user sees. This is just to give you an idea of how the load is large.

    What I need to do, is make a Boolean flag that starts flashing if she sees a significant change in weight. The weight is anywhere between 0 and 20 pounds, so I thought that a change of 1 lb or more would be a great time to activate the flashing.  I also need to only flashes for a short period of time (10 seconds).

    I tried to use the structures of the event based on the cursor and a property node. I created an event based on a change in the value and put a flashing property node, but all that did was cause my Panel before locking.

    Any ideas?

    Well without seeing your VI do is to feed your weight measurement in a shift register on the right side of your loop. Take the register shift on the left side and slide it downwards. This will give you the previous iteration of displacement registry value that you can compare up to our days.

  • How to merge the event structures?

    I have a program of VI script that reads a text file of records and displays a structure of the event.  It works very well because it creates all the controls and indicators I need associated with the defined registry and code backend (i.e. the structure of the event).

    After I generated all this code, I copy and paste in the main VI I develop.  Everything works very well.  The only problem is that there are 100 text files from separate registry.  This means that I end up with 100 separate event structures.  Although it works, it takes a lot of space and I prefer to combine them.  However, each event structure has anywhere from 15 to 75 entries, so to do this manually is not an option.

    Is it possible to selectively merge the event automatically structures?

    I guess I could write a labview scripting routine that could get a reference to the structure of the event in VI, then merge... but part of the problem there is that there are a handful of structures of event I want to separate them just because they are not associated with the set of registers, that I mentioned.


  • Output of the application using the event structures

    Hello

    In my project I used event structure that works well.

    Now I want to exit (close) demand when I press the EXIT button on the front.

    Here, I joined my project as an indication.

    Concerning

    Hari

    Hi thinnker,

    You must change the configuration of node Sub VI for this... This, then it will open whenever you call...

  • Coming out of the event structures

    Hello

    I need to select an exercise in a table (see table).  Goto the façade and select a line with a mouse click and place the cursor on an exercise.   Can anyone suggest a graceful way to exit out of the structure of the event by pressing the Enter key, and from the exercise that you chose a string indicator?

    Thank you!

    Newton2this wrote:

    I need to select an exercise in a table (see table).

    Unfortunately, you are using a multicolumn listbox, not a table. In order to select the individual cells, you must use a table control.

    Is attached a simple implementation, perhaps this may give you some ideas. (I also assigned the key entry to the stop button).

  • Deleted by error "Timeout" case of the event Structure - how can I put back it?

    I have deleted by mistake the case of "Timeout" and then visited account there is no other way to control the State of 'rest' of my program when it first starts.

    How do I put back it?

    Is that enough to create an empty box with a constant related to the value of timeout?

    Is it possible to appoint this case "Timeout"?

    Look under in the event Sources.

  • the event structure cannot combine with other events and run only once

    Why it will always get stuck when I combined the 'new user add' event to the event of 'Login '?

    It works for me when I separate the two, but the 'Add a new user' button can work but only once for the structure above, program will be blocked on the second time that I press the button "add a new user".

    It has already been said, you must use that a single structure of the event and not 2. Also, avoid using local variables (better store data in a shift register and not in an indicator) how you do it, it can cause bad racing conditions.

    Actually here you just don't another data storage since you have a file. Don't store data file to the root of the C drive, you do not have write permission. Use the default data folder or the folder of the application.

    I have attached a simple example. I guess that's a work at home? Please make my account help: try to understand why your VI does not work and try to find a solution by yourself. Modify my sample and play with him. This is how you learn LabVIEW. If something is not clear, post here, and we can explain/help.

    Edit: has the 'connection' event, I don't check against whether the file exists or not. Difficulty of this part, gives too little practice.

  • Several events in the event Structure timeout

    I have two signals heartbearts (Boolean values that flip from true to False True at regular intervals) indicating the status of two parallel loops. I want to do to ensure that each of these loops is running at a reasonable speed and are not hung up on what whatsoever. The easiest way I can think of is a structure of event by looking at the value changes for each heartbeat with a case of timeout.

    However, I can't figured out how to combine events too AND the place where. Currently, if a heartbeat slows, the structure of the event runs again if the other loop works. In short, I want that the structure of the event to only fire if the two events occurred before the time-out period.


  • The events of mouse in the EVENT structure FAKE FIRE? Buffer Clear?

    Hi people,

    Nothing too complicated here.

    I uses a structure of the EVENT to capture keyboard events, or the mouse to operator custom popups.

    The problem is that about 1 in 10 times, if I program for several popups in a row, sometimes they trigger inputs with random Ghost and never appear to the user.

    I tried the search for keyboard trick to the top and "mouse up" instead of "mouse down". But it didn't stop him completely. It seemed to improve.

    I like to either,

    A. the problem

    B. disable the keyboard / mouse buffer before starting.

    Thanks in advance.

    PS. NOR is delayed to avoid creating popups operator more and better. I had to just get off my chest.

    The response was:

    The shot came from me hitting Ctrl-R to run the VI. When I published the letter 'R', the first VI seen as a sequence of keys and shot.

    DOH!

  • Control a Subvi VI main using the event Structure

    Hi all

    I'm moving hand Vi VI Sub values...

    However, my Subvi works with a structure of the event. (Change in value).

    So when I run my main VI and I press the highlight (yellow bulb), the sub vi does not run...

    I'm sure... I m missing something very basic.

    My main and the Subvi operate with a structure of the event.

    Please see my attached files.

    Each event structure listend to a button to calculate different: one on the respective fromt Panel. (Even if they have the same label, they are completely separate!)

    Events are mainly for any user, they won't be triggered if a terminal is written by program. If the front panel of the Subvi is closed, you cannot press the top button.

    Can you explain the purpose of your exercise? You seem to confuse you upward in some misunderstandings based on the flow of data and events.

  • Reach target FIFO in the event structure will not achieve

    Hello

    I'm just counting the time in ticks between edges mounted on two digital channels. Therefore, I use a myRIO and LabVIEW 2013 SP1 on a Windows 7 PC.

    As you can see in the attached photo, I use a FIFO extended target to switch the number of ticks between two SCTLs events to a while loop, where I want to send them via DMA to host of the RT.

    I chose this model to limit the number of DMA channel and increase the SCTLs clock (allows greater accuracy in time). The number of ticks is determined using the DSP 32 bit - built-in counter.

    However, when I run the VI no data is written to the target FIFOs scope. 'Number of elements to write' is still 127 (128 requestet), 'Number of items to read' is always zero. "ch0 post" indicates that the "real" State of the structure of the case is actually entered.

    Edit: all indicators have been added for debugging purposes. Simulation on PC indicates no error either, but I realized that no data is written to the host of RT during actual use.

    I checked the cRIO programmers guide and the high Performace FPGA Developer's Guide and do not see where I was wrong. However, it will not work.

    I would be happy if someone could help me solve this problem!

    In the lower part while loop what do you do if one of the read FIFO has expired (zero cases in the structure of the case)?

    If you set the Boolean value False in any other case (1.3) then you'll only send something to the host when the two data FIFOs received in the same loop iteration.

    If she receives a number of cycles on a FIFO in an iteration, and a number of cycles on the other FIFO in the next iteration has expired will never be null.

    To debug you may store the value 'tick count ch0 fifo' in a shift register and update only when the delta_c_ch0 FIFO does not time-out. Then you can see if this value is always nonzero.

  • several Booleans to be used in the event structure

    Hello

    I try to set up a business with several cases of Boolean structure and manage with that. What I want to do here is: I have a set of 5 values, each of which is 'true' or 'false '. For each value 'true', I have a certain set of steps to perform. The 'false' of each can be ignored. Ideally, I would like to have a structure of business for 5 cases of "true". I don't know how to go about these outputs Boolean wiring to the structure of my case. Also, I'm using LabView 6.1.

    Any ideas?

    Thank you

    Sukanya

    Oddly enough, I had actually work! I tried to use a string instead of a '=' comparison function. It works!

    Thank you all!

  • How to avoid multiple simple clicks in the Structures of the event

    I use the event structures in my program and I want to avoid the case when pressed by mistake on the button to click several times, because if the user presses the button to click several times the event is logged repeatedly and funtion within 'Change of value' is repeated several times as well. I want to avoid this scenario.

    Can someone please help in this regard.

    Well, there is the "Lock Front Panel up to that end case of event.  You may also disable the button until a timeout occurs.  Another option if you have LabVIEW 2013 or later version is to limit the number of event (option just below the locking of the front panel in the dialog box change events).

  • How to control the structure of the event

    What I'm trying to do, it's when the condtion is true, I want that the structure of the event to excute. But the event structure wil excute not except if he's changed the puch model, any idea how?

    It is more likely that he wants the sequence of events that he has set up to run after the result once changes.  If you change the logic to check the values after each numeric change (2), you will need to learn how to check to make sure that the latest iteration was not true.  Otherwise, it will start the sequence over and over.

    Really, you have to escape completely the structure of the event.  This isn't what you want.  Your code lends itself to a great state machine.

    You'll want to ask you a few things:

    (1) I want my code to run continuously or I just want to check double-digit times? (your code is currently the second)

    (2) I want the user to be able to stop my code once the sequence begins? (it is usually a Yes)

    (3) what I want 6 Road, path 5 or the comparison to happen first?  I want all run at the same time?  Do I need one before the other? (currently, you cannot predict what will happen first).

    You will need to understand the topics are: State of the machines, the flow of data, structures, business, calendar, and race conditions.  Now, you need to get you into trouble.

Maybe you are looking for