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.

Tags: NI Software

Similar Questions

  • How to reset a variable after each iteration of a loop?

    Here's the code if you need to see. 'fact' is what I want to zero whenever the factorialN method completes. Thanks in advance.
    import java.util.Scanner;
    
    public class Factorial {
         static int fact = 1;
         static int newNum = 0;
         /**
          * @param args
          */
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              char answer;
              do {
              System.out.println("What is the number? ");
              Scanner keyboard = new Scanner(System.in);
              int num = keyboard.nextInt();
              factorialN(num);
              Factorial aFactorial = new Factorial();
              System.out.println(aFactorial);
              System.out.println("Do you want to continue? y/n ");
              String answerString = keyboard.next();
              answer = answerString.charAt(0);
              }
              while (answer == 'y' || answer == 'Y');
    
         }
         
         public static void factorialN(int num) {
              while (newNum < num) {
                   newNum ++;
                   fact = fact * newNum; }
         }
         public String toString() {
               String returnValue = "Its factorial is " + fact;
               return returnValue;
            }
    }

    What is the problem? Declare the method as "int" instead of "void" and the return value.

  • How to upgrade a table after each iteration?

    Hello

    I have a vi which works fine but the problem is that it updates all the data once the vi stops running. I want something as soon as (for outside for loop) 1 iteration it performs updates the table in front of the Panel, then 2nd iteration, it updates again and so on. Can anyone help me please with this.

    Thank you

    In fact, in your case, there are a simpler way to do it... If we talk about the pink channel on the first loop indicator.

    Just move the table from outside the loop inside the loop indicator.

  • How insert elements into a table after each iteration of a for loop

    I'm new to labview and work on an application where I'm supposed to store an element in an array (without crushing) after each iteration in a loop for. I tried using function Array build, keeping the flag outside the loop for and played with indexing, but did not work. Please suggest me an idea how to do it.

    Thank you

    It would be better if you attached the real VI.

    None of your images show an operation 'insert into array.

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

  • reset the graph after each race

    Hello

    In attachment VI, I am trying to collect data to interverals (in seconds) and display them in a chart that updates after each iteration.  However, I like the graph to be handed over to zero just before starting a new would go program.  In the current state, after the end of the program, the graph just seems to add data and continues on.  I would like to have the x-axis as time.  In the current state of the program, I wait 1 second, take the data and so on.  I would like a parcel of time data vs.  So in the attached VI, the graph must finish 20 sec.

    Honestly, I'd appreciate any help to determine my dilemma.  I'm under LabView 8.2.

    Thanks for all your help and your time.

    hiNi.

    Like this

  • inspect element - how to save the report after change

    Hello

    When I create an interactive report and apply "leap control" option it interrupts the report according to the requirements of the standard with a button (+/-sign) on top for show/hide selection... I need to show the report with "Control Break", but don't want to show (option button at the top + /)

    When I inspected the element (using internet explorer) and deleted the text and gif file... the report displayed exactly how I wanted it...

    My question is how to save this report after making the changes in HTML format (with the help of inspect option element)... I did tried to register under default report, but the report got refreshed and +/-sign came back...

    Please advice

    Hello

    When you look at the page source and modify it, it only affects your active HTML document.
    You cannot save those changes to Apex.

    You must use JavaScript and example dynamic action to change HTML each time when the report is rendered or refreshed.

    Kind regards
    Jari

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

  • How to save a graph 3d with a transparent background?

    How to save a graph 3d with a transparent background?

    File > export > save for Web (legacy) > PNG (with transparency)

    Nancy O.

  • 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
  • plot update after each iteration

    Hello

    I have an example of data code where I collect data on different devices.  Can you help me to update "GRAPHIC 2" to display all of the plots on this graph."  However, I would like FIGURE set 2 updated after each throw outside of the loop.  [After the 3rd iteration of the outer loop (defined by "outer loop"), "GRAPH 2' should therefore 3 plots and so on..."]

    Thank you

    hiNi.

    Hello hiNI

    Do you want something like that?

  • How to reset the counter at each iteration, and how to introduce a delay

    Hello world

    First of all I apologize for the basic level of my questions, I'm new with Labview...

    I'm counties of reading out of a USB-6008 labview chip using the DAQ assistant and I write the output to a file. The problem is that instead of giving me the number of levels for each iteration it gives me the sum of all this. How to make Wizard Reset to 0 data acquisition account on each iteration? I tried using a shift register, but it added a counter to my folder and nothing else...

    Thank you very much

    Sure thing. Sorry about that.

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

  • How do save about.config after change of smart bookmarks

    https://support.Mozilla.org/en-us/KB/restore-default-Smart-Bookmarks-folders

    This should do what is necessary, BUT the change is not saved when I go out. How to save the changes?

    Once Firefox treats the request, the preference will be changed again. The files reappear when you expect? If this isn't the case, it is possible that they moved in a subfolder. Unfortunately, it is difficult to find because the search box in the Library dialog box does not have Smart Bookmarks folders.

    But you can search for them in a backup of the HTML format. Here's how:

    (1) export bookmarks to a file in HTML format that you save to a convenient location, such as your desktop. See: Firefox bookmarks export to a HTML file for backup or transfer bookmarks

    (2) open the HTML in Firefox and you can use find (Ctrl + f) to search for the missing smart bookmarks folder. Then, you can open this location in the library and bring it back where it belongs.

    A little luck?

Maybe you are looking for

  • Securely erase SSD using Filevault

    I am about to sell my MBP of 2009 with a 1 TB SSD.  I know that I can securely erase the drive as a traditional mechanical flat disc and if recommended someone following that sounds quite secured using filevault.  I'm aware that it can take a while t

  • Can I use a USB on an iPad Pro?

    I am looking for an iPad 12.9 pro with a memory of 128 GB. Also obtain loghning usb and keyboard. My question is this: can I use a USB stick with this for transfer autour files? For example: I'm starting a word on a desktop document, except at thumb

  • seems to have a virus embeded in Firefox

    When you use Firefox 14.0.1 unawares, I'll see a white Flash on the screen. After investigation, I find something (a virus) has opened a new window and take me to a page of advertising. The defination of a virus is something that takes control over y

  • Skype crashes when the sponsor or to join a call

    I use the latest version of Skype. I can still talk to people by however when I join a call or answer a call my Skype crashes of Instant Messaging. I have the latest updates of windows and using the latest version of Skype. I am running windows 7. Th

  • Satellite Pro 6100: message "RTC bad battery appears, check CMOS.

    When I move my 6100 SP it freezes, and then when it is restarted the message "bad RTC battery is displayed, check CMOS. I also noticed that when the machine hangs the fan operates at high speed and the bottom of the machine and the keyboard gets very