Iteration of a loop at the outbreak of an external analog source

Hi, first I apalogize if it's a question of trival, but I'm relatively new to LabView programming and I can't seem to understand.

I'm setting up a VI which records data on the outbreak. My setup of data acquisition is a BNC-2090 connected to a PCI MIO 16th-4. I can say that I am able to set up my tasks in DAQmx to read data on the outbreak, but I can't seem to get the labview VI to record these data with the right timing.

What I would like is a loop run whenever he sees the analog edge of relaxation, I'm sure that labview is capable of that. Can anyone help? Thanks in advance!

Thank you both for the replies. I got a work around for now.

Tags: NI Software

Similar Questions

  • Asking how I can pass array generated using the registry to offset at the end of the iteration of a loop in the beginning of a new iteration?

    Hi guys,.

    I currently have a problem in my Final project of the year at the Nanyang Technological University, Singapore.

    Basically, currently I develop a Lab View 2009 comb filter (attachment: filter2.vi correct comb)

    Entry into the comb filter is delivered in lots of 1000 samples.

    However, I'm supposed to process data on a continuous basis.

    Basically, my comb filter takes the difference between the current sample (sample t number) and the number of the sample (t-40) and divides the result by the square root of 2.

    The problem is that for the second lot from, I have to take the difference between each sample 40 first the current batch for each sample 40 last of the previous batch. My program currently cannot deal with this problem since it can not pass the 40 sample past the current batch in the batch so that we can perform this task. I tested it using test comb filter.vi (attached).

    Could anyone help with a suggestion?

    I would really appreciate since the approach of the project deadline.

    Thanks before.

    Kind regards

    Agus Frédéric

    School of mechanical and aerospace engineering

    Nanyang Technological University

    Send samples of past 40 current a shift register. When you read then it's going to be the last 40 precedents.

    Then subtract previous last 40 40 first current and divide. Fact.

    Basically, as indicated in attached vi.

    /Y

  • Rate the triggered loop of the timed iterations of TTL

    Hi all

    I have a camera control VI that awaits the shutter of the camera TTL information and use it as a source of synchronization for a timed loop. In this timed loop, the camera is read and analyzed. Program should respond as soon as possible a new image and that's why I put the timed loop to "Throw missing items" so that it does not seek to catch up (events im trying to detect is quite rare and last several frames).

    The problem is this: when I put the camera for a certain numebr of frameworks (e.g. 10,000) sometimes due to discarded frames ever loop iteration number the last number of frame expected and do not remove (it remains to 9.998 for example). I noticed I can stop it by deselecting "maintain phase." However, it is clear to me what happens exactly with these settings in a situation of TTL triggered.

    It is true that the loop passes the new data directly but starts the next loop the correct number of iteration (+ 1)? Or something else happening?

    IM grateful for any help!

    Dear j.win,

    If you deselect the option 'Maintain the Original Phase', in fact you never will reject any iteration, whatever the value "Discard missed items." On the contrary, the loop will try to catch up the iterations of the end.

    Use of a source of external synchronization (for example your TTL) instead of a source of internal synchronization does not change. You can use the 'period' entrance (dt) of the loop timed to specify when the loop is supposed to go (the unit is the "ticks" in the case of an external synchronization source). A value of '1' means that test loop to iterate over all the graduations of external synchronization source. If for any reason any iteration lasts longer than that, you'll have an iteration "end". Also with a value of '1', it is not possible to change the "phase", then the parameter "Initial Phase to maintain" will be defined only weather or not ignore you the iteration. If 'Maintain initial Phase' is set to false, the loop will run immediately after an end iteration to run always, but a little of the latter. If the 'Maintain initial Phase' is true, the loop will run immediately after an iteraion end if the option 'remove point missed' is false otherwise the loop will jump the iteration.

    It's more clear now?

    Kind regards

  • How to control (or know) the speed of iteration of While loops?

    Hello world!

    Currently, I am implementing a 2 bit counter in LabVIEW. Fortunately, I was able to find examples on the forums of NOR.

    Yet, in real life, speed of the ILO 2 counters are controlled by a clock switching frequency to produce different outputs 4.

    In VI I downloaded, the 2 bit counter plays quickly with an unknown speed. Trying to put timing delays and other tools, but I have to at least be able to control the 'real' speed of counter 2 Bit inside the while loop.

    Is there a any basis on what is the speed of iteration of the While loop when the loop? I have really need to know the real speed and how to control this speed because I need to sync for demultiplexing purposes.

    Thank you and best regards.

    ____________

    Falsehope


  • How do you give each iteration of a loop IF %

    Subject: Send a signal to step to a stepper motor driver at regular intervals.   My first try to use a loop was a failure because the data is only passed on a loop when the loop ends.   Instead this application requires the data to be passed on a loop on each iteration.

    What happens if changes can be made to a loop for output at each iteration?  Or, if a loop is not suitable for this application which is preferable?

    Howard

    A loop looks like a reasonable approach. But you will have to send the signal to each iteration of the loop, then talk to the stepper motor inside the loop on each iteration. You can also think of calendar of loop (how fast you want to send commands to your engine) and stop the loop (for example, the user clicks on a stop button).

    Another concept, you can familiarize yourself with are state machines. LabVIEW courses cover these, and there are many messages about the machinery of State here on the forum.

  • [ADF, JDev12.1.3] master / detail af:tables the link is handled by ExecuteWithParams: how to create a master report / detail in a loop on the lines?

    Hallo,

    I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.

    The 1st tab uses a master VO while the 2nd uses a VO detail.

    Between 2 your, there is not a link of VO master / detail.

    Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).

    I would now like to generate a report that loop on the master table and that, for each line of master:

    • He writes in the report;
    • loops of registration of details (which are based on the master record) and also writes the report.


    Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?

    Here I am interested how do to loop through the data, not in how to write the report.

    Thank you

    Federico

    Yes it will affect the selected line. If you want to ignore try using this code

        DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator");
        ViewObject vo = iter.getViewObject();
        for (int i = 0; i < vo.getEstimatedRowCount(); i++)
        {
          Row r = vo.getRowAtRangeIndex(i);
          System.out.println("DeptId= " + r.getAttribute("DepartmentId"));
        }
    
  • [Bug] Audio editing in child clip nested loops when the parent is made to gotoAndStop (1) after playing once.  FP + 18.0.0.324, FP19, FP20

    Essentially, once a movieclip was played, he heads to gotoAndStop (1) will cause audio within its child clips to loop, although the timeline will never trigger the.

    We noticed this bug popping up in a lot of product delivered and it goes back to the public Service 18.0.0.324 update (.225 is OK).

    Debug configuration: even after replacing EDI with FP20 projector, it can always does when you preview of Flash; but he will present in the projector, AX, FF and Chrome plugins.

    Create movieclip 'wrapper' on the main timeline at least 2 images.

    Create movieclip "subitem" within the envelope at least a few images of long.  Incorporate audio on a keyframe in a subitem.  No keyframes.

    For my test, a subelement is never allowed to play, and the audio is located on the frame 5.  Frame 1-4 contains "stop()" and one the event for debugging purposes.

    Add this code to the main timeline

    wrapper.addEventListener ("blah", foo);

    function foo(e:Event):void {}

    wrapper.removeEventListener ("blah", foo);

    wrapper.gotoAndStop (1);

    }

    and has wrapper dispatches an event 'blah' on its last image.

    Result: Seen outside the IDE, 'wrapper' play once, stops, and audio clip starts a loop with a rehearsal time based on the length of a subitem, despite the fact that a subelement does not actually play.  I added a text box and channeled text of debugging for it so that subitem would fall within its current framework, and it never leaves the Framework 1.

    Mysterious!


    Bonus: I traced a click of the mouse for SoundMixer.stopAll (), but he keeps only a single instance.  Don't know if TI which is a useful detail, but he suggests that each iteration is a new instance, once again, as if the home itself was in a loop.

    Solution: Play audio via code (Sound.play ()) instead of points in the timeline does not trigger this bug.

    Edit: (I hope that's enough to recreate.  I can provide a FLA on request, had thought that there was an ability to 'fix' this forum.)

    Edit 2: I forgot the Question.  Is there a workaround that can be achieved via a post parameter, or something global?  We have hundreds (thousands?) of files to the difficulty for our clients if this bug is not get patched in before they update past FP 18.0.0225.

    We injected a similar bug over the holidays that must be resolved. (We can have * just * past this fix today.)

    You still see this symptom with the latest version of the Flash Player? (20.0.0.286)

  • A loop in the dvSwitches at the exit of the trade

    I see some unexpected behavior when I try to separate my script the inscription was of all the port groups on dvSwitches at the data center level.  I tried to build a loop around the script that would be subject to an action on each dvSwitch specific vs conglomerating all groups in all ports (initial script works fine, just at the exit is a little messy).  What happens now is it seems to be properly running through each dvSwitch and creation of output for each switch, but the result is the same for each switch.  So that I have some sort of logical error - need to reset the table at the end of the loop or something like that.

    Another bit of household I have addressed successfully before but now does not try to eliminate the members of the specific group - in this case, the output of dvUplinks (I'm only interested in trade).  I used a select-string - notmatch in the previous code, but it does not work here (you will see commented out below).  I tried a few iterations of the Where-object methods - notcontains researcher here use without success: http://www.powershellcommunity.org/Forums/tabid/54/aft/3993/Default.aspx

    $dvSwitch = get-VirtualSwitch-distributed Datacenter - bla
    {foreach ($dvs to $dvSwitch)
    Get-VirtualPortGroup | »
    Select Name, @{N = 'VLANId'; E={$_. Extensiondata.Config.DefaultPortConfig.Vlan.VlanId}}, NumPorts | »
    # select-string - notmatch 'dvSwitch-DVUplinks "| "
    Export-csv d:\scripts\portgroups\$dvs.csv
    }

    Any advice is (as always) very much appreciated.

    Dave

    You must specify which switch you're looking for trade

    $dvSwitch = Get-VirtualSwitch -Distributed -Datacenter blah foreach ($dvs in $dvSwitch) {
        Get-VirtualPortGroup -VirtualSwitch $dvs |
        Select Name, @{N="VLANId";E={$_.Extensiondata.Config.DefaultPortConfig.Vlan.VlanId}}, NumPorts |
        export-csv d:\scripts\portgroups\$dvs.csv}
    
  • LinkedList iteration end at beginning until the condition is true.

    I realized that adding objects in LinkedList by addLast (E, e) keeps inserting ordered Unlike add(E e). What I'm trying to accomplish is to loop through the elements of the end of the list initially until a loop condition is met (until this iterator only meet the first element with statusInt = 9). My real data are presented as LinkedList, but it contains some 100,000 items with statusInt2 = 9 and 100 items with statusInt2 = 8. Since all elements with statusInt2 = 9 are before the elements with statusInt2 = 8 I want a loop between the end and the break out of the loop if it encounters the first element with statusInt2 = 9 because it is unnecessary to continue the closure. My current code does not work. It has something to do with the functions hasPrevious() and previous(). My preconditions are properly defined and how do I fix my current implementation?
    My current implementation code is:
    package testing;
    
    import java.util.LinkedList;
    import java.util.ListIterator;
    
    public class KeyPair {
         
         String keyStr;
         Integer statusInt;
         Integer statusInt2;
         
         public KeyPair(String keyStr,Integer statusInt,Integer statusInt2){
              this.keyStr=keyStr;
              this.statusInt=statusInt;
              this.statusInt2=statusInt2;
         }
         
         public static void main(String[] args) {
              
              LinkedList<KeyPair> kp = new LinkedList<KeyPair>();
              
              kp.addLast(new KeyPair("xdfe",1,9));
              kp.addLast(new KeyPair("aafx",0,9));
              kp.addLast(new KeyPair("vvfe",1,9));
              kp.addLast(new KeyPair("vsfx",0,9));
              kp.addLast(new KeyPair("vsaa",0,9));
              kp.addLast(new KeyPair("bbbv",1,8));
              kp.addLast(new KeyPair("ggaa",0,8));
              ListIterator<KeyPair> it = kp.listIterator();
              while (it.hasPrevious())  {
                   Object object = (Object) it.previous();
                   System.out.println("KEY: "+((KeyPair)object).getKey()+"," +
                             " "+"STATUS 1: "+((KeyPair)object).getStatus1()+"," +
                             " "+"STATUS 2: "+((KeyPair)object).getStatus2());
                   if(((KeyPair)object).getStatus2()!=8)
                        break;
              }
              
         }
         
         public String getKey() {
              return this.keyStr;
         }
         
         public Integer getStatus1() {
              return this.statusInt;
         }
         
         public Integer getStatus2() {
              return this.statusInt2;
         }
         
    }

    totalnewby wrote:
    I realized that adding objects in LinkedList by addLast (E, e) keeps inserting ordered Unlike add(E e).

    Your understanding is wrong. (E) add and the addLast (E) add at the end of the list. All lists (from the standard API) preserve the order of insertion with the add() method.

  • For loops with the cursor line and indexing

    Hi all

    I have a question about the loops with the cursor, line and indexing.

    How can I scan via a cursor with an iterator?

    I would use an iterator as

    Whole LoopIndex;
    Whole LoopIndex2;

    for LoopIndex at the beginning of the cursor at the end of the cursor
    loop
    line =: cursor [LoopIndex];
    for LoopIndex2 of LoopIndex at the end of the cursor
    etc...
    end loop;

    I need to use an iterator because I need to use a nested for loop.



    OR


    How can I solve the following problem?

    Class name % ofClass average test Score
    1 Niobe 7 8 8.4
    1 alena 4 7 7.5
    1 9 7 8.9 Estia
    1 Lilly 10 8 9.8
    1 Sandra 6 8 8.3
    1 Melanie 8 8 8.1
    Nadia 2 8 3 4.4
    Sayuki 2 9 8 8.4
    Diasy 2 7 8 8.0
    Flower 2 7 8 6.5
    Diana 2 6 8 7.3
    3 Flora 7 8 5.8
    Sukiya 3 4 8 8.4
    Samantha 3 10 8 7.7
    Roxanne 3 7 8 6.9
    Eline 3 8 8 7.4

    I need to
    -By class, I need to recalculate each average people
    -By class, I need to calculate the % of class score (sum averages / people in the class)

    So it can be done in a nested for loop?
    Or do I just step by step?

    Well, based on this information it would be something like...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as Class, 'Niobe' as Nm, 7 as Score, 8 as Tests, 8.4 as Average from dual union all
      2             select 1, 'Alena', 4, 7, 7.5 from dual union all
      3             select 1, 'Estia', 9, 7, 8.9 from dual union all
      4             select 1, 'Lilly', 10, 8, 9.8 from dual union all
      5             select 1, 'Sandra', 6, 8, 8.3 from dual union all
      6             select 1, 'Melanie', 8, 8, 8.1 from dual union all
      7             select 2, 'Nadia', 3, 8, 4.4 from dual union all
      8             select 2, 'Sayuki', 9, 8, 8.4 from dual union all
      9             select 2, 'Diasy', 7, 8, 8.0 from dual union all
     10             select 2, 'Blossom', 7, 8, 6.5 from dual union all
     11             select 2, 'Diana', 6, 8, 7.3 from dual union all
     12             select 3, 'Flora', 7, 8, 5.8 from dual union all
     13             select 3, 'Sukiya', 4, 8, 8.4 from dual union all
     14             select 3, 'Samantha', 10, 8, 7.7 from dual union all
     15             select 3, 'Roxanne', 7, 8, 6.9 from dual union all
     16             select 3, 'Eline', 8, 8, 7.4 from dual)
     17  --
     18  -- END OF TEST DATA
     19  --
     20  select class, nm as "NAME", score, tests, average
     21        ,round(((average*tests)+score)/(tests+1),1) as avg_person
     22        ,round((average / sum(average) over (partition by class))*100,1) as class_average
     23  from t
     24* order by class, nm
    SQL> /
    
         CLASS NAME          SCORE      TESTS    AVERAGE AVG_PERSON CLASS_AVERAGE
    ---------- -------- ---------- ---------- ---------- ---------- -------------
             1 Alena             4          7        7.5        7.1          14.7
             1 Estia             9          7        8.9        8.9          17.5
             1 Lilly            10          8        9.8        9.8          19.2
             1 Melanie           8          8        8.1        8.1          15.9
             1 Niobe             7          8        8.4        8.2          16.5
             1 Sandra            6          8        8.3          8          16.3
             2 Blossom           7          8        6.5        6.6          18.8
             2 Diana             6          8        7.3        7.2          21.1
             2 Diasy             7          8          8        7.9          23.1
             2 Nadia             3          8        4.4        4.2          12.7
             2 Sayuki            9          8        8.4        8.5          24.3
             3 Eline             8          8        7.4        7.5          20.4
             3 Flora             7          8        5.8        5.9            16
             3 Roxanne           7          8        6.9        6.9          19.1
             3 Samantha         10          8        7.7          8          21.3
             3 Sukiya            4          8        8.4        7.9          23.2
    
    16 rows selected.
    
  • To loop through the array and check mouse events

    I have an array of objects. I want to continuously loop in the table and see if the user made a ROLL_OVER or click on one of these objects.

    I regularly did something similar where I loop in a table and look for collisions with a moving object (but who uses hitTestObject: see code below)

    Someone can help me please with how to do the same for the rollover, then click on?

    First of all, a little clean to make it more effective. It is best to declare variables once. If for you the current code I would as follows:

    var k: uint;
    var classRef_mybooth: Class;
    var MC_mybooth: *;
    for (k = 0; k< xmldata.booth_data.length();="" k++)="">
    class classRef_mybooth = getDefinitionByName(xmldata.booth_data[k].@asset);
    MC_mybooth = new classRef_mybooth ();
    MC_mybooth. Name=XMLDATA.booth_data[k].@name;
    MC_mybooth.x=XMLDATA.booth_data[k].@XPos;
    MC_mybooth.y=XMLDATA.booth_data[k].@yPos;
    MC_mybooth. Width=XMLDATA.booth_data[k].@XScale;
    MC_mybooth. Height=XMLDATA.booth_data[k].@yscale;
    MC_mybooth. Number=XMLDATA.booth_data[k].@number;
    boothArray.push (MC_mybooth);
    MC_booth_holder. AddChild (MC_mybooth);
    }

    Second, I guess that all classes whose names in XML are available for Flash (imported, etc.)

    Now, I add a listener that is unique to all of the objects and then do what I do with them based on the target of the event:

    inside the loop on each iteration:

    MC_mybooth.addEventListener (MouseEvent.ROLL_OVER, rollOverListener);

    Later:

    function rollOverListener(e:MouseEvent):void {}
    trace (e.Target.Name); or whatever the variables that you can use. Your target is the object that they roll.
    return;
    }

    Is this what you need?

  • Try to connect to my yahoo on Safari takes me in a continuous loop to the login page. It works very well with Firefix.

    Try to connect to my Yahoo on Safari brings back me in a continuous loop to the login page. My registration using Firefox works fine.

    IM using ios10 on an iPhone 6 s

  • If I share a garageband project, other users will see that my saved loops on the side that I have preferred

    If I share a garageband e-mail project, the other person will see that my saved loops on the side I have prefer?

    maamefrommississauga wrote:

    If I share a garageband e-mail project, the other person will see that my saved loops on the side I have prefer?

    No, this information is stored locally on your computer only

  • Apple Configurator 2: Installation of the application blocks / loops over the placeholder of transfer

    I tried to set up a cart with Apple Configurator 2. I'm in iOS 9.2, iPad 2 Air and El Capitan. I tried to put in place following the blue print instructions, but that, as a dismal failure as this resulted in 16 of the 20 iPads being brick. So I was their implementation of a group of 20, first install a profile and installing apps. I tried to install my apps, but which have resulted in a loop and the errors that have no definition massively. So now I install apps in small groups of 3-5 applications. The problem that I am running is sporadic looped / hung when I install some applications. There seems to be no rhyme or reason. When I try to install the application on its own, the problem persists. It hangs at step "installation of placeholder. So far, this has happened with: Garage Band, Photo Collage and Socrative Teacher Edition. To solve the problem, I have to 'remove' the partially installed apps and then renounce install the specific application. Even if I try to install the application on its own, the problem persists. Any suggestions on how to fix this? I'm banging my head against the wall here. I'm on hour 25 + (not counting the nights where I hit a button, go home and come back on a random error).

    Thank you!

    I'm having the same exact problems, described to a T, I also try to update / prepare several wagons and Config 2 has recently been the total scourge of my work. I love the interface and think I have a solid understanding of how to use the program, but the process never ends. I thought whole point of the program was to be able to add/remove/update / manage iPads massively, but it seems to be able to get everything that fact I can only work with 2-3 iPads, both. Even so, I also have problems with remains of place holders or partially installed or removed applications. Please let me know if there is anything I can do to allow this program to run more smoothly.

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

Maybe you are looking for

  • Bootcamp partition no longer works

    I decided one day that I tried to install Ubuntu on my Macbook.  At the point where I had an OSX and a partition, Bootcamp for Windows 10.  I followed the instructions to install rEFInd to install Ubuntu, but had trouble with her and decided to unins

  • I have no camera (coming soon!) Cat use headset only possible?

    Sorry if the answer is on these forums or on the site somewhere, I looked long, but can not find an exact match for my situation. For now I have a very old PC and no camera at all. Soon I will have a new computer laptop and everything that goes with

  • Pavilion G6: Error Code 43 after update Intel HD graphics card

    Hello. My laptop HP Pavilion G6 consists of cards 2 graphs: 1-Intel HD Graphics Family 2 Radeon HD 6470 M Today, I opened my device manager, and I tried to update my Intel HD Graphics. Finally, there is an update for it, and after it was done, it dis

  • Dolby software

    Is included Dolby Advanced audio IDT high definition driver software for my HP Pavilion g7 hp? Need an answer.

  • life cycle of Windows 8

    I read the site Web de Microsoft o i.e. the lifecycle on windows 8 to receive the updates and until 12/01/16 security patches unless you update to 8.1. We have windows 8 at work and can not use 8.1 because is not compatible. with some of the macros i