Pass continuous discrete averages out of loop

Hi,
I have a DAQ that's acquiring 1 sample at 1 Hz. I am trying to get the program to continuously acquire samples but to output the average of every 10 samples, which I use at a later point in the program for calculations. I have found a lot of topics on the NI forums that discuss running averages but this is not what I am looking for. I have also found this link that shows a labview program that can acquire a given number of samples, average them and write to a file (2nd diagram from the top). This is very similar to what I need except for the part where it displays the mean within the case structure.
http://forums.ni.com/t5/LabVIEW/How-to-make-labview-program-to-get-average-value-of-200-reading/td-p...
I am able to write the averages to a file or display them within the loop. However, I need to pass the average of every 10 samples out of the loop. In other words, the DAQ acquires continuously but at the end of every 10 seconds, the algorithm outputs the average of the data from those 10 seconds. Can anyone tell me if this is possible in Labview 2010 and what function will help me achieve this?
Thanks for reading!
av10

You are very close.  Look at your Consumer loop -- you dequeue one element from the Queue, then pass it into a "Do Forever" loop that shows the single value.  Put the Dequeue also inside the loop, and you'll have what you want.
The Producer loop will continue to put Means on the Queue.  The Queue "wire" is a bit unusual in that data can pass "backwards" through the wire (it doesn't really -- the wire just identifies a conduit in which the data travels).  Once the data is on the Queue, any Dequeue element (like the one you will move into the Consumer loop) will have access to the "conduit" and will be able to remove the data and do whatever you want with it (like display it on the Numeric indicator -- consider renaming that something more mnemonic, like "Mean Value").
One question that comes up with multiple loops is How Do I Shut Them All Down?  Here, again, Queues are your Friends.  Inside the Consumer Loop, wire the output of the Error Line coming from the Dequeue to the Stop indicator (this Consumer loop is so simple you don't need to worry about an Error Case statement).  When you Release the Queue after exiting the Producer Loop (in response to pushing the Stop control), the Queue itself will disappear, and the Dequeue function in the Consumer Loop, which is waiting for a new value, will instead throw an error.  Well, this error you will interpret as "The Queue Is Dead, Time to Stop Consuming", and by wiring the Error Line to the Consumer's Stop terminal, this will stop the second loop, and your program will exit.
Let us know if this answers your questions, and solves the problem you were raising.
BS

Similar Messages

  • I am facing a problem in passing multiple values as out parameters from fo

    Hi All,
    i am facing a problem in passing multiple values as out parameters from for loop.
    EX:
    i have a select statment inside a loop like.....
    PACKAGE SPEC:
    create or replace PACKAGE EMP_PKG AS
    TYPE TAB_NUM IS TABLE OF SCOTT.EMP.EMPNO%TYPE;
    TYPE TAB_NAME IS TABLE OF SCOTT.EMP.ENAME%TYPE;
    TYPE TAB_JOB IS TABLE OF SCOTT.EMP.JOB%TYPE;
    temp_table TAB_NUM;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB);
    END EMP_PKG;
    PACKAGE BODY:
    create or replace PACKAGE BODY EMP_PKG AS
    v_e_no NUMBER;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB) IS
    BEGIN
    select EMPNO bulk collect into temp_table from emp;
    for i in 1..temp_table.count loop
    v_e_no := temp_table(i);
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    end loop;
    end test;
    END EMP_PKG;
    PROBLEM FACING IS:
    I am expecting all rows returning from bellow select statment ...
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    But,while running the SP , i am getting error like
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at "SCOTT.EMP_PKG", line 16
    why i am not getting all values as out parameters.please provide a solution for me.
    Thanks in advance my friend.

    user9041629 wrote:
    Hi All,
    i am facing a problem in passing multiple values as out parameters from for loop.
    EX:
    i have a select statment inside a loop like.....
    PACKAGE SPEC:
    create or replace PACKAGE EMP_PKG AS
    TYPE TAB_NUM IS TABLE OF SCOTT.EMP.EMPNO%TYPE;
    TYPE TAB_NAME IS TABLE OF SCOTT.EMP.ENAME%TYPE;
    TYPE TAB_JOB IS TABLE OF SCOTT.EMP.JOB%TYPE;
    temp_table TAB_NUM;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB);
    END EMP_PKG;
    PACKAGE BODY:
    create or replace PACKAGE BODY EMP_PKG AS
    v_e_no NUMBER;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB) IS
    BEGIN
    select EMPNO bulk collect into temp_table from emp;
    for i in 1..temp_table.count loop
    v_e_no := temp_table(i);
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    end loop;
    end test;
    END EMP_PKG;
    PROBLEM FACING IS:
    I am expecting all rows returning from bellow select statment ...
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    But,while running the SP , i am getting error like
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at "SCOTT.EMP_PKG", line 16
    why i am not getting all values as out parameters.please provide a solution for me.
    Thanks in advance my friend.Probably not a bad thing that this isn't working for you.
    This is a horrible way to return the contents of a table.
    Are you doing this for educational purpose, or ... what is your goal here? If you just want to return a result set to a client you'd want to look in to using a REF CURSOR and not a bunch of arrays combined with horribly procedural (slow) code.

  • Program times out while looping at internal table with huge records - Needs fine tuning suggestions

    Hi,
    I am trying to execute a report. It times out while looping at vbap internal table. This internal table has 140000  records and does the validation within this loop and geenrates data for the output. Due to this huge volume, the program times out when executed foreground.
    There are no nested loops, so I cannot apply 'Parallel Cursor' here.
    Is there any way I can fine tune the program so that it doesn't timeout? Is it possible to apply 'Parallel Processing' . If yes, how?
    Thanks,
    Pavan

    Hi Pavan ,
                  ->sort your internal table by all primary key for vbap.
                  ->Read a Record from the table (use your condition here)
                  ->if record satisfys your where condition ,get that record index .
                  ->loop the table from the index (without condition) .
                  its like parallel cursor only but for single loop .;-)
                  ->use field symbols ,wherever possible .
               if still dump is coming ,contact your basis team .
    regards,
    Krishna.

  • How to cast vector to vector with out using loop. and how to override "operator =" of vector for this kind of condition.

    Hi All How to TypeCast in vector<>...  typedef  struct ...  to class... 
    //how to cast the vector to vector cast with out using loop
    // is there any way?
    //================ This is Type Definition for the class of ClsMytype=====================
    typedef struct tagClsMytype
    CString m_Name;
    int m_Index;
    double m_Value;
    } xClsMytype;
    //================ End of Type Definition for the class of ClsMytype=====================
    class ClsMytype : public CObject
    public:
    ClsMytype(); // Constructor
    virtual ~ClsMytype(); // Distructor
    ClsMytype(const ClsMytype &e);//Copy Constructor
    // =========================================
    DECLARE_SERIAL(ClsMytype)
    virtual void Serialize(CArchive& ar); /// Serialize
    ClsMytype& operator=( const ClsMytype &e); //= operator for class
    xClsMytype GetType(); // return the typedef struct of an object
    ClsMytype& operator=( const xClsMytype &e);// = operator to use typedef struct
    ClsMytype* operator->() { return this;};
    operator ClsMytype*() { return this; };
    //public veriable decleare
    public:
    CString m_Name;
    int m_Index;
    double m_Value;
    typedef struct tagClsMyTypeCollection
    vector <xClsMytype> m_t_Col;
    } xClsMyTypeCollection;
    class ClsMyTypeCollection : public CObject
    public:
    ClsMyTypeCollection(); // Constructor
    virtual ~ClsMyTypeCollection(); // Distructor
    ClsMyTypeCollection(const ClsMyTypeCollection &e);//Copy Constructor
    DECLARE_SERIAL(ClsMyTypeCollection)
    virtual void Serialize(CArchive& ar);
    xClsMyTypeCollection GetType();
    ClsMyTypeCollection& operator=( const xClsMyTypeCollection &e);
    ClsMyTypeCollection& operator=( const ClsMyTypeCollection &e); //= operator for class
    void Init(); // init all object
    CString ToString(); // to convert value to string for the display or message proposed
    ClsMyTypeCollection* operator->() { return this;}; // operator pointer to ->
    operator ClsMyTypeCollection*() {return this;};
    public:
    vector <ClsMytype> m_t_Col;
    //private veriable decleare
    private:
    //===================================================
    ClsMytype& ClsMytype::operator=( const xClsMytype &e )
    this->m_Name= e.m_Name;
    this->m_Index= e.m_Index;
    this->m_Value= e.m_Value;
    return (*this);
    //==========================Problem for the vector to vector cast
    ClsMyTypeCollection& ClsMyTypeCollection::operator=( const xClsMyTypeCollection &e )
    this->m_t_Col= (vector<ClsMytype>)e.m_t_Col; // how to cast
    return (*this);
    Thanks in Advance

    Hi Smirt
    You could do:
    ClsMyTypeCollection* operator->() {
    returnthis;};
    // operator pointer to ->
    operatorClsMyTypeCollection*()
    {returnthis;};
    public:
    vector<ClsMytype>
    m_t_Col;//??
    The last line with "vector<xClsMytype>
    m_t_Col;". It compiles but I doubt that is what you want.
    Regards
    Chong

  • In workflow need to check in passed validaitons and check out failed once?

    Hi All,
    Can any one let me know is the following requirement possible?
    In workflow can I able to split records based on validation result? I need to check in passed validations and check out failed validations..
    Regards
    Rajeev

    Hi Rajeev,
    You can try out both branch step and validation step and see which serves your purpose better.
    In branch step you can give multiple validation/validation groups,if result is TRUE take the first branch and check in at STOP.
    If FALSE,take dont checkin at STOP,either cascade or Rollback as the case be.Also here you can call the same or other Workflow.The split branches can later be combined using MERGE or Group.
    Other way can be by using Validation step,setup iteration threshold.here failed jobs will be sent to previous step and passed ones will move ahead in WF.Later you can checkin at STOP and failed jobs would still be in WF in checkout state.
    For your reference :
    http://213.41.80.15/SAP_ELearning/OKEC/nav/content/011000358700000601512007E.PDF
    http://help.sap.com/saphelp_mdm550/helpdata/en/43/e0615a82b40a2ee10000000a11466f/frameset.htm
    Thanks,
    Ravi

  • I am a teacher and I want a formula for Numbers that will average out A, B, C, D and E's of my students.

    As the title says- I'm not much of a formula wizard and any help would be appreciated. Here's an example-
    Student A receives a B, C, A, A, D, A for 6 assignments. I want them to average out at the end of the row, as well as an average on a separate page of summaries for all subjects that are assessed this way.
    Ive seen it on an excel spreadsheet but was unable to look at the formula.
    Please help as the semester starts in a week for us in Australia!
    Thanks

    ellroy wrote:
    I basically want a formula where I can average Letters out to a B- or C+. Can I do this from just letters alone or do I need to assign numbers. Speaking to my curriculum coordinator, she said stick to LETTERS and see if we can sort out something for that as we don't officially report in numbers.
    So that would mean I would need an average formula that would calculate B + C + C + D + A into a single Letter. I dont know if it is possible without using numbers. I hope you understand what I'm trying to explain. It's quite hard!
    You say where the cutoffs are, is that A=90-100%?
    Can you just use letters to make an average of the letter? 
    AVERAGE, which calculates the arithmetic mean of a set of values, works with numerical values.
    On your posted layout, you have a table showing the letter equivalent of a percentage score:
    A score under 40 = E
    A score 40 or higher, but under 50 = D
    A score 50 or higher, but under 65 = C
    A score 56 or higher, but under 85 = B
    A score 85 or higher = A
    Those numerical scores may be summed, averaged, and a letter grade assigned. With the specifications given in that table, the letter grade will not include a + or -.
    Your layout includes nine numerical scores for the first student (all of which are well under 40. My assumption here is that each is the student's score out of the number in the same column of row 3 (ie, the first, 13, is 13 out of 14, the second is 10 out of 16, etc,)
    This raises a question:
    Does each point noted contribute equally to the final average?
    Or
    Does each quiz/exercise contribute equally to the final average?
    For the letter grades to be averaged, you will need to set a specific numerical equivalent (not a range) for each letter grade.
    For the letter grades and number grades to be combined into a single final letter grade, the numerical equivalents noted above must be chosen with that goal in mind, OR the numerical scores must be converted into letter grades, then reconverted into specific numerical equivalents for each letter grade, inserted into the set of (converted) letter grades, averaged, then reconverted to the equivalent letter grade.
    As you can see, there are yet a few hurdles to overcome.
    Regards,
    Barry

  • I have a new Macbook pro, I cannot get past the country selection screen.  'Continue' is greyed out and keys just make error sounds. How do I move it on?

    I have a new Macbook pro, I cannot get past the country selection screen.  'Continue' is greyed out and keys just make error sounds. How do I move it on?

    sideeque wrote:
    I have the same problem. What did you do last time?
    What  should I do now? Its around 40 miles away the apple store? Would they pay my taxi fare to go and return?
    How can we trust this apple product?
    You are still under warranty.  Call Apple Care.

  • Never get out of loop

    With the below example, Im never getting to the "Out of loop message".It iterates through loop alrite but never comes out of it.
    Any ideas anyone?
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ((line = br.readLine()) != null) {
    System.out.println("In loop");
    System.out.println("Out of loop");

    I think it something to do with the fact that the readline method reads to a '/n' and the stream may not have this termination point.

  • I have been trying to work on my homework all afternoon, via NAU's blackboard system. I am continuously getting booted out of the system, with an error stating "Data execution prevention". How can I prevent this from continuing?

    I have been trying to work on my homework all afternoon, via NAU's blackboard system. I am continuously getting booted out of the system, with an error stating "Data execution prevention". How can I prevent this from continuing?

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • I have an iPad 1.  It continually kicks me out of Facebook and other apps and the Internet.  Help?

    I have an iPad 1 that continually kicks me out of Facebook, some games, and Internet searches.

    Hey there Larry,
    It sounds like your iPad is closing your apps without notice. I would start by closing all the running apps on the iPad first:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that and restart the phone and test the issue again:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • No headphones will work on my iPad mini. Sound just continues to come out of speakers

    My iPad mini will not produce sound on any headsets it continues to play out the speakers even with headsets in

    Or go to the store, wait in line, and go 1-800-Geek-Squad. Then hand over the phone to the geek squad guy at the counter when it's your turn, so both departments are confused.
    Don't actually do this.
    However, yes, there could be a number of issues with that, it's kind of hard to diagnose over the boards. If you can't figure it out by the time the store opens, bring it in - or call the phone number for 24/7 support.
    I am a Bestbuy employee who volunteers on these boards on my own time. I am not paid for posting here, and you should understand that my opinions are exactly that - opinions. I do not represent Bestbuy in any way.
    : Open Mailbox

  • How to pass Single record set out to another Procedure in a LOOP

    In my complete Order lines FOR LOOP, I want to pass one line out to call another program to perform the insert or update action. How to write
    PROCEDURE order_line_process
      p_username      IN VARCHAR2,
      p_id            IN OUT NUMBER,
      my_orderdtl_tbl IN OUT my_orderdtl_tbl_type
    ) IS
    BEGIN
      FOR x IN 1 .. my_orderdtl_tbl.count LOOP
        IF my_orderdtl_tbl(x).update_flag = 'I' THEN
          order_line_insert(p_username      => p_username,
                            p_id            => p_id,
                            my_orderdtl_tbl => my_orderdtl_tbl(x));  --- how do I pass only one line info here? Do I have to assign/pass all column?
        END IF;
      END LOOP;
    END order_line_process;Thanks

    My example still works:
    SQL> create or replace package test2 is
      2  type my_orderdtl_rec_type is record (a number,b varchar2(10),update_flag char(1));
      3  type my_orderdtl_tbl_type is table of my_orderdtl_rec_type index by binary_integer;
      4  end;
      5  /
    Package created.
    SQL> create or replace procedure order_line_insert(p_user varchar2, p_id number, my_orderdtl_tbl test2.my_orderdtl_rec_type) is
      2  begin
      3   null;
      4  end;
      5  /
    Procedure created.
    SQL> create or replace  PROCEDURE order_line_process
      2  (
      3    p_username      IN VARCHAR2,
      4    p_id            IN OUT NUMBER,
      5    my_orderdtl_tbl IN OUT test2.my_orderdtl_tbl_type
      6  ) IS
      7  BEGIN
      8
      9    FOR x IN 1 .. my_orderdtl_tbl.count LOOP
    10      IF my_orderdtl_tbl(x).update_flag = 'I' THEN
    11        order_line_insert(p_username,
    12                          p_id,
    13                          my_orderdtl_tbl(x));
    14      END IF;
    15
    16    END LOOP;
    17
    18  END order_line_process;
    19  /
    Procedure created.But if you're using the following syntax to pass parameters:
    SQL> create or replace  PROCEDURE order_line_process
      2  (
      3    p_username      IN VARCHAR2,
      4    p_id            IN OUT NUMBER,
      5    my_orderdtl_tbl IN OUT test2.my_orderdtl_tbl_type
      6  ) IS
      7  BEGIN
      8
      9    FOR x IN 1 .. my_orderdtl_tbl.count LOOP
    10      IF my_orderdtl_tbl(x).update_flag = 'I' THEN
    11        order_line_insert(p_username => p_username,
    12                          p_id,
    13                          my_orderdtl_tbl(x));
    14      END IF;
    15
    16    END LOOP;
    17
    18  END order_line_process;
    19  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE ORDER_LINE_PROCESS:
    LINE/COL ERROR
    11/7     PL/SQL: Statement ignored
    11/7     PLS-00306: wrong number or types of arguments in call to
             'ORDER_LINE_INSERT'Dublecheck the parameters name in the order_line_insert procedure
    SQL> create or replace  PROCEDURE order_line_process
      2  (
      3    p_username      IN VARCHAR2,
      4    p_id            IN OUT NUMBER,
      5    my_orderdtl_tbl IN OUT test2.my_orderdtl_tbl_type
      6  ) IS
      7  BEGIN
      8
      9    FOR x IN 1 .. my_orderdtl_tbl.count LOOP
    10      IF my_orderdtl_tbl(x).update_flag = 'I' THEN
    11        order_line_insert(p_user => p_username, -- THE ERROR WAS HERE!!! CORRECT PARAMETER NAME IS P_USER
    12                          p_id => p_id,
    13                          my_orderdtl_tbl => my_orderdtl_tbl(x));
    14      END IF;
    15
    16    END LOOP;
    17
    18  END order_line_process;
    19  /
    Procedure created.Max
    http://oracleitalia.wordpress.com

  • Usb-6009 high-speed continuous acquisition for slow control loop application

    Hi,
    After watching a few Youtube videos, I successfully built a control loop in LabVIEW using my USB-6009. Currently, this loop is limited by the speed my actuator can take and respond to commands, topping out at 200 Hz. This is completely sufficient for my application. My question is more regarding the wasted potential of the USB-6009 to acquire samples at a much higher rate than what would be obtained if I used a simple single sample-on-demand during every iteration of the loop.
    It seems to me that having the USB-6009 continuously acquire samples and having my control loop periodically check in for the latest data when it is ready to execute would have the advantage of allowing me to average groups of samples together to lower the overall noise associated with the measurement process (I am reading voltages from an amplified photodiode).
    1) Does anyone know how I would instruct the USB-6009 to continuously acquire at say 10 kHz, so that on each loop I will have 50 or so samples that can be averaged together for a more accurate measurement of my control variable? Unfortunately, I'm new to this and not too familiar with DAQmx Timing.vi.
    2) I've heard that reading into a buffer can increase latency for moving data into the computer. Given the low speed of my control loop, I don't foresee this as being a problem. Is this a correct assumption? I can probably live with an extra millisecond of latency.
    3) I goofed around briefly with DAQmx Timing and managed to see a buffer overflow error. Certain rare events will by necessity cause my control loop to take much longer to execute, so I cannot guarantee that occasionally during normal operation I will not overflow the buffer. Can I suppress this error so that the dialog box does not pop up and the program continues to run uninterrupted? If the buffer overflows and old data gets overwritten it isn't a big deal for me since the control loop is only concerned with the latest data anyway.
    Thanks for any info!

    Howdy Patrick!
    Here is a picture of the front panel:
    Here is the block diagram:
    And I've attached a copy of the VI saved for LabVIEW 7.1.
    Regards,
    Barron
    Applications Engineering
    National Instruments
    Attachments:
    most recent samples.vi ‏73 KB

  • How to pass the sequence number of current loop in a for loop in FPGA vi to the host

    PCI-7830R
    LV 8.2
    What I was trying to do is to use multiple DIO to generate pulse at different sequence. Mode one is to automatically sweep from DIO1 to DIO20; mode 2 is several DIOs generate pulse simoutaneously.  So I use a case structure to make the selection, in the mean time, I set up two for loop in each case so that I can use multiple pulse generations. For example, in scanning mode, if I set 2 exposures, it sweeps from 1 to 20 then do it again.  
    Then I need to get the loop sequence number, i of each scenario. So I put an indicator within the first loop, and create a local variable of it and put in the second one.  Running the FPGA vi alone, I can see the indicator change in each case from 0 to N-1, N being the for loop time.But in the host vi, I tried to add this indicator as an element in the read/write invoke method, in the debugging mode, I could only see it directly jump to N-1 without all the changes I saw in FPGA vi. 
    Is it possible to get this number passed correctly from FPGA vi to the host vi? Thanks

    Thanks for the reply Jared.
    Excuse me if it looks incorrect, but I'm new to FPGA programming, so I would have to look into the FIFO you referred to.  I used local variables because for one thing I have several different cases containing for loop in each of them, and I only want one indicator for the "i".  If I put the indicator out of any for loop, it's only gonna show the last number which is N-1.  For the other thing, it seems like property nodes are not allowed in FPGA vi.  And by doing this, I can see the i number changing from 0 to N-1 in each case, well, in FPGA vi's front panel.  But while I ran the host vi with everything, the indicator in host vi's front panel only showed the last number N-1. It may be the reason you said, it happened too fast before the indicator in host vi can catch it.
    What I want to realize is to group the data I collect in host vi, for example, when I choose multiple exposure in each mode, and the FPGA runs 1 through 20 then do it again, I want the data stored in two groups using the loop sequence number as the seperator in file name.  So it goes like 1-1, 2-1.......20-1; then 1-2, 2-2,.....20-2.

  • How do I move data from a DAQ into and out of loops and structures?

    I have a set of RTD probes set up to read data into LabView through a DAQ. This block of code is in a while loop
    that executes alongside of several other loops simultaneously. I need to use the data from the RTD probes in other
    loops and case structures specifically for logic tests.
    The problem is that I can't seem to bring the dynamic data out of the DAQ containing while loop or into the other structures.
    Any ideas?
    I have had some success with using multiple DAQs and stopping all others while I need the data inside of a case structure.
    Is there a way to reference data from a DAQ or to run multiple DAQs that read the same data from the same channels without getting a "Task in use error"?
    Thanks,
    -David

    Search the forums for Prodcuer/consumer architecture.
    This uses queues to pass data from the producer loop (such as your data acquisition loop) to other "consumer" loops.  These are the other loops where you want to use the data.
    You won't be able to use multiple DAQ Read functions at the same time.  As you've seen you get error -50103 about the resources already being in use.

Maybe you are looking for