Added a counter which keeps the total number of times where a loop has run, even if LabVIEW has been restarted.

Hi all

I am writing a VI to measure the data and insert into a database. The measures are controlled by a loop that runs once per minute. I want to give a unique to each measure identification number and store it too much in the database.

To do this, I want to add a counter to this loop so that I can count the number of times that the loop is executed in total. It is, even if the VI, LabVIEW or even e PC is restarted, I want the counter to track the number of executions. If say the Edeka runs twice and then the VI is stopped and restarted, I want the number following on the counter to be three.

Does anyone have an idea on how to do it? I'm gratefule for any help!

Clara

A suggestion. Can you write the last counter value in a txt file and read it all by running again the vi?

Tags: NI Software

Similar Questions

  • Is there a way to see the history of every time a file folder has been seen?

    I think one of my friends has been viewing my pictures on my computer and I want to know if there is a way to see whenever my "My pictures" folder has been seen.  I don't need the last time he was seen.  I want to see a story, as he saw the week last each time.  Is this possible?

    There is no such capability within Windows, but there may be some third-party utilities that could - but I don't know any.

    writing in the new message: * e-mail address is removed from the privacy... *

    I think one of my friends has been viewing my pictures on my computer and I want to know if there is a way to see whenever my "My pictures" folder has been seen. I don't need the last time he was seen. I want to see a story, as he saw the week last each time. Is this possible?

  • Count the total number of specific words on each page

    I have a script that counts the number of times where the word 'Manager' is displayed on each page of a report.

    This is what is returned in the console after running the script:

    Count the number of managers 1 Page number 1

    Count the number of managers 2 Page number 1

    Count the number of managers 3 Page number 1

    Count the number of managers 4 Page number 1

    Count the number of managers 5 Page number 1

    Count the number of managers 1 Page number 2

    Count the number of managers 2 Page number 2

    Count the number of managers 3 Page number 2

    I need the console to report with only the total number of times that the word Manager appears on each page (once) and not iterate over each of them.

    Can someone please advise how this can be achieved?

    Script as follows:

    var this.numPages = NUMPAGES;

    for (var k = 0; k < numpages; k ++)
    {
    {
    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i < numWords; i ++)
    {
    var ckWord = this.getPageNthWord (k, i, true);
    var q = this.getPageNthWordQuads (k, i);
    Convert quads in the rotation by default user space
    Userspace used by links.
    m = (new Matrix2D).fromRotated(this,0);
    mInv = m.invert)
    r = mInv.transform (q)
    r = r.ToString)
    r = r.split(",");
    If (ckWord = "Manager")
    {
    Count ++;
    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));
    }
    }
    }
    }

    Just move the statement outside the inner loop:

    var this.numPages = NUMPAGES;

    for (var k = 0; k)< numpages;="" k++)="">

    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i)< numwords;="" i++)="">

    var ckWord = this.getPageNthWord (k, i, true);

    var q = this.getPageNthWordQuads (k, i);

    If (ckWord = 'Manager') {}

    Count ++;

    }

    }

    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));

    }

  • Function to count the total number of data channels

    I know that I had stumbled on a tiara function that returns the number of data in all of my data channels.  I can't seem to find the thread where I had seen it.  I'm looking to replace a script a long time user with this simple function in my future coding.

    Thank you!

    Hi CrshTstr,

    I actually still use GlobUsedChn for that.  In more recent versions of DIAdem, you can use commads as GroupChnCount() or Data.Root.ChannelGroups (1). Channels.Count to return the number of channels in a particular group.  But regardless of which group the channels are in the GlobUsedChn variable always returns the total number of channels currently on the data portal.

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • A script that will count the total number of pages into multiple PDF files in a batch file?

    Is there a script I can use ExtendScript Toolkit that will count the total number of pages into multiple PDF files in a batch file?

    In another discussion I showed a JavaScript that you can use to write the number of pages to the console in a batch sequence. You would do exactly the same thing in Action, so the action would consist of a simple JavaScript (more tools > run JavaScript) which includes the code.

  • How to count the total number of records with distinction?

    Hello guys

    I have a report that contains a list of the types of company and other attributes as follows:
    Shipto               Company Type             GC Code               Measures
    A                         cc                             x                          100
                                                               y                          200
                                                               c                          120
    
    B                         YUT                         I                            200
                                cc                           U                           98
    
    G                         Maid                        rt                           200
                               YUT                        TT                         300
                               JTE                         TY                         400
    
                               
     
    The list goes on and... "Business type" appears is not the highest or the lowest... I would like to see what is the total number of different company types we have. By this report, there should be 5, but if I count or count (*) or rcompte, I actually get the total number of lines in the present report, which is not what I want...

    If someone could help me to find the total number of company types?

    Thanks in advance

    Have you tried this one?

    Sum (Count (distinct ColumnName))

  • Automatically count the total number of steps

    I have a procedure with x steps. In the title manually type us the total number of steps. As you can understand this process often translates into a failure, where the number in the title does not match the actual number of steps.

    Is there a solution for automatically Indesign to count the steps below a certain style of paragraph and add the title number. I did find something similar.

    For example, where '5' in the title is automatically generated:

    How to count (5 steps)

    1. Be patient, start whispering 'a '.
    2. Then mentally count to two...
    3. ... three
    4. ... four
    5. Crying all of a sudden 'five' and pretend that nothing takes place.

    Thanks in advance

    This can be done very easily by the script. I wrote it while drinking my coffee in the morning.

    Front

    After

    I don't know what style names that you use so I used 'Header' and 'steps '. Change them to your style of the script name (in a text editor - Notepad for example, ESTK):

    If you add / remove certain steps, run the script again and it will update the numbers.

    Here is the script and here is an example document for the test.

    DISCLAIMER: I did not see your documents, so can't promise it will work for you, as it is.

    /* Copyright 2014, Kasyan Servetsky
    June 4, 2014
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Count number of steps - 1.1",
    doc;
    
    PreCheck();
    
    //===================================== FUNCTIONS ======================================
    function Main() {
        var foundItem, header, lastPar, num;
    
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = "(?s).+";
        app.findGrepPreferences.appliedParagraphStyle = "Steps";
        var foundItems = doc.findGrep(true);
        if (foundItems.length == 0) ErrorExit("Found nothing", true);
    
        for (var i = 0; i < foundItems.length; i++) {
            foundItem = foundItems[i];
            if (foundItem.paragraphs.length == 0) continue;
            header = foundItem.parentStory.paragraphs.previousItem(foundItem.paragraphs[0]);
            if (header.appliedParagraphStyle.name != "Header") continue;
            lastPar = foundItem.paragraphs[-1];
            num = lastPar.numberingResultNumber;
            if (num == -1) continue;
            InsertNum(header, num);
        }
    
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function InsertNum(header, num) {
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = "( \\()(\\d+)( Steps\\))$";
        app.changeGrepPreferences.changeTo = "$1" + num + "$3";
        app.findGrepPreferences.appliedParagraphStyle = "Header";
        var changed = header.changeGrep();
    
        if (changed.length == 0) {
            header.insertionPoints[-2].contents = " (" + num + " Steps)";
        }
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function PreCheck() {
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        doc = app.activeDocument;
        if (!app.activeDocument.saved) ErrorExit("The current document has not been saved since it was created. Please save the document and try again.", true);
        Main();
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    
  • Count the total number of rows found in the schema

    Count the total number of lines present in the schema, including the table, sequence, view

    Desirable output

    Table sequence views
    20 of 1000 1000

    Do you mean that you need to count the number of Tables, views and sequence present in the schema?

    Hi something like that.

    SELECT a.view_cnt AS "View Count", b.tab_cnt AS "Table Count",
           c.seq_cnt AS "Sequence Count"
      FROM (SELECT COUNT (*) view_cnt
              FROM USER_VIEWS) a,
           (SELECT COUNT (*) tab_cnt
              FROM USER_TABLES) b,
           (SELECT COUNT (*) seq_cnt
              FROM USER_SEQUENCES) c
    

    Gives you,

    View Count      Table Count      Sequence Count
           153              878                   32
    

    Thank you
    Shankar

    Published by: Shankar Viji on August 28, 2012 03:03

  • Adding column which gives the serial number for each line in the Bulletin Board

    I use the update version 2 Jdev 11 g.
    I'm the filling of all employees from the emp table ADF table.
    My requirement is to add a column more as the first column and header line which displays the serial number for each serial number of row.the is not available in the table emp in database .i want to generate it dynamically when the data are filled in to ADF table.i don't want not to use the method to get the SQL query rownum. I want to get custom code (in the Managed Bean) or set all of the properties in the subject entity or any other object.

    Published by: sj0609 on September 8, 2009 09:43

    Hello

    Give an id to the table (say 'currRow') varStatus property. Add a column to the table (for example with a text output), then set it to the value of the output text #{currRow.index}.

    Arun-

  • HP Officejet Pro 8610: How can I get a report with the total number of pages printed on my HP Officejet Pro 8610?

    The number of pages that print is so critical to a choice to use the "HP Instant ink Plan' or not, how can I find the total number of pages that I printed on my brand new (installed 2 days ago) 8610?  And if I can, there are a total of 'resettable' or working capital?  Don't see anything in the user guide and a search gives nothing usable on this blog.

    Wireless printer installed on an old PC with Windows XP SP3.  I also of course install with cable network but so far it works well on my home network without a network cable.  Is there any operating system, I also have a laptop Lenovo Vista on which I can install this printer.

    Please do not answer I can find total by counting the number of pieces of paper that I have.  Surely the inner workings of this beautiful machine must have the requested data as well as HP can say my consumption if I select the monthly plan of ink!

    This 8610 was a good buy (net $89,00 after the resumption of my six years, Deskjet J36xx) at Office Depot/Max who has of course influenced my decision to purchase.  So far, I am very happy with the print quality and speed, have not yet tried the scanner and will probably never use the fax machine since I have no land line phone.

    Thank you

    Harry

    Hello

    Article #2 of the report printer Ststus will tell you. Please try:

    Printer status report

    The printer status report to view current information about the printer and the status of the ink cartridges. Also use the report to State printer for you help to solve the problems associated with the printer.

    The printer status report contains also a log of recent events.

    If you need to call HP, it is often useful to print the printer status report before calling.

    To print the printer status report

    1. in the Control Panel printer display, press and drag your finger on the screen and then press Setup.

    2. press on printing reports and then tap Printer Status Report.

    Kind regards.

  • Can I get the total number of records that meet the conditions of a query using the Table API?

    Hello

    A < row > TableIterator is returned when I ask operations using the index of tables. If I want to get the total number of records, I count one by one using the returned TableIterator < row >.


    Can I get the total number of records directly meets the conditions of the query?

    I can get the total number of records directly the request of the meeting of the conditions of CLI using the command Global table - name tableName - count - index index-name-field fieldName - start startValue-end endValue.

    Can I get the same results using the Table API?

    I used MongoDB and NoSQL Oracle for about a year. According to the experience of the use of these dbs, I think mongoDB querying interface is powerful. In the contras, the query interface is relatively simple, which results is a lot of work that is usually a long time in the client side.

    Hello

    Counting records in a database is a tricky thing.  Any system that gives you an accurate count of the records will have a hotspot of concurrency on updates, namely the place where the counting is maintained.  Such a count is a problem of performance in addition to competitive access problem.   The problem is even more difficult in a system widely distributed such a NoSQL database.

    The CLI has overall command that counts, but does so by brutal force - iterate keys that correspond to the parameters of the operation.  This is how you must do this within the API.  There is not a lot of code, but you have to write.  You certainly want to use TableIterator TableAPI.tableKeysIterator (), because a key iteration is significantly faster than the iteration of lines.  Just one iteration and count.

    If you use TableAPI.multiGet () and a key with a touch of brightness full then, in fact, count the results as they are returned in a single piece (a list).

    Kind regards

    George

  • Calculate the total number of the schema rowset.

    Hi all

    I use the oracle 10g database on windows server 2003.

    I want to calculate the total number of lines in a pattern.
    I have only one method to select just count (*) from each table within each schema.
    because it doesn't matter what possible query that could calculate the total number of lines in a pattern?


    Thank you.

    Published by: Maahjoor on May 13, 2013 23:21

    Hello

    Well, if you keep your cool failry statistics, you can get a very good grip on the number of lines through the NUM_ROWS in dba_tables column and then summarize the owner, on the top of my head:

    select sum(NUM_ROWS) from dba_tables where owner like 'SCHEMA';
    

    Do not forget that the number of lines shown this way will be the number of lines at the time of the last crawl (dbms_stats) has been run on the segment, so it may not always be equal to the number of the schema rowset did when running.

  • How to query the total number of columns and lines filled with data?

    How to get the number of rows and columns in Exel file data using Excel report?

    Since you have posted this question in the forum of LabWindows/CVI, I guess you want to know how to do with CVI.

    You need to know how to open and activate the Excel data file.

    Depending on the function returns the total number of columns and lines col_count row_count, respectively.

    -----------------------------------------------------------------------------------------------------------------------------------------

    int CountColumnsAndRows (void)
    {
    Error HRESULT = 0;
    CAObjHandle rangeCurrentRegionHandle = 0;
    CAObjHandle rangeColumnsHandle = 0;
    CAObjHandle rangeRowsHandle = 0;
      
    unsigned long col_count = 0, row_count = 0;
      
    Must use the 'A1' property and CruuentRegion count the total of columns and lines, including the drafts!
      
    error = CA_VariantSetCString (& MyCellRangeV, 'A1');
      
    error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, & ExcelRangeHandle);
    If (error<0) goto="">
      
    error = Excel_GetProperty (ExcelRangeHandle, & ErrorInfo, Excel_RangeCurrentRegion, CAVT_OBJHANDLE, & rangeCurrentRegionHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeColumns, CAVT_OBJHANDLE, & rangeColumnsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeColumnsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & col_count);
    If (error<0) goto="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeRows, CAVT_OBJHANDLE, & rangeRowsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeRowsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & row_count);
    If (error<0) goto="">

    Error:

    CA_VariantClear (& MyCellRangeV);
    CA_VariantClear (& MyVariant);
    ClearObjHandle (& ExcelRangeHandle);
    ClearObjHandle (& rangeCurrentRegionHandle);
    ClearObjHandle (& rangeColumnsHandle);
    ClearObjHandle (& rangeRowsHandle);
      
     
    If (error<>
    ReportAppAutomationError (error);
      
    error return;
    }

  • Is there a way to get the total number of samples to a TDMS file?

    I'm looking at the documentation for the function of properties Get TDMS and I see that it has a property: wf_samples which "represents the number of samples in the first data segment. Is it possible to get the number of samples in, say, the second segment of data? My goal is to get the number of samples in all segments of data for a single channel.

    To retrieve the total number of samples, I use the properties of 'NI_ChannelLength' to be linked to the function of TDMS properties get.

    The I64 outbut gives you the total number of samples of the selected channel.

    See attachment so useful

    Marco

  • Where is the total number of pages printed on Laserjet P2055DN?

    Hello

    We recently bought a P2055dn LJ, which works very well. We are now on the second ink cartridge.

    I would like to know how many pages was printed completely. If I go to the page /hp/device/supply_status.htm I can see how many pages have been printed using the LAST cartridge. How can I see the total number of pages printed?

    Thanks for the good help on that.

    Calle2012

    At the front of the printer, you will need access the MENU via the LCD screen. Scroll to REPORTS and click ok, then scroll down to the configuration page and click ok. At this point, it should display a page of test/config auto with detailed info printer including the number of pages since its installation.

Maybe you are looking for

  • Satellite C660D - 15 X - Bootmgr is missing

    I started restoring the system through F8 on my Satellite C660D-15 X and when he started the process where the control box starts the process of "X-drive" I accidentally hit buttons on the laptop and it froze so I decided to restart the computer and

  • Re: Satellite L450D-11W-Question on upgrade

    Hello I've had my Toshiba Satellite L450D-11W laptop for about a year now and I play a lot of games. It has AMD Athlon x 2 Dual Core, 4 GB RAM and Windows 7 Pro (32), but it tends to create lots of lag and slow loading for the games I want to play. I

  • Photosmart 5524 print all PDF

    My 5524 will only print a few pages of a PDF and then gives a message "unable to print the document.  It is connected wireless to a new PC for Windows 8.1.  I also have a Photosmart 2575 connected to my router via a network cable wireless and that pr

  • HPPhotosmart c6200 printer does not print

    I have a new computer samsung my photosmart c 6200 printer installs but does not print. I tried the automatic fix and it still does not work

  • XP paging file: location Optimum of performance?

    The swap file.  Few people understand this, including me.  I thought I would post some queries is that the performance of the hard drive therefore changed radically in the past because of disks SSD (SSD). Optimum size: currently the size by default i