Producing a XY chart in a While loop that adds a new point XY to the curve from each while the loop iteration

I would like to plot data by using the XY graph as a Visual display. I have a While loop that creates a new point X and Y during each iteration. I need the XY graph to be in the While loop, because once the order to stop has been pressed the sis loop finished and the final graph to be displayed. The problem is that after each iteration, the XY graph display clears and watch point, compared to add the new point to the previous by a line connecting the two points. It works perfectly if I move the XY graph out of the While loop, but it only shows the XY graph at the end of the While loop. I would like to visually see the XY graph updated during the execution of the While loop. Any help would be much appreciated.

Thank you

You can add a data both point to a chart to a chart, you must pass the entire data group.  I would use a couple of shift registers in your loop.

Tags: NI Software

Similar Questions

  • OR USB-6009 daq sample following loss, while the loop iteration

    Hello

    I am trying to acquire and display data measured from a DAQ NI USB-6009 material using Labview 2015. I am using the wizard daq defined for the differential mode and n samples with the sample rate and the total number of samples registration by the user. My problem is that when the specified amount of samples is acquired and the while loop continues to the next iteration, some samples are removed (I know because I tested it acquire a wave of fishing and there is a noticeable artifact in the signal at times where the while loops - I downloaded a file showing this artifact in a wave of fishing that was recorded with a sample rate of 1000 Hz 500 samples of recording each) iteration which means that the artifact occurs every half second).

    I think that this can be corrected by simply taking off the while loop daq assistant and specifying the number of samples you want the entire test to acquire. However, I would like to see the signal in a graph as its achievements and the daq can acquire data indefinitely until the user presses the stop which, to my knowledge, it would take a while looping. I downloaded my vi for reference, and any help would be greatly appreciated!

    Set your Acqisition Mode on "samples continues."

    N samples: reads the desired number of samples and stops.  Will read once again what DAQ Assistant is represented.  In other words, that there is a gap of time between readings.

    Continuous samples: data acquisition just constantly reads the data.  The DAQ Assistant just gets the number of requested samples and data acquisition keeps just read and store it in the buffer.

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

  • calculations between two values of the sequential loop iterations

    Hi all

    I have a code that came out our power (DSP) of a FFT spectral density. An input frequency and then intervened at a value of input from the user. I would like to know the difference of the PSD between each stage of the frequency. Attached, that's what I would get. To avoid confusion, I don't want to produce a file that looks like this. I want just the column 'delta' as an indicator on the front panel, so I can control my change in PSD. I don't need the entire table, just the delta between the current iteration and the previous iteration. I tried to use a loop with shift registers, but I'm not sure where to go to from there. I thought that, since the shift registers sends the data of loop to loop, that I could output the value before it went into the next iteration, but I don't have a chance. Any help is appreciated. Unfortunately, I am unable to put the code due to the policy of the company. I know it makes things much more difficult.

    Thank you.

    Suggestions do not seem quite right, but I found a way to do it. Attached, is the way that I did.

  • changing the values of loop iteration

    Happy new year everyone!

    I have a question about changing the loop iteration number set to a loop for. I made a simple example of what I had imagined in my mind, but I knew that it wouldn't work, however, it shows what I want to accomplish. I would use a switch or something to control the loop, so you can start running to essentially infinity, which is the constant from 1000000 and then go on a number of controlled if the loop ends in fact and the code can move. Each iteration is a second.

    Thanks for any ideas you may have

    A While loop is a loop For which has no fixed number of iterations (if you allow me, he 's going to try to go to infinity).  It has a Stop indicator that stops the loop if True is wired for it.  Note that if True is wired to the stop indicator when the loop begins, the loop will always be executed (once).  In this sense, it is slightly different from a loop For 0 cable to the input of N (which does nothing).

    So some time, use a loop to do this.

    Bob Schor

    PS - you should know...

    PPS: I just looked at your VI.  I'm sure you realize that the way to data flow rules you need to set the Boolean and order digital before start the programme - once it starts and gets into the while loop, changes you make outside the loop will have no influence on the code inside the loop.

    Have you taken the LabVIEW tutorials?  If so, and if not, go look again, attention to the program flow, loops, etc..

  • How can I get my Teststand report to display only the data of the latest iteration of a loop DoWhile ONLY stage?

    Good so I a DoWhile loop with a numeric value to test.  The loop will run 10 times.  I want only the status of success/failure of the test of the numerical value of the last iteration of the loop is displayed in the report.  I don't like on the other iterations.  Help, please!  Thanks in advance I think that this can be accomplished with the recall of ModifyReportEntry and fancy logic...

    Thanks for your comments everyone.  I ended up changing the reportgen_txt.seq to identify during my test was in a loop (by setting an additional result in the different stages of my comment loop-step to say "Record last loop.".)  Once this indicator lies in the ResultList I turn to reportgen_txt, I have to loop through all the ResultList entries and if the current entry has the same name and the "record last of loop." as a previous entry, I delete the previous entry and store the current.  All this way, I have to do is to set a flag in my test sequence, and if when debugging, I want to see all the data for all the iterations, I just remove the flag.

    The reportgen_txt.seq include:

    C:\Program NIUninstaller Instruments\TestStand 2010\Components\Models\TestStandModels

    I'm not worried about the time constants on my generation of report and I am not limited to stress strict memory so this seemed like the best way for me to do what I had accomplished.  I'm sure there are better ways, but it seemed simpler than the generation of report definition to be disabled and then enabled...

  • Rate the triggered loop of the timed iterations of TTL

    Hi all

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

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

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

    IM grateful for any help!

    Dear j.win,

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

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

    It's more clear now?

    Kind regards

  • go to the next iteration of loop for and continue execution of the previous iteration

    Hello everyone,

    I want to run a loop with an offset to each iteration. I explain: I want to run a task multiple times (for loop), but with a variable delay in each iteration.

    Thus, if we put t = 0 before you run the loop and I use 3 iterations. I put a writ of execution to the first ieration after 3 sec then skip to the next iteration of course without waiting the end of the previous iteration and run the current iteration after 1.5 s and go to the third ieration (once again without waiting for the latest iteration).

    I conclude: this is a simultaneous execution of a for loop (10 to 50) from different eras (variable time between t = 0 and each running of each task.

    The problem I found in the loop is the fact that I have to wait the end of the time delay in each iteration bfore going on to the next.

    Best regards

    In all languages, a loop iteration FOR happens AFTER previous.  However, go with the parallelized FOR loop can happen to you.

  • write 1 d digital table in a binary file and start a new line or insert a separator for each loop writing file

    Hello:

    I'm fighting with digital table of 1 d writeing in a binary file and start a new line or insert a separator for each loop writing file. So for each loop, it runs, LABVIEW code will collect a table 1 d with 253 pieces of a spectrometer. When I write these tables in the binay file and the following stack just after the previous table (I used MATLAB read binary file). However whenever if there is missing data point, the entire table is shifted. So I would save that table 1-d to N - D array and N is how many times the loop executes.

    I'm not very familiar with how write binary IO files works? Can anyone help figure this? I tried to use the file position, but this feature is only for writing string to Bodet. But I really want to write 1 d digital table in N - D array. How can I do that.

    Thanks in advance

    lawsberry_pi wrote:

    So, how can I not do the addition of a length at the beginning of each entry? Is it possible to do?

    On top of the binary file write is a Boolean entry called ' Prepend/chain on size table (T) '.  It is default to TRUE.  Set it to false.

    Also, be aware that Matlab like Little Endian in LabVIEW by default Big Endian.  If you probably set your "endianness" on writing binary file as well.

  • the sum of the time of loop iteration.

    Hello

    I need to estimate a time every time through the loop. The time is different (depending on the counter triggers). I need to estimate the time of each simple iteration and add the last time with the current iteration. For example the first iteration - 400ms, second time 350 ms (400 + 350) (, third 380 (400 + 350 + 380) Ms. I tried with check meter and register shift, but I got a sum of (absolute) the tick counter.) I will be grateful for any suggestion. I need at this point to draw the graph with measured values.

    Lukasz

    Hi Lukas.

    your question looks like a perfect example to learn how to use the shift registers. Is - this work at home?

    (With the help of a random wait for testing...)

  • While trying to install a Linksys E1500 he repeats that my computer is not connected to the router.

    Computer problems and the router

    I have a windows xp 2002 with service Pack 3. While trying to install a Linksys E1500 he repeats that my computer is not connected to the router. Ive tried a new cable and it does not solve the problem. He also said that my computer does not have wireless capabilities. Any suggestions?

    You'll be much more likely to get useful (or even possible) suggestions if you provide the full text of the error messages you get, without paraphrasing.

    For example:

    He repeated to me that my computer is not connected to the router. --> What is the real error message?

    He also said that my computer lacks wireless capabilities--> what is the error message itself?

    You are "trying to connect via a cable" to the router or you're talking about your Internet service (for example, the router is connected to the Internet via a cable)?

    You think that your computer has "wireless capabilities?  Open the Device Manager (start > run > devmgmt.msc > OK), then click on the + sign next to "network adapters."  Please provide the names of any devices listed there.

    Is your computer without a name, a laptop?  There a name of brand anywhere (for example, Toshiba, HP, Dell, etc.)?

    Open System Properties (start > run > msinfo32 > OK)
    Click Edit > select all
    Click Edit > copy
    Right-click in your response here and select Paste
    Be sure to hide the "System name" or "User Name" if it makes you feel better, but please do not remove anything else.

  • What happens if you add a new node of current cluster, while the CPU of the new node is slower quality?

    Hello

    I have a 3 node RAC, I want to add a new node to the current cluster... While the new node processors are slower that others... what happens?

    (my problem is: I can add that new node successfully? if yes, can even improve the performance of the entire cluster or not?)

    Thank you

    s9225

    Processors must be of the same type - for example 64-bit Intel/AMD can work with the other processors of Intel/AMD 64-bit of the different clock speeds (but not with the Itanium processors).

    What kind of CPU do you use?

    Hemant K Collette

  • Support the contact - person I'm trying to communicate with a person that I paid for my subscription to the CC and it is to show that I have not bought the product.  The page to contact technical support is a labyrinth and continues to loop back to the sa

    I am trying to contact a person that I paid for my subscription to the CC and it is to show that I have not bought the product.  The page contact technical support is a labyrinth and continues to loop back to the same place without giving me any contact information! Help, please!

    Move the debate towards Adobe Creative cloud

    We have checked your account details, we see active participation of Photography Photoshop program.  Please make sure that you are connected with correct Adobe Id to Adobe.com to get it. You can check:Adobe Store | Order FAQ and your online payment

    To install Creative Cloud app - https://helpx.adobe.com/creative-cloud/help/install-apps.html, you can also Learn how to enable or disable Adobe applications from here.

    Kindly let us know in case you have further questions on your membership.

    I hope this helps.

  • How to create a chart using two independent loops while?

    Hello world

    I'm currently developing a program for the acquisition of data. In this program, I have two independent, while loops that each output a number of type double with each iteration of the loop. I am able to successfully create two independent waveform graphs (data / time) for each of the loops when placed inside. However, I now want to create a live data xy chart (the output of a loop is x and the output of the other is there).

    I have a problem, that the distinct nature of loops... When I try to extract data outside of the loop (naturally), it is not refresh with each iteration of the loop causing the graph xy does not work in the way I intend. Is there an easy way to solve this problem? If more clarification is needed, please let me know!

    David

    If the two loops are not synchronized, exactly how do you do the xy graph, where each point, by definition, must have a value of each loop.

    1. updated when updates or the other value and combine with the last value from the other loop?
    2. updated on a constant basis with the current value of each loop?
    3. ... There are many other possibilities.

    #2 is the easiest. Simply create a third loop with a reasonable time and graph the two values via local variables. You probably also should limit the history of ranking somehow.

  • How can I put an upper limit and lower limit on the chart inside a while loop?

    Need some help here. I'm working on a project, I collected data thru OR myDAQ, draw a waveform graph, is possible to add a limit upper and lower the table on waveform? I tried ways but can't seem to work. Any help is appreciated thank you.


Maybe you are looking for