Labview Read INI File Slow

Dear ALL:
      I have a VI use OpenG Read INI Cluster subvi to read a complex cluster data structure called step config data,and when I Run this VI,It sometimes read INI File quickly,and sometimes read INI File very slowly.If I want to speed up the read INI File speed,I must quit labview and restart it,and when I quit labview it will reports error just look like Labview Error Message.JPG
Attachments:
Labview Error Message.JPG ‏18 KB
Data Structure.JPG ‏92 KB
Get Data VI.JPG ‏189 KB

I've got the same problem - it takes from 4 to 20 SECONDS to write and read 2 ini file clusters.
The first cluster I write have a few text strings, an error cluster and some numbers.
The second is an array of clusters (I loop through the array and writes each cluster separately.) containing some text and numbers, most of it contained in sub-clusters.
With 0 or 1 element in the array it takes around 4 secs to write and read this to ini file. With 20 in the cluster this takes 20 seconds (on a cFP-2120).
The openG functionality here is quite nice, but if I can't fix this time problem I'm afraid its quite useless!
Attachments:
WriteINIFile.jpg ‏211 KB
IniCluster.jpg ‏114 KB

Similar Messages

  • Reading 'ini files'

    I need to write code that reads 'ini files', I would like to know If anyone has a sample or can guide me how to approach this task.
    Thank you

    If you have an ini file with values like :Thank you for your prompt reply. You got me intrigue, By any chance do you know where can I get more information about property files?
    Thank you for your help.
    value1=test
    value2=another test
    You can read the values by doing :
    Properties props = new Properties();
    FileInputStream fis = new
    FileInputStream("D:\\test.ini");
    props.load(fis);
    fis.close();
    String value1 = props.getProperty("value1");
    // etc .........................Note : Unless there is some specific reason you should
    use a properties file and not an ini file.

  • Read ini file in TestStand

    I have a computer with TestStand, but no LabVIEW. Can I read an ini file in TestStand directly? My file have several section headings and several keys under each. Any help appreciated.
    Senior Test Engineer
    [email protected]

    If you are comfortable calling the Win32 sdk, you could use the DLL adapter to call:
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms724353%28v=vs.85%29.aspx

  • Read ini file with multiple threads

    I have a state machine architecture, but I have multiple threads. For instance, one is dealing with listening for mulitple tcp connections and storing their refnums to an array in a functional global. Another thread is accessing these refnums and collecting data it's receiving from each tcp connection. This data is queued up and then dequeued in a third thread which does some modification and sends it out via serial. My question is, when you have a situation like this and have to read an ini file, where should you read it? It seems like the most logical place would be outside your loops so you can get all the tcp and serial info (port, baud rate, etc) then wire it it to your create listener or initialize serial connection despite them being in different threads. But then again, normal state machine architecture would want an "initialize" case. If you did this though which loop would you put the init case in? And you would then have to worry about synchronizing loops becuase you wouldn't want one to try and create a listener while another thread was still reading ini data which would include the port to listen on. Maybe I'm overthinking this haha. Suggestions? Edit: one more question. Does it seem overkill that I have a tcp loop listening for data and queuing it up and a separate loop sending out the processed data via serial? Or should I just have one state that gets tcp data stores it in a shift register, then another state that sends it out via serial, and returns the state machine to the tcp read state?
    Message Edited by for(imstuck) on 03-03-2010 01:13 PM
    Message Edited by for(imstuck) on 03-03-2010 01:17 PM
    CLA, LabVIEW Versions 2010-2013

    Most of the applications I work on at the moment are used for testing barcode and label printers. The test applications I design are focused on testing the printer's firmware, not the hardware. Within our applications we have three primary objects (Unfortunately they are not native LabVIEW objects yet. They were developed before native LVOOP.) The primary objects we use in our applications are a log object, a connection object (communication interface to the printer) and a printer object. In any single instance of a test we only have a single printer, a single connection to the printer and one or more discrete logs. Each instance of these objects represent a single, real physical entity. A singleton object is a virtual representation of the physical world. Let's take the log object since that is the most simple of the objects described above. Naturally for a given log file you have the log file name and path. We also provide other attributes such as the maximum size of a single file (we allow log files to span multiple files), whether it is a comma delimited file or if it contains raw data, if timestamps should be included with a log entry and so forth. Most of these attributes are static for a log file with the exception of the name and such things as whether the logging is actually enabled or disabled. If we split a wire and had multiple instances of the log file (the way native LVOOP actually works) the attribute for whether logging is currently enabled or disabled will only pertain to the specific instance, or specific wire for the that object. Since this truly represents a single item, one log file, we need that attribute to be shared for all references to the instance of the log object. Since we allow this we can set an attribute on the log object in any task and it will be reflected in any other task that is using it. Think of the way a action engine or functional global works. However, in this case we provide discrete methods for the various actions.
    I hope that made some sense. If not let me know since I just whipped up this response.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Reading INI files with dashes in the section name

    I am trying to read an INI file from a web site. Within that INI file are sections that have dashes in them. I need to be able to read several sections so I can locate specific files to download referenced within the INI files. I found a script for parsing
    INI files, but when I run it, the script fails to handle the sections that have dashes. Any ideas on how I can work around the issue?
    $Web = New-Object System.Net.WebClient
    Function Get-INIContent ($ContentList){
    $INI = @()
    Switch -regex ($contentList)
    "^\[(.+)\]"
    [string]$Section = $Matches[1]
    $INI[$Section] = @{}
    $CommentCount = 0
    $ContentList = $Web.Downloadstring("http://download.nai.com/PRODUCTS/COMMONUPDATER/avvdat.ini")
    Get-INIContent $contentlist
    What I was hoping to do was search through the INI until I found the sections I want, and then read the fields for that section so I know what to download.  I won't be pulling all of the files, so I need to find a way to search for the sections I am
    looking for then read all of the lines for that section and process them.

    Found part of the problem... When I pull the file into a variable I lose the ability to search it line by line.  For example:
    $Web = New-Object System.Net.WebClient
    $ContentList = $Web.Downloadstring("http://download.nai.com/PRODUCTS/COMMONUPDATER/avvdat.ini")
    #For some reason this returns the entire file
    $contentlist | select -first 1
    $contentlist | %{
    #Thought this would be one line, but it is also
    #the entire file...
    $_
    I have since shifted to a different method of reading the ini and I can process row by row...
    $Web = New-Object System.Net.WebClient
    $INILocation = "c:\SomeLocation\avvdat.ini"
    $Web.DownloadFile("http://download.nai.com/PRODUCTS/COMMONUPDATER/avvdat.ini",$INILocation)
    $INIFile = [System.IO.File]::OpenText($INILocation)
    Do {
    $CurrentLine = $INIFile.ReadLine()
    #This is now one line like it should be.
    $CurrentLine
    While ($INIFile.EndOfStream -ne $True)

  • Reading INI Files ? URGENT !!!

    how can I read an INI file in Sun Solaris OS ? Is there any built-in package or external package ??
    Its very Urgent.
    Thanks in advance,
    Rajesh

    Urgent, urgent, urgent. Do you really think this will speed up this thing?
    I do not.
    As far as I know, you have to use the built-in text_io package.

  • Can LabVIEW read attachement file in an Email?

    I know how to send an email with an attachment but is there a vi to read the attachement from Labview?

    In order to be able to do so it has to get the email in the first place. This means that it has to act as a POP3 client or IMAP client if you're connecting to something like MS Exchange. Alternatively if you have an email client that has, for example, an ActiveX interface then you can use that to connect to the client and get the email using the ActiveX properties and methods.
    What do you have?

  • Reader.ini - offline network folder keeps changing

    I have offline folders setup for all of my users for use with their personal home drives (network drives). Everytime they syncronize their offline folders before leaving at night, windows always lets them know that the "reader.ini" file is different than the one on the network. It is getting very annoying. Does anybody know what is cauing this? Any type of work around? Why is reader.ini in a network folder in the first place? Have tried deleting it but it just comes back.
    S

    I have the same issue with the reader.ini file. Because it's default location is the Windows My Documents path (which in this case is a syncronised folder) you constantly get sync conflicts.
    We need to know how to change the behavoir of Adobe so the reader.ini is in somewhere else like C:\Docs & Set\%user%\App Data\Adobe. I'm not sure why it's not in the first place.
    Can anyone from Adobe please address this?

  • Visual c++ load .ini files to combobox

    I create pop up program for my company, I use Visual c++ CLR. I use .ini files for load and write data in my program. 
    than I have confuse when I want to load .ini files to show in combobox. I already use "GetPrivateProfileStringA/WritePrivateProfileStringA", but it can't read .ini files to combobox. please give my suggestion for my program. thank you (:

    Hi,
    Welcome to MSDN.
    I found that you have posted this issue with the following thread in C++ forum.
    Visual
    c++ load .ini files to combobox
    You could focus on that thread to get support.
    Have a nice day.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Labview ini file syntax

    Hi
    I have a ini file built into an application as a support file. When I did some changes on ini file, some change was reflected in executable file but some not. I suspect the syntax in ini file are not right so aren't recognized.
    Besides, how ini file works? when I change the ini file, do I have to re-execute the application in order to getting the reflection in application? Or if the configuration is changed via the menu Tools->option in application, will they rewrite the ini file automatically? Do I have to stop the application in order to reading a changed ini file?
     Where can I find a documentation about labview ini file as well as its syntax?
    Thanks.

    An .ini file is a standard file and is not something that is special to LabVIEW. LabVIEW itself uses an .ini file to store some application settings that you change via the Tools->Options menu. It is not wise to change this file yourself manually. You can create your own .ini files for your application. You can use the VIs in the Configration File VIs palette to read/write .ini files. This palette is a sub-palette from the File I/O palette.
    As for its format, it's made up of sections and keys like this:
    [Section1]
    keyname=value
    keyname=value
    [Section2]
    keyname=value
    ;this is a comment
    If the value you're trying to save is a string you should use quotes.
    What you store in the .ini file is up to you and how you use it is also up to you. You can access the keys on an as-needed basis, or you can read the keys in at the beginning of your program, store them someplace like a global variable and access them as needed. It's kind of dependent on the size and architecture of your application.

  • We want your LabVIEW INI files!

    Hello:  
    As some of you might know, the Tools>>Options dialog box allows you to control options that are stored in the LabVIEW.INI file. With each release of LabVIEW, we have steadily increased the number of available options to customize LabVIEW environment. For example, the LabVIEW R&D team has added over 15 block diagram options since LabVIEW 5.x and only removed a small handful.
    As the LabVIEW team introduces new features, we provide more and more configurable options to satisfy different development styles or interests. However, the proliferation of options can prove confusing. It becomes difficult to distinguish between widely-used options and ones that are applicable only to a small set of customers.
    To gain a better sense of how customers use the settings in the Tools>>Options dialog box, I would like to collect as many customer INI files as possible. This will allow me to analyze option usage and improve the usability of the Tools>>Options dialog box.
    Please help by sending your INI file(s) to the following email address along with answers to a few simple questions. The more INI files, the better. Therefore, encourage your colleagues to send their INI files, too! If you are a MacOS or Linux user, attach your LabVIEW Preferences or .labviewrc file.  I'm interested in receiving INI files from users of all experience levels -- novice, intermediate, advanced!
    Send to: [email protected]
    What is the first version of LabVIEW that you used?
    When upgrading to a new version of LabVIEW, do you copy the LabVIEW.INI file from the older version of LabVIEW to the newer version of LabVIEW?
    When launching a new version of LabVIEW, do you immediately change any particular settings in the Tools>>Options dialog box? If so, which ones?
    When upgrading to a new version of LabVIEW, do you review the New and Changed page in the Tools>>Options dialog box?
    Which options are you the most passionate about? Please provide a brief reason for each.
    Do you have any suggestions to improve the usability of the Tools>>Options dialog box?
    Please do not forget to attach your LabVIEW.INI file.  
    Note:  On Windows the LabVIEW.INI file resides next to the LabVIEW.exe.   On Mac OS, your options are stored in the LabVIEW Preferences text file in the System: Preferences folder.  On Linux, the .labviewrc file is in your home directory.  
    Thank you,
    Noel Adorno
    LabVIEW R&D

    Hai noel,
    Its great and delighting to hear that LabVIEW R&D team is in an constant effort in collecting the information about user experience and appropriate changes are done.  Each enhancment or feature inclusion that is done to LabVIEW makes the users more comfortable with the environment and kindles the user for new version LabVIEW experience...
    Hats off to LabVIEW R&D team.
    With regards,
    JK
    (Certified LabVIEW Developer)
    Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

  • Error reading Remote file when the connection is slow

    I have a program that reads a file from a remote server. The file is an xml file.
    This uses URL inputstream.
    This works just fine but when the xml that it reads grow in size, the content of the file is not completely sent to the variable string.
    I have come to a conclusion that slow connection to the server could somehow cause this. The error is intermittent. Sometimes it works, sometimes it doesn't.
    I hope you guys could help me tune this code or if you have suggestions like other ways to read a remote file. Which will work even if the file grows bigger.
    Thanks
    public String readRemoteFile(String fName)
    try
    boolean bolContinue = true;
    URL tUrl = new URL(fName); //create a URL object with the server source file
    //Logger.log("Getting filesize : " + fName);
    InputStream is = tUrl.openStream();
    String strFileSize = "";
    StringBuffer sbXML = new StringBuffer();
    byte[] b1 = new byte[10];
                   int intBytesToDownload = 0;
    int i = is.read(b1);
    strFileSize = new String(b1, 0, i);
    //Logger.log(fName + " --- " + strFileSize);
    try
    intBytesToDownload = Integer.parseInt(strFileSize);
    catch (NumberFormatException nfe)
    Logger.log("Could not read the file : " + fName);
    return null;
    int bytesReadInTrip = intBytesToDownload;
    int bXMLLocation = 0;
    while (bytesReadInTrip > 0)
    bytesReadInTrip = 0;
    bolContinue = true;
    //System.out.println(strFileURLPath);
    tUrl = new URL(fName + "&fileOffset=" + bXMLLocation);
    //Logger.log("reading file1 : " + fName + "&fileOffset=" + bXMLLocation);
    is = tUrl.openStream(); //get Input stream of the server file.
    //continue download till continuation flag is set i.e. input stream
    // is available.
    while (bolContinue)
              byte[] bXML = new byte[intBytesToDownload];
    i = is.read(bXML);
    //Logger.log("i " + i);
    if (i > 0)
    bXMLLocation += i;
    bytesReadInTrip += i;
    String strTmpXML = new String(bXML,0,i);
         sbXML.append(strTmpXML);
    else
    bolContinue = false;
    is.close(); //close the input stream of the input file.
    //Logger.log("bytesReadInTrip : " + bytesReadInTrip);
    //Logger.log("Read file : "+ sbXML.toString());
    return sbXML.toString();
    catch (Exception e)
    Logger.log("Exception while reading the file : " + fName);
    return null;
    }

    well looks that ur run() method is being called more then one time (..)
    why dont u try file method exists() before writing it to ensure that it is not written previously

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Lion server file sharing issue with windows API read/write ini file (GetPrivateProfileString)

    Hello,
    I try to config lion server as file server for a windows application we use at work. All other computers are windows 7 or XP, lion server is the only mac. I choose lion server because it's size, quality and personal love of apple products.
    10.7.2 lion server's samba file sharing works almost perfectly with all my windows machines, I can copy, delete, modify any text files or office files without any issue, but the most important windows application for my business doesn't work with samba file sharing. After some digging, I found it is because windows program can't read or write INI file stored on lion share. Windows API GetPrivateProfileString always returns empty if the INI file is store on lion share.
    You can download a small application for read/write windows INI file from codeproject.com to test this problem:
    http://www.codeproject.com/KB/files/ini.aspx
    I can open/edit the in file using any text editor without any problem. The only problem is with those windows APIs. ACL is turned on for my lion share and assigned "delete" rights to samba users.
    I install samba3 on the same server; it works perfectly with windows API. My windows program also works. Looks like there is something wrong with lion server's sambax.
    I'd prefer to use built-in samba even I have samba3 working. Built-in samba is very immature right now, but considered how young it is, I will give apple some time to make it mature.
    Does anyone have same issue or knows how to fix it?
    Thanks,
    Michael.

    All the memory is fine. The server rarely if ever goes down when there are only around 10-12 users connected. When there are 20+ users connected and working heavily it goes down often. When I say working heavily, I mean they are transferring huge files to the SAN (100GB+), sometimes 5 at a time per user, and there are a bunch of others who are reading large video files at a minimum of 220MB/sec from the SAN.
    Though this worked on Snow Leopard without any issues, Lion just doesn't seem to be able to handle it. The odd thing is, on Snow Leopard there was only a single 1GB ethernet connection to a NAS system, whereas with Lion we have a much more powerful machine with a 6-port 10GB ethernet card and a 4 lane 8GB fiber card to a true SAN. You would think that the newer scenario with Lion would handle far more users with ease.
    So far, very disappointing with regards to Lion's file serving performance.

  • Need to read data files originally created in LabVIEW in C++

    I have originally created binary files in LabVIEW. These files are made by flattening labview data to a string, then converting the string to a U8 byte array which is then saved to a binary data file. A separate file is used to keep track of the variables written to the data file. (FAT) a 2D-String array (first element = variable name, 2nd element = staring byte location in .dat file, 3rd element = byte length of variable) is flattened to U32 and then written to a binary file.
    Opening the files in LabVIEW follows the inverse proceedure. The FAT file is read as a U32 binary data, converted to a byte array, converted to a string, and then unflattened from the string into a LabVIEW 2D-string data type. From this the starting location and length of the variable is extracted. These are used to read the data file, in U8, which is then converted bu a string and then unflattened to LabVIEW data according to the LabVIEW data type.
    I now need to now open these files in a Linux environment using C++. I am at a loss at how to emulate all of this data-type conversion, flattening, and unflattening in C++. Does anyone have any ideas?

    Faraclas wrote:
    > Thanks rolfk, I will do the reading. But just to make sure you don't misunderstand
    > me, everything works beautifully in LabVIEW.
    I gathered that. But reading through the description gave me the
    impression that a few conversions/typecasts may actually be superfluous
    without any change to the actual data.
    > The problem I am having is trying to open up these files in C++. This system has
    > been around for a couple of years now, so I cannot change the data structure in
    > the LabVIEW programs (well I could but I don't want to because it is really a very
    > flexible system that works well).
    Well, it really isn't that difficult, it just won't be a one hour job
    for sure. A few guidelines:
    1) LabVIEW flattened data contains the actual data as is for all fixed
    size elements (scalars and clusters of scalars). Any variable sized data
    (strings, arrays) is prepended with an int32 for each dimension
    containing the number of elements for that dimension.
    2) LabVIEW flattened data is always in Big Endian (Most significant Byte
    first) format. This means for normal C(++) programs developed on an x86
    system you will have to byteswap every single 16 bit and 32 bit integer.
    3) LabVIEW Typecast really is similar to Flattened data but no
    prepending of the number of elements is done for variable sized data.
    And Typecast can't convert any type containing variable sized data, but
    any arbitrary complex datatype only containing fixed size data, or a
    simple array or string can be typecasted.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Error Message when saving a scan with Officeject Pro L7555

    When the drive for the printer goes to save a scanned picture or document to Word2007 I get the message:  An error occured saving the images to the chosen file location.  The extended error information is:  8,[(6,1015,-2147220489)].  Printer scans th

  • V3.0, NLS_LENGTH_SEMANTICS byte vs. char for CREATE TABLE

    Hi, When creating a new table (via "New Table" or "Data Load ...") NLS_LENGTH_SEMANTICS of table columns are always in byte even when NLS_LENGTH_SEMANTICS is set to char for the instance (and so as default for all sessions) and has not explicitly cha

  • How can I enable Safari with Java

    I want to run Java Applets from Safari.  from Anfyteam.com I am not finding a Java extension that will provide the Java framework needed to do this. thanks, Bill

  • Extremly slow BB After 21CN upgrade

    On last wednsday exchange in Dungannon got a 21CN upgrade. I thougt yea  great news finally i'll get more than 9-10 Mbits. I must admit that before upgrade my bb was rock stable no problems at all ofc some minor dissconections occured during a 4 year

  • Sync Palm V with Blackberry Torch

    I just bought a new Blackberry Torch. I have a old Palm V(yea it still works!) that runs on the Palm Desktop software. I have Windows Vista with Windows Mail, not Outlook. How can I get my calender synced with my Torch?  I saw a lot of solutions for