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.

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

  • How the entry changes with each iteration of the while loop

    Hello

    can anyone explain (clarify) to know how or what contribution will be fed like the d block of adaptive filtering for the first, second entry (n) and remaining iterations of the while loop as shown in the picture as an attachment...

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    Thank you.

    You have a shift register on the edge of the loop, so for the first iteration, the input (n) d will get everything that feeds the shift register on the left of the outside. After that the adaptive filtering performed, e (n) is injected in the shift to the right, register to be read from the shift register on the left on the next iteration. And so on. This seems pretty much what you want.

    PatanGova wrote:

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    If you need retain the value in calls, use a node that is initialized in the world of feedback to feed out of the while loop at the entrance.

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

  • How to add items to a table 1 d with each iteration?

    Hello

    I have a 3 loop iteration For which gives a table of 5 elements after his execution. At each iteration of the loop, how can I add each item to its previous value to form a final picture of the cumulative sum of the parts? For example:

    Array of values for 1st iteration: [A, B, C, D, E]

    Array of values for 2nd iteration: [F, G, H, I, J]

    Array of values for the 3rd iteration: [K, L, M, N, O]

    How can I make the Final table being a cumulative amount of IE: [(A + F + K), (L + B + G), (C + H + M) (D + I + N) (E + J + O)]?

    Your help will be apreciated, thanks!

    The Add function is polymorphic. So, if you give 1 2 tables you will get a table that corresponds to the sum of each item. With a loop, you must use a node registry or feedback shift to keep track of the sum of the currents.

    For example:

  • 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

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

  • 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
  • Work with each iteration on my db

    Hi my process should work with each iteration on my database, so I write some time initially, but now IM hinking t that it won't work. If I need that my process with al my data I need to do?

    Thank you

    I do not have you problem entirely. Can you explain a little more

    Thank you
    Brijesh Kumar Singh

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

  • Hierarchy with each Member of the child's repeated occurrences

    I created a simple hierarchy in OBIEE Administration tool, as follows:

    Hierarchy.JPG

    When I create an analysis using this hierarchy, I would expect the following:

    Expected.jpg

    Instead, I'm multiple occurrences of each Member of the child, as follows. I do not know what is causing the failure, because none of these criteria, I have included in the analysis.

    Actual.jpg

    Take a look at the generated query physical if you are 100% sure of what groupping done OBIEE and from there you can find on the issue.

    You can also start by dual control key you defined (Sun and hierarchy) and, of course, that I'm sure you didn't play too much with content levels to set some strange things, but they are well positioned to match your hierarchies, right?

  • How to save a graph after each iteration in a loop for?

    Hello

    I wrote the code that initializes a spectrometer. Once initialized, if the "Capture" button is pressed, the spectrometer takes a new spectrum three times (see loop for) every second. This spectrum is shown as a diagram in my front. My code works fine... it will update the spectrum every second.

    However, I would like to be able to record each of these three iterations in the form of separate graph. Basically I want to click on "Capture" and have my code to save three graphics to a specified folder. How can I do this?

    I have attached my VI.

    Thank you.

    Probably the easiest is to take the data of the for loop and pass out in a tunnel that is indexed.  Manipulate the resulting data table you want.  You could also do a producer/consumer and write files as the data comes out.

  • Repeat for each issue of the artboard

    I have a script that makes guides around the edge of the artboard. It works great when you only have a single work plan, but has problems when there is more. You can see what's not here?

    #target illustrator
    var docRef = app.activeDocument;
    var artboardRef = docRef.artboards;
    
    //repeat for each artboard
    for(i=0;i<artboardRef.length;i++){
    
      //get artboard size
      var left=artboardRef[i].artboardRect[0];
      var top=artboardRef[i].artboardRect[1] ;
      var right=artboardRef[i].artboardRect[2] ;
      var bottom=artboardRef[i].artboardRect[3] ;
    
      //create lines
      var lineLeft = docRef.pathItems.add();
      var lineRight = docRef.pathItems.add();
      var lineTop = docRef.pathItems.add();
      var lineBottom = docRef.pathItems.add();
    
      //set line points
      var leftmargin = (72);
      var rightmargin = (72);
      var topmargin = (72);
      var bottommargin = (72);
      
      //set line points
      lineLeft.setEntirePath([[leftmargin, 0], [leftmargin, bottom]]);
      lineRight.setEntirePath([[right - rightmargin, 0], [right - rightmargin, bottom]]);
      lineTop.setEntirePath([[0, 0 - topmargin], [right, 0 - topmargin]]);
      lineBottom.setEntirePath([[0, bottom + bottommargin], [right, bottom + bottommargin]]);
      
      //make lines guides
      lineLeft.guides = true;
      lineRight.guides = true;
      lineTop.guides = true;
      lineBottom.guides = true;
    
    };
    

    you have coded hard '0', it should be changed to variables, otherwise, it will point to the same x or is coordinated

     //set line points
      lineLeft.setEntirePath([[left+leftmargin, top], [left+leftmargin, bottom]]);
      lineRight.setEntirePath([[right - rightmargin, top], [right - rightmargin, bottom]]);
      lineTop.setEntirePath([[left, top - topmargin], [right, top - topmargin]]);
      lineBottom.setEntirePath([[left, bottom + bottommargin], [right, bottom + bottommargin]]);
    
  • 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.

Maybe you are looking for

  • FCPX does not open due to a "problem".

    I have the new FCP X something 10.2 or 10.2.1. I used it for a long time, then suddenly today, I open my final cut, and I get this message:it's NEVER happened before. I tried to restart my computer etc, but nothing worked? Why was he able to work fiv

  • Wi - Fi satellite A355-S6925 disconnection problems

    Hello I've owned this phone for about 4 months now. It is running Vista and I encountered problems with the wireless network since then. I use a D-Link DIR-655 router. My problem is:When they surf the internet, web pages will load quickly a minute an

  • Hide the gray bar at the bottom of the screen of the iPad Pro

    iPad Pro; Is it possible to hide the gray at the bottom bar, as I do with my Mac laptop?

  • Is it possible to programmatically save all?

    Does anyone know if there is a method to 'save everything' as you would for the project? Or do I have to get all the screws of the project of recursively, myself? I don't see a method to invoke nodes associated with a project reference. Just try to a

  • How can I find the OS CD-ROM disk for my old HP Pavilion?

    I have my original desktop (HP Pavilion 523n - 2003).  It requires a boot disk which of course, I did not, but I don't have the product key.  This can lead me to a CD-ROM that contains the original operating system?