compariing of data between iterations of the loop

I am data acquisition of temperature with a Thermocouple NI 9213 drive and DAQ Assistant in a while loop.  I need to compare the temperature of a channel in an iteration of the loop with the temperature of the same string in the previous iteration.  The data collected in each iteration are delivered to a chart and a data storage file.  I know how to get the temperature from the data table in the current iteration, but don't know how to get the temperature of the previous iteration, except perhaps by reading the entire file in a table, determining the size of the table and query the last entries. This seems a bit ridiculous for each iteration of the loop and perhaps even embarrassing.   Any suggestions?

Put the data in a record time difference. The left terminal of the shift register will have the data of the previous iteration.

Lynn

Tags: NI Software

Similar Questions

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

  • How to read the data processed on frm loop on each iteration of the loop?

    Hello...

    I need to display numbers as 1, 2, 3... constantly using the loop on each iteration (IE out of the loop using threads). I generated the numbers 1 2 3... using the back power node... I can read the final value after the last iteration of the loop for.

    I connected an indicator of the loop for. This indicator displays the value as a 4 If the number of loops that 4. I couldn't view 1 2 3 4 an indicator of items at each iteration.

    I'm in a position to read the value of the variable on each iteration of the loop. Please help me fromthis regard...

    Thanks in advance...

    In fact, I'm programming for multiplication of two table 2D.

    I need to select the particular code to perform this action using the structure of the case. who is right for which I need to give the value select 1,2,3 to a case selector, so I finish the task. you got my point?

    Thanks for the reply

  • The rehabilitation of the iterations of the loop to 0

    I need help resetting my iterations of the loop back to 0.  Most of the time it works very well but has a bug.  Some background on what I'm trying to do.  Basically, I'm ordering a motor with a brake on the subject.  On the brake, there is a manual replacement option that I follow with a proximity sensor.  If the magnetic field is broken, it will stop the VI with the iteration, that he stopped.  When I press the Start button, the iteration continues. The VI stops when equal iterations # Set value witness of Cycles.  I tried the reset of the iteration option to 0 if I wanted at any time, so I put a reset button in the VI.  It works very well with the one bug. This bug is that if for some reason, the number of iterations is higher than the Set # the number of Cycles, the VI will continue to operate.  This is where I need help, because I don't know how to go about it other that pretend by setting the threshold min by a large number, forcing the operator to reset the counter.  Is attached to a peg of the area of the code.  Any help or suggestions are greatly appreciated.  Thank you!

    swins wrote:

    The LabView run VI put the button in a State of "rest" and does not run until I press the Start button.  Thanks for the reply.

    Many people write their programs as they come out of the main loop when the program is finished. Then they on the LabVIEW run button to run the application again. Worse still, they have no main loop and push the button of continuous running. Both are wrong and the latter much more.

    Sorry, I assumed you were doing that, but without seeing more code, I could only guess.

    Changing the equals or is more than one stage of debugging. What is the loop that you want continue to run or just the rest of your application? If the loop continues to run then the output of the speaker or is always false, which means that the output of equal to is never true.

    You put sensors on the exit of the tunnel connected to the Terminal to stop loop and register iterations to offset? Also to put sensors on the three terminals of equal to and activate execution of climax.

  • repeating nodes using loop but when XML string concating then concating only last iteration of the loop FOr?

    I stuck with a problem that I use FOR loop to generate expandable nodes.
    Now when I concat the node generated in the primary node and then I only last iteration of the loop FOR.
    can someone suggest me a way to manage this error...
    BECAUSE me IN 1.pl_phone_tab. County
    LOOP
    SELECT xmlelement ("phone"
    , xmlelement ("PHONETYPE", xmlattributes ('01' AS "dmnADRP_PHONETYPE"), pl_phone_tab (i) .p_phtype_tab)
    , xmlelement ("PHONENUM", pl_phone_tab (i) .p_phnum_tab)
    , xmlelement ("PRIMARY_CONTACT", pl_phone_tab (i) .p_prcon_tab)
    )
    IN p_phone_xml
    DOUBLE; END LOOP;
    SELECT xmlelement ("PhoneInfo"
    xmlconcat (p_phone_xml))
    IN p_phone_info_xml
    DOUBLE;
    Here, I'm a single node, but there must be two nodes for node of PHONE
  • use file Spreadhseet read 1 extra row each iteration of the loop

    Hello

    I wrote a program that uses number of data points according to the specified user to the settings. For each data point, I use a Spreadhseet VI reading to correct each data point according to the calibration spreadsheets I've already saved. For each data point, so I need to multiply/divide it by corresponding values in each spreadhseet of calibration. This corrected number is then displayed in a XY chart as recorded in another worksheet in the corrected values file. I placed indicators at the output of each worksheet VI reading to see what value is read. The program reads the first data in each worksheet correctly point but then to each successive iteration, the number is completely wrong, and I don't know what is happening.

    Essentially, I need to know how to read successive lines a spreadhseet file where the number of line that is read is consistent for the number of the iteration of the enclosing loop. I think that the problem lies in my inexperience with this VI because I don't know if I'm seizes my desired correctly parameters.

    I joined my program as well as two of the three calibration spreadsheet files related (the third is the same size and the same format as the worksheet example diode). The program is large enough, but the problem is contained in the case of IPCE. Spreadhseets in calibration are taken in the case of IPCE calibration.

    Thanks in advance,

    Kai

    Hello Kai,

    You should watch the context-sensitive help from and use the two ReadPosition inputs and output!

    You must provide a postion of file line-by-line reading and if you have to remember the position of reading of your last call to read. "Taking into account" can translate to LabVIEW speek by "shift register! BTW. reading a file once and using the data in the table afterwards generally are much easier for these small tables...

    But before tackle you this problem, you must get rid of at least 95% of all local variables. LabVIEW is all about the stream, it is not used (or even have) variables to process the data. Your "Overlord" VI is a bunch of (possible) race conditions mixed with a huge amount of RubeGoldberg...

    Kennst das deutschsprachige Forum LabVIEW?

  • No data found error in the loop of the nested table

    Hi team,

    I'm working on the example to get data in a nested loop using table, but didn't get the no data below found error

    DECLARE
    Is of TYPE numlist array of integer;
    list1 numlist: = numlist (11,22,33,44);
    BEGIN
    List1.Delete (2);
    DBMS_OUTPUT. Put_line ("is the last element" |) List1.last | | "total elementis' | List1.Count);
    List1.extend (4.3);


    BECAUSE me in list1.first... List1.last loop - get ANY DATA FOUND error in this line
    DBMS_OUTPUT. Put_line ('Values' | list1 (i));
    end loop;
    END;

    Could you please help me where I am wrong.

    Thank you very much.

    You get this error because the element 2 has been removed and in the loop, you are iterating over all the elements from 1 to 3.

    To avoid this, use the type of loop below:

    l_index: = names_in. FIRST;

    While (l_index IS NOT NULL)

    LOOP

    DBMS_OUTPUT. PUT_LINE

    (names_in (l_index));

    l_index: = names_in. NEXT

    (l_index);

    END LOOP;

    PL/SQL practices: Loop, first and last

  • Graph waveform repeats with each iteration of the loop

    Hi guys,.

    I got some great responses from you many already, so I hope you can help me once more!

    I try now to simply take a voltage that is measured by a sensor, I tied to AI1, and I built a graph of very simple waveform using a DAQ assistant. I have the setup terminal to CSR, the acquisition value continuous sample mode and read samples and rate game to a control on the Panel before which I can control myself. All this is a while loop that is needed to collect data over time.

    However, the problem I have is that for each loop of the loop, it seems, to reset the graph, so my x-axis never increases over time, ideally I want it to do is to show results through from 0 to 100 on the x-axis to say, and then, when it comes to 101, he will start again on the extreme left of the graphic to the right to a crossing another 100 points given) (there's a term for this, but I forgot, sorry!). To be honest, this kind of logic like everything in the loop will be restarted, but after trying to chart the loop it does not work, so I'm fresh out of ideas.

    I think I might have to do is to manually build segments of data acquisition (DAQ mx) and have only certain parts of them in the loop, although I can't be sure. I tried various examples and online on the database of NOR (including tension-int acq & graphic clk which works well in the examples, but not at my request) but no luck for now

    If anyone can think of what could be the problem, then please let me know. FYI the sensor is optical fiber if it makes a difference. I have attached the file VI that I did does not really...

    See you soon!

    Ritchie

    Since you use a chart there is no way to fix it. If you choose to go to a XY chart you could solve this problem. See the example below.

  • Graph XY plotting the question with the data of repeting inside the loop

    Hello

    I have this problem I'm having with my plots. Maybe there is a better way to do it.

    I have a set of data that I use inside a loop. I want the loop to keep reusing the same data. The reason I do that is because I want to continuously stream that loop exactly like that of my data file and plot it and do something different with it. My problem is that the XY graph does not draw correctly. I wonder if someone can help me to get field work and alo get data through the graph XY waveform.

    The files are attached. Test.VI is the main vi

    Note attachments removed by the request of the user of the admin-


  • Move data directly from inside the loop

    Is it possible to move data directly from inside a loop outside the structure of matter in real time? I would like a chart of the data in a structure of matter in real time outside the structure of the case. Ideally, it would include information of the real deal and then the waiting period as a '0' for false case. Attached is a version simplified VI I'm working. I tried the local variables, but they only read the first item for loop puts each cycle T/F. One idea is welcome including a complete change in the structure of the VI.

    Thank you!


  • time data between extraction using the database

    Hello

    I do datalogging with data 1 min interval, the logg data upward at 3 days, was preparing I use sql server, now I can't able to insert and extract data also plenty fast.  but I need to recover the data in the time specified and also a lot of wise.  could you tell me how to implement this?

    I downloaded a few vi ni.com, but his does not work...

    send me if possible example vi

    Hi DP Baro,

    See this link please

    http://vyaskn.tripod.com/searching_date_time_values.htm

    It shows how you can find date and time values. You can combine them. I don't really know if you can solve the interval of 5 minutes with her, but you can get definitifly the beach, you need. You can then filter the latest data in LabVIEW.

    See also this link for your second question

    http://www.mssqlcity.com/articles/compare/sql_server_vs_access.htm

    Mike

  • Iteration of the loop only to store data

    Hello

    wouldn't be a good practice to use a while loop with:

    • his terminal State forced true,
    • Register shift not initialized

    The idea is to store information useful to a VI only and avoid the addition of a registry to offset for the moment inside the main vi.

    I have attached two screws as example.

    Thank you

    What you try to do this is already years back and it has become a common practice. Check on the driving force of

  • Sort of the length of the sample segment longer that the iterations of the loop w/o shift registers?

    Hi all

    My loop runs about every s 0.06 and now I was prompted to add to program a function that will enjoy the latest 3 data and return the max/min value for two of the signals.  I can imagine a clumsy way by program to do this with SHIFT registers - take the max/min for each iteration, save-repeat-compare until you have enough iterations to fill 3 s of time.  But I can't help thinking there must be a cleaner way (better?) to do.

    Any help?

    Thank you

    Hello

    Try looking in a circular buffer.

    http://zone.NI.com/DevZone/CDA/tut/p/ID/7188

    Once you have determined how many times you put entries in the buffer, you will know exactly what is the size of a table to enter and do the Min/Max on.

    Another option is to use a circular table.

    http://decibel.NI.com/content/docs/doc-3414

    I would be created to operate somewhat like a Global functional or motor of the Action.   The Subvi would then be used in your loop DAQ for new data "stack."   Then called in another loop or part of your code to read every three seconds.

  • Then the iterations of the loop

    I copied Fig 4-11 of the labView 1 Basic manual and attached to it. The text establishes it stops when turned on and the value is greater than 10. It stops on the number above and below 10.

    Also if I run it with the disabled switch indicated iterations are not whole. Why is this? I thought that when looping meter would be still in one piece.

    Thank you

    JH

    Active switch: one chance to stop is when the random value is exactly, and I mean exactly equal to 1.  If I remember correctly, is not possible 0<= rand=""><>

    Iterations are integer values, if you are developing your indicator, you will find the Exhibitor being display in scientific notation.

  • Clear XY graph between iterations data

    Hello

    I'm going to erase the graph XY data each iteration of the loop, but "reset default" invoke node does not work.

    Are there other options to erase data?

    With the 2nd option (XY Express), you can also check if I = 0 and use the output of said deciding whether to reset, rather than using the shift register.

Maybe you are looking for

  • iTunes says different model?

    I have a weird problem. I own an iPhone 4s, but iTunes says I have an iPhone 3.1, yesterday he said that I had iPhone 4 and I have no idea how to fix that... Quite some time, I remember it wasn't a problem because it shows me that I have an iPhone 4

  • Microsoft Lifecam crashes when I start it. Windows XP SP3. Brand new camera. So frustrating

    New camera, then install the process, worked well.  Crashed every time. LifeCam.exe has encountered a problem and needs to close.  We are sorry for the inconvenience. AppName: lifecam.exe AppVer: 3.20.259.0 ModName: kernel32.dllModVer: 5.1.2600.5781

  • Thin black line

    Hello world I have a PSC 2355 & when I print a document from the page-filling (usually with images) I get a thin black line on the left side of the page. It varies between being nearly solid to broken, almost like a line of Morse code. There is not a

  • How to migrate scitex dolev 400 psm l2 pilot of 8 32-bit to 64-bit windows

    HelloI have 8 32-bit and 64-bit Windows.Currently I m using 32-bit version and migrated my old driver of SCITEX DOLEV 400 imagesetter (tracer) of Xp to windows 8 32-bit using Microsoft Print Migrator 3.1.I want to use the 64-bit version of win 8. Now

  • How to find the size of the table?

    Hi allCan anyone suggest how to find the size of the table? I had a few (15272 selected lines) on the name of "CMPT_" How can I check only 'CMPT_' size tables?Please someone help give the SQL query to run.Thanks in advance.Vincent