addEventListener inside a for loop

Seal of the code that I need to create a number of text box controls and text is based on an input variable that will emulate columns. Each loop sets the TextArea (col) and the text (pCol) control properties and methods based on the iteration (i). When I run problems, that's when I add an event listener for the TextArea component.

Rather than create a listener different for each iteration (col1, col2, col3, etc.), the listener is redefined. The result is that the last text built control reflects any changes made to the final textarea built; However, no other text controls are updated on the evolution of the corresponding text box.

I don't know that I'm a little something missing here. Someone saw?

Thanks in advance!

Otherwise if you use the id as 'col' + colNum and there will be less than 10 boxes, then you can use:

private void changeHandler(event:Event):void {}
var idx:int = int (event.currentTarget.id.slice(-1));
Text (placardHBox.getChildAt (idx - 1)) .text = event.currentTarget.text;
}

Of course, if you do a basic designation zero, you don't have to deal with the stuff of subtraction.

TS

Tags: Flex

Similar Questions

  • Create a directory tree: how to call a global function from inside a for loop

    Hello

    I am trying to create a workflow that will create a directory tree in vCenter.

    Concept:

    Basically, I am trying to execute nested for loops for each level of the tree to the caller a global tree.

    Problem:

    The 1st loop for works and creates the file 'Dev '.  The second loop for does not work with error message:

    [19:16:16.219 2013-06-27] [I] building Dev folder
    [19:16:16.474 2013-06-27] [I] directory Built: Dev
    [19:16:16.476 2013-06-27] [I] the records building servers
    [19:16:16.480 2013-06-27] [I] TypeError: cannot find the createFolder function in dev object. (Workflow: TEST_TNG_New_Site_Folder_Structure / Scriptable task (item2) #36)

    I think it has to do with JavaScript not being not able to call a global function in a nested object (I'm not a programmer and don't know JavaScript, so don't shoot me on that :)

    Code: (will clean this up once I do work)

    var folderBase is ['Dev', 'DMZ', 'Prod', 'UAT'];.

    var folderT1 = ["servers", "Jobs"];

    var folderT2 = ['Window', 'Linux'];

    var folderT3 is ["Repo2', 'Repo3', 'Repo1', 'Repo4'];.

    var folderT4 is ["T1", "T2", "T3"];.

    Create the files folderBase level

    for (var i = 0, l = folderBase.length; i < l; i ++) {}

    var rootFolder = parentFolder;

    buildFolderTree (folderBase [i]);

    Create the files folderT1 level

    for (var j = 0, l = folderT1.length; j < l; j ++) {}

    var rootFolder = folderBase [i];

    buildFolderTree (folderT1 [j]);

    Create the files folderT2 level

    for (var k = 0, l = folderT2.length; k < l; k ++) {}

    var rootFolder = folderT1 [j];

    buildFolderTree (folderT2 [k]);

    Create the files folderT3 level

    for (var x = 0, l = folderT3.length; x < l; x ++) {}

    var rootFolder = folderT2 [k];

    buildFolderTree (folderT3 [x]);

    Create the files folderT4 level

    for (var y = 0, l = folderT4.length; y < l; y ++) {}

    var rootFolder = folderT3 [x];

    buildFolderTree(folderT4[y]);

    }

    }

    }

    }

    }

    function buildFolderTree (folderName) {}

    System.log ("Building folder" + folderName);

    rootFolder.createFolder (folderName);

    System.log ("directory of frame:" + folderName);

    }

    Any help will be appreciated.

    Thank you

    B

    Hello

    The createFolder() method returns the object VcFolder to the folder just created, for the new file to be used immediately.  Here is how I modified the code:

    Create the files folderBase level
    for (var i = 0; i)
    var newBaseFolder = buildFolderTree (parentFolder, folderBase [i]);
    Create the files folderT1 level
    for (var j = 0; j)
    var newT1Folder = buildFolderTree (newBaseFolder, folderT1 [j]);
    Create the files folderT2 level
    for (var k = 0; k)
    var newT2Folder = buildFolderTree (newT1Folder, folderT2 [k]);
    Create the files folderT3 level
    for (var x = 0; x)
    var newT3Folder = buildFolderTree (newT2Folder, folderT3 [x]);
    Create the files folderT4 level
    for (var y = 0; y)
    var newT4Folder = buildFolderTree (newT3Folder, folderT4 [y]);
    }
    }
    }
    }
    }

    function buildFolderTree (parentFolderObj, folder_name) {}
    System.log ("Building folder" + folderName);
    var newFolder = parentFolderObj.createFolder (folderName);
    System.log ("directory of frame:" + folderName);
    return NewFolder;
    }

  • Restarting a task for the acquisition of data inside a For loop

    Hello

    I need iterate through my acquisition of data. Currently, I'm doing this through the creation, implementation and tasks for the acquisition of data inside a loop For which is iterated according to the needs of compensation. Unfortunately, the creation of these DAQ tasks slow down my code.

    I would like to be able to create the tasks outside the loop, pass them in and revive the tasks at the beginning of each iteration. Is there an easy way to do this?

    Otherwise, is there a way to make the standard DAQmx digital startup trigger trigger several times (so that it starts each pulse data acquisition in a long pulse rather than just the first pulse train)?

    Thank you!

    -Evan

    I whent before and created this example for you (and many others.)

  • Transpose the row of columns inside a FOR LOOP

    Hi all


    I'm on 11g R1 and I have 2 tables
     
    select * from table1; 
    
    PRODUCTNO   PRODUCT_NAME STATUS 
    --------------     -------------------- -------- 
             1          TV 5 
             2          CAR 5 
             3          COMPUTER 5 
            4      Accessories 5 
    
    select * from table2; 
    
    PRODUCTNONO                 PART_NAME 
    ---------------------       -------------------- 
              1                 ANTENNA 
              1                 CABLE 
              2                 BRAKES 
              2                 TYRES 
              2                 SPARK PLUGS 
              3                 MONITOR 
              4                 PRINTER 
              4                 KEYBOARD 
              5                 MOUSE 
    In a PL/SQL block, I have the cursor
     
    cursor cur_1 (P_name varchar2) is 
    select a.productno,a.product_name,a.status, b.part_name 
    From table1 a, table2 b 
           Where a.productno = b.productno 
    and b.part_name = P_name; 
    a l_col collection that stores the values of part_name little, something like

    ANTENNA
    CABLE,
    BRAKES,
    TIRES,
    SPARK PLUGS,
    MONITOR

    I now have in the pl/sql block
     
    for j in 1 .. l_col.count loop 
    For L_Carq In cur_1 (L_col(j).part_name) 
                    Loop 
                      Dbms_Output.Put_Line(L_carq.productno || ' | ' || 
                                             L_carq.product_name || ' | ' || 
                                             L_carq.part_name || ' | ' || 
                                             L_carq.status); 
                      Dbms_Output.Put_Line('-----------------------------------------------------------------------------------------------------------------------------------'); 
                        --/* 
                             Update table1   
                                  set status = 0 
                                  Where  productno = (l_carq.productno ); 
                             Commit; 
                        --*/   
                  End Loop; 
    and the dbms_output is
     
    PRODUCTNO PRODUCT_NAME    PART_NAME STATUS 
    ------------------ ----------------           -----------------   ------------ 
        1 TV            ANTENNA   5 
        1 TV            CABLE   5 
        2 CAR            BRAKES   5 
        2 CAR            TYRES   5 
        2 CAR            SPARK PLUGS   5 
        3 COMPUTER      MONITOR          5 
    You have an idea how I can get the dbms_output as
     
    
    PRODUCTNO PRODUCT_NAME    PART_NAME                STATUS 
    ------------------ -----------------------    -------------------                                 ---------- 
        1 TV            ANTENNA,CABLE 5 
        2 CAR            BRAKES,TYRES,SPARK PLUGS 5 
        3 COMPUTER      MONITOR                 5 
    On SQL, I could format the output very easy, but unfortunately I'm forced to use the loop for.

    Any help is appreciated.

    Thank you
    Dani

    The collection must be extended "manually":

    -- initializing with the default constructor (you can do it in the declaration section) :
    l_col := sys.odcivarchar2list();
    
    For K In D Loop
      l_col.extend;
      l_col(l_col.last) := k.part_name;
    End Loop;
    

    I can't specify each part_name in where clause

    Where do you source?
    If there is another table, you can use BULK COLLECT, but maybe I don't see the whole picture here?

    Published by: odie_63 on August 2, 2010 16:45

  • Oracle 11g: engage inside the outer loop or loop

    Hello

    Could someone pls help in this regard.

    My PLSQL program retrieves approximately 400 000 thousand records in cursor loop and cl, it takes more than 4 hours to complete IT.

    I commit every transactions inside the cursor loop... This can affect the runtime performance?


    Also, pls suggest, can we use commit 400 000 transactions once it will be faster? (or) the performance of baskets longer than the current situation.


    My goal is to make the fastest program and expect to reduce the timing of execution of 4 hours to 1 hour...


    Appreciate your help...


    Program design: advice:

    a. Select 400 000 thousand documents in the cursor.

    b. inside cursor for loop to two new sql instructions written to get values and store it in the local variable (this value is used in the call to insert data), two sql statements are handled with no_data_found and too_may_rows logic implicit sql statements to intercept the errors of the company

    c insert statement.

    validation of d. inside the loop (batch mode: nowait)

    management at the level of the procedure using raise_application_error exception e...

    Do not use the PL/SQL for data processing. SQL is a powerful language. Get the best out of him.

    Here is an example of using INSERT ALL. This is untested code and may contain syntax and semantic errors.

    insert all
      into medicomread.aatable_permit_people
      (
            permitnum
          , lic_num
          , lic_type
          , bus_name
          , addr1
          , addr2
          , addr3
          , city
          , state
          , zip
          , ph1
          , ph2
          , fax
          , bus_lic
          , lic_original_issue_date
          , expiration_date
      )
      values
      (
            appt_ref_no
          , lic_num
          ,'Business License'
          , company_name
          , postal_address
          , null
          , null
          , null
          , emirate
          , po_box
          , telephone
          , null
          , fax
          , license_no
          , issue_date
          , expiry_date
      )
      log errors into err$_aatable_permit_people ('INSERT1: HEALTH CARD SPONSOR DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , name
          , b1_contact_nbr
      )
      values
      (
            appt_ref_no
          , 'Applicant'
          , cname
          , userseqno
      )
      log errors into err$_aatable_permit_people ('INSERT2: HEALTH CARD BUSINESS USER DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , B1_Contact_Nbr
          , Name
          , gender
      )
      values
      (
            appt_ref_no
          , 'Individual Health'
          , userseqno
          , patient_name
          , ***
      )
      log errors into err$_aatable_permit_people ('INSERT3: HEALTH CARD APPLICANT USER DETAILS') reject limit unlimited
    with t1
    as
    (
     select mr.appt_ref_no
          , mr.sponsor_name
          , substr(mr.PATIENT_NAME,1,79) PATIENT_NAME
          , mr.***
       from medicomdata.mc_register mr
          , medicomdata.mc_process_type_register mptr
          , medicomdata.um_users uu
          , medicomdata.um_companies uc
      where mr.patient_id     = mptr.patient_id
        and mr.pro_id         = uu.user_id
        and mr.facility_id    = mptr.facility_id
        and mr.process_type   ='OH'
        and mr.regn_status    = 5
        and mr.sponsor_name   = uc.company_name
        and uu.type_id        = 3
        and (add_months( mptr.issued_date, 12 )-1) > sysdate
    ),
    t2 as
    (
     select decode(ucr.license_category_id,'DED','DED'||uuc.license_no,uuc.license_no) lic_num
          , uuc.company_name
          , ucr.postal_address
          , ucr.emirate
          , ucr.po_box
          , ucr.telephone
          , ucr.fax
          , uuc.LICENSE_NO
          , ucr.issue_date
          , ucr.expiry_date
       from medicomdata.um_companies uuc,medicomdata.company_registration ucr
      where uuc.license_no=ucr.business_license_number
        and uuc.inactive=0
        and upper(ucr.request_status)=upper('true')
    ),
    t3 as
    (
     select uu.company_name
          , cname
       from (
             select uu.first_name ||' '|| uu.last_name cname
                  , row_number() over(partition by uu.company_name order by decode(usr.service, 'HCDC', 0, 1)) rno
               from medicomdata.um_users uu
                  , medicomdata.user_service_request usr
              where uu.user_id      = usr.user_id
                and usr.service     = 'HCDC'
                and uu.type_id      = 2
                and uu.inactive     = 0
             )
      where rno = 1
    )
    select t1.appt_ref_no
         , t1.patient_name
         , t1.***
         , t2.lic_num
         ,'Business License'
         , t2.company_name
         , t2.postal_address
         , null
         , null
         , null
         , t2.emirate
         , t2.po_box
         , t2.telephone
         , null
         , t2.fax
         , t2.license_no
         , t2.issue_date
         , t2.expiry_date
         , t3.cname
         , companyuserseq.nextval userseqno
      from t1
      join t2
        on t1.sponsor_name = t2.company_name
      join t3
        on t1.sopnsor_name = t3.company_name;
    
  • For loop inside a loop For

    Is it possible to perform all iterations of the inside of the loop for each iteration of the loop outside? I've attached a screenshot of my program if it helps. If possible can you tell me how to do it please?

    A thought I have is that I think you want these nodes of feedback reset for each iteration of the loop from the outside.  Personally, I would like to change the shift registers (it would clean your scheme a little more).

  • Schedule iteration five FOR lines inside a timed loop...

    Take a look at the attached code simply run five different but identical TO the lines inside a single loop timed.

    It is interesting to note the timings of each loop iteration FOR: 1,1,2,3,0 milliseconds. The most curious is the moment of the last loop, which for the most part indicates 0! Not only this, if you remove the fifth loop, the fourth a bed 0.

    I can't understand this behavior? Also if LV deals in parallel different loops why should there be a gradual increase in the synchronisation of successive loops?

    Thanks for any help.

    First, 0.2 ms is not statistically significant, you must increase the number of iterations by another factor of 10, at least.

    A quick loop uneducated wait FOR will grab the CPU for much more than one iteration, so regardless of the loop is first online will repel the other loops and run until LabVIEW decides to switch to another loop. The number of cores CPU do you have?

    You can force a release after each iteration by placing a 0ms wait inside each loop FOR. While all time will be significantly longer because of the overhead of increased switching, all loops will be now around the same time.

    You can also read this for more information.

    I don't know that anyone else can provide more details in the jargon of right. I don't know the correct terms for all this.

  • declareing cursor for loop inside another cursor for loop

    Hi friends,

    Is it possible declareing cursor loop within another cursor for loop for.

    Please guide for example?

    You can even declare cursor within the cursor loop

    declare
    cursor c1 is select deptno from the Department;
    BEGIN
    for cr1 in c1
    loop
    declare
    cursor c2 is select ename from emp where deptno = cr1.deptno;
    Start
    for cr2 in c2
    loop
    dbms_output.put_line (CR1. DEPTNO | ' ' || CR2.ename);
    end loop;
    end;
    end loop;
    end;

  • The execution of a stored procedure from inside the cursor for loop?

    I posted this in the SQL Developer forum, but I tried in SQLPlus and get the same error, so I think it's an encoding issue.
    I have a piece of code that I'm trying to write that will only be executed once. The goal: we have three tables relating to the pieces of information. Each table has a column that stores the number of site that belongs to the part. We want to copy the parts of a site to about 130 sites which don't have any info on parts. The number of site is stored in another table. So I created three stored procedures, one for each of the three tables that we, who take 2 inputs: a source and destination site. Procedure names are: ptfile_copy_fac, ptxref_copy_fac and ptvndrs_copy_fac.

    The problem I have is that I can run the procedures in a separate worksheet in SQL Developer, but when they are integrated in this cursor for loop, I get the following message from SQL Developer:

    ORA-06550: line 23, column 11:
    PLS-00103: encountered the symbol "PTFILE_COPY_FAC" during the expected in the following way:
    := . (@ %; immediate)
    The symbol ': = ' was replaced by 'PTFILE_COPY_FAC' continue.

    He repeated this for each of the three methods. I have attached the code I am trying to run below. He expects an assignment operator, but I have no idea why.

    If there is a better way to do this, by all means let me know. I'm a SQL Server guy, I'm not sure how to do what I do using PL\SQL.

    / * Declares the variables source_fac and dest_fac.
    The source_fac is the installation that we copy parts.
    The dest_fac is the installation we copy parts to.* /

    DECLARE
    source_fac facility.facility_num%type;
    INSTALLATION OF DEST_FAC. TYPE % FACILITY_NUM;

    / * Declare cursor to use loop for.
    Slider load number installation and the status of the installation.
    Is not installation of 1 or 2, since these will be
    the main source of facilities.*.

    CURSOR fac_cursor
    IS
    SELECT
    facility_num,
    div_state
    Of
    installation
    WHERE
    facility_num NOT IN (1,2);
    BEGIN
    FOR fac_row IN fac_cursor
    LOOP

    / * Test for the State of the installation. If a Canadian State, the source_fac value 2.
    Otherwise, the value source_fac 1.* installation.

    IF fac_row.div_state IN ("AB", "BC", "Mo", "NB", "NL", "NT", "NS", "NAKED", "WE", "PE",
    "QC", "SK", "YT")
    THEN
    source_fac: = 2;
    ON THE OTHER
    source_fac: = 1;
    END IF;

    / * Sets the installation of destination to the facility_num from the cursor * /.

    DEST_FAC: = FAC_ROW. FACILITY_NUM;

    / * Execute the three procedures, past of the source and dest AEC variable * /.

    run ptfile_copy_fac (source_fac, dest_fac);
    run ptxref_copy_fac (source_fac, dest_fac);
    run ptvndrs_copy_fac (source_fac, dest_fac);

    END LOOP;

    END;

    Published by: SunDevilKid on March 3, 2010 15:31
    Update the comments you make more sense of the code.

    EXECUTE is a SQLPlus command, change your code to

    dest_fac := fac_row.facility_num;
    ptfile_copy_fac(source_fac, dest_fac);
    ptxref_copy_fac(source_fac, dest_fac);
    ptvndrs_copy_fac(source_fac, dest_fac);
    END LOOP;
    

    Max
    http://oracleitalia.WordPress.com

  • parallel for loops does not

    Hello.

    I'm learning the multi - thread programming. To start, I use "parallel for loops" and I was surprised that it does not work. One - thread loop work a few times faster (depending on settings) that multi - thread. I don't know why, and it is my request to correct my Vi to work properly.

    Lenovo, G580, Windows 7, 64-bit computer

    Intel Core i7 3632QM
    Ivy Bridge
    Specification Intel (r) Core i7-3632QM CPU @ 2.20 GHz
    Package (platform ID) Socket 988 B rPGA (0x4)
    Number of hearts 4
    Number of threads 8

    LabView 2011.

    Altenbach says:

    Gibbon wrote:

    What was 'strange' behavior?  In "linia dluga" when inside the loop is on '1' of the "spreed up' between one and multi-fil is about 3 times, when I put it in '20' this grow to 6.2. It was strange form me, becourse I expect a similar value.

    A parallel FOR loop has an overhead for parallelization (split the problem, then go back the results, etc.). If the code is very fast, the overhead is proportionally larger. If the Subvi takes a long time to complete, the overhead of parallelization is insignificant. It is often not worthwhile to parallelize the loops with a very simple and fast code.

    Gibbon wrote:

    Altenbach - I have another question if you can help me - how did you "seconds relative high resolution." VI "? -I want to say how did you know that there is this 'vi '. And thanks a lot for your modyfications.

    You can find it in vi.lib\utilities. It is well known.

    Maybe not well known enough!  the 'Hidden gems' package adds to your palattes.  It has also been considered by a nugget of the community

  • FOR loop does not update the local Variable

    I am newer to labview, and I can't wrap the head around why not a habit of local variable to update in the code if it updates on the dashboard. Anything im missing?

    Assume that you are talking about the local variable of the 'State of the cell. The terminal updates every 500ms in the small top loop, the local variable indicates simply that the indicator and thus updates also.

    The problem is "dataflow" and you need to familiarize yourself with the concept!

    Once the while loop starts, the local variable is reading and inside the loop begins. Most likely, the local variable is read before it is updated in the small loop, so most likely returns the value of a fade on the first iteration of the while loop. Now the small loop continues to go twice per second for about five seconds. Only after the loop FOR (and everything else inside the while loop) completed, the while loop will go to the next iteration, date on which the local variable is read once more, this time with the last value of the last for loop iteration of the previous iteration of the while loop.

    In summary, the local variable updates very well, it's just that the code does not read the new value around most of the time.

    Your VI is full also potential competition conditions caused by the over-use of the local variable. You need to respect the proper execution order by eliminating local variables.

    So what is the solution? Hard to say without knowing what the VI is supposed to do. Most likely, you will need to remove the inside OF the loop and use it outside while loop for everything.

  • Creating tables in a nested for loop

    Hi all.

    I was stuck in this problem for quite a while now and I still don't know how to continue. Some outside the entrance would be greatly appreciated!

    I'm doing the following:

    -Take an array of numbers, to check if they are within a certain range (e.g. between 2 and 4)

    -Build two new arrays: one with all the numbers that are inside the beach and the other with the rest.

    An additional condition is that the amount and value of the range conditions will change (for example, it could be between 2 and 4 only / 2, 4 AND 6 and 7 according to the entry)

    To treat this, I created two nested for loops - one that goes on a table that contains conditions of the beach and inside that actually go and check if the values are in the range. I think I did that part successfully, but the next part is confusing to me - how to actually create the tables separated within two loops for?

    My apologies if I did not explain it well. Another method to support this problem is I want to translate following LabVIEW:

    Ranges of table / / [1 5 7 10] exodus-> This means we want to divide numbers based on those who are in (1,2) and (4.5) against those who are not

    Table of values / / [2 3 6 11 3]

    EndOperationDelegate table / / array of values within the range
    Table outValues / / Array of values out of range

    for m = 1:size (ranges)

    for n = 1:size (values)
    If (THE NUMBER IS on the INSIDE of EACH RANGE)
    EndOperationDelegate = [EndOperationDelegate NEWNUMBER]
    on the other
    outValues = [outValues NEWNUMBER]
    end

    end
    end

    Sounds easy enough, but it gets so chaotic with Labview that I don't know what to do. I have attached a reference image - insertion in the array function is not in fact add to the table, it creates a new table. How can I save that for when the nested for the ends of the loop?

    I have seen a few examples with shift registers which lie in a loop and I couldn't successfully that transfers in my block diagram.

    Any help/direction would be greatly appreciated.

    Hello!

    See the following example to understand how you can create a table in the loop For

    In your case, you also can uce conditional terminal to create a table only when then located nearby. It makes the code much cleaner that the structures of the case

    Hope this helps, if not, let me know if I can help you!

    Marcin

  • jump on a for loop

    Hi guys,.

    I have the impression that this is a stupid problem and know the solution if probably obvious, but I can't seem to find it

    I have a loop with several inputs and outputs in a Subvi.  When the Subvi is run all entries are read, the loop is skipped, and the outputs are sent.  Does anyone have any idea why the for loop is ignored?  Everything seems to be wired corretly?...

    The vi is attached.

    Thank you!
    Christopher

    I can't open your code due to my having LabVIEW 2009, but here's one thing to check: do you have automatic indexing on at all?  Perhaps, he does not run the expected amount of time due to a table being wired like 'auto-index' to your loop for?

    Another thing to check is try to place an indicator on the output of the variables 'N' and 'i' of the loop (letters of blue boxes that appear automatically).  That should tell you the "N" land of shadow of time it will perform an iteration and the value of the current 'i' reiteration.

    When you use the execution to highlight, you see it execute the code inside the loop?  If so, how many times?  And how did you expect?

  • Have different conditions for loop start and stop

    I do a VI when a circle is moving on an image control and its movement is decided by programming, but also by the user. I have programmed the speed of the circle as a vector which turns (using a rotation matrix) when a certain condition is met. This condition is dependent on the position of the circle and direction as well as other entries. The tricky thing is I want to that when the rotation condition is met (true), the rotation continues until the angle of the vector is equal to the original angle (when the condition became real) + / variable x.

    So my question is how do I program a piece of code that once activated, will run until a stop (depending on the State of vector early in the race) condition is reached. As it should be when the VI is on, I can not put a while loop inside an another while loop. Online help mentions also conditional for loops, but it isn't available in my version of LV (8.2)

    The correct solution is a state machine with a case inside a single while loop structure. Based on the need to use one of the several cases and move on to another matter as necessary using a state variable (for example, an enum) in a registry change. One of the cases should be slowed down and not do much except maybe controls survey.

    There are a lot of models.

    Do not hesitate to contact a simplified example of your code and help you.

  • Slow loop inside the quick loop

    It's my first week of work with LabView so perhaps the answer is very simple.

    Here's my question:

    How can I include a slow loop (event B) inside a quick loop (event A)?

    What I would like is for event B run every 1000 milliseconds, and the event has every 100 milliseconds.

    Where event is a position control loop and event B a simple write to a file of any measure.

    Any recommendations on how I should do this?

    You can use an Express VI of time spent inside the quick loop to see if it is time to perform the slow loop.  I took the liberty to not use a loop for your "event B" because it sounded like you want just the rhythm with the event.  Place B events in the real case of the box Structure. The design of producer/consumer model is the way to go if you are developing a complex application. This will make if your problem is relatively simple.

Maybe you are looking for