Access INI files

Hello
Can I read an INI file using methods which would automatically search for a topic, an item and retrieve its value? If it is possible, please tell me which class and methods to use. Thanks for ur help.

can someone please give me an example of how to use this. I'm new to java and not sure how to read and write ini files.. thanks.

Similar Messages

  • TestStand: Access Denied to testexec.ini file

    When changing search directories, or any station property, I get an access denied error, and the changes to the search directories don't get saved.

    Hello Shay,
    If you are using Windows 2000/NT and your drive in which TestStand is located is partinoned as NTFS, you can set security permissions on folder or on a file basis. You should check your security settings for the folder \Cfg. This folder contains all the INI files that store the station options, and search directory settings. You may have the folder set to deny write access, when it should be set to full control. You can access the security options by right-clicking on the file/folder and selecting Properties from the context menu. Hope this helps.

  • How do I hide Windows .ini files in a dock folder?

    Background: On my MacBook Pro, I divided my hard drive into 3 partitions - one for Mac OS X, one for Windows 7, and one for common storage that I use to transfer my files between OS's.
    With this setup, I set my Dropbox folder on the "common storage" partition, and created a Dropbox dock folder for easy access. This isn't really a major problem, but it simply annoys me. Since Windows also has access to the Dropbox folder, it creates a desktop.ini file that shows up whenever I use the Dropbox dock shortcut. I tried editing it through Finder, but it's already hidden. It only shows up in the dock folder.
    Is there a way to hide this .ini file?

    What do you mean deleted from the user's list?  Do you mean removed permissions?  If so, right click the folder and select get info.  Scroll down to sharing and permissions.  Click the lock and put in your password.  Then click the + and add the user back.
    Otherwise, more details...

  • Syntax error in NQSConfig.ini.file

    # NQSConfig.INI
    # Copyright (c) 1997-2006 Oracle Corporation, All rights reserved
    # INI file parser rules are:
    # If values are in literals, digits or _, they can be
    # given as such. If values contain characters other than
    # literals, digits or _, values must be given in quotes.
    # Repository Section
    # Repositories are defined as logical repository name - file name
    # pairs. ODBC drivers use logical repository name defined in this
    # section.
    # All repositories must reside in OracleBI\server\Repository
    # directory, where OracleBI is the directory in which the Oracle BI
    # Server software is installed.
    [ REPOSITORY ]
    Star     =     OracleBIAnalyticsApps.rpd, DEFAULT
    # Query Result Cache Section
    [ CACHE ]
    ENABLE     =     NO;
    // A comma separated list of <directory maxSize> pair(s)
    // e.g. DATA_STORAGE_PATHS = "d:\OracleBIData\nQSCache" 500 MB;
    DATA_STORAGE_PATHS     =     "C:\OracleBIData\cache" 500 MB;
    MAX_ROWS_PER_CACHE_ENTRY = 100000; // 0 is unlimited size
    MAX_CACHE_ENTRY_SIZE = 1 MB;
    MAX_CACHE_ENTRIES = 1000;
    POPULATE_AGGREGATE_ROLLUP_HITS = NO;
    USE_ADVANCED_HIT_DETECTION = NO;
    MAX_SUBEXPR_SEARCH_DEPTH = 7;
    // Cluster-aware cache
    // GLOBAL_CACHE_STORAGE_PATH = "<directory name>" SIZE;
    // MAX_GLOBAL_CACHE_ENTRIES = 1000;
    // CACHE_POLL_SECONDS = 300;
    // CLUSTER_AWARE_CACHE_LOGGING = NO;
    # General Section
    # Contains general server default parameters, including localization
    # and internationalization, temporary space and memory allocation,
    # and other default parameters used to determine how data is returned
    # from the server to a client.
    [ GENERAL ]
    // Localization/Internationalization parameters.
    LOCALE     =     "English-usa";
    SORT_ORDER_LOCALE     =     "English-usa";
    SORT_TYPE = "binary";
    // Case sensitivity should be set to match the remote
    // target database.
    CASE_SENSITIVE_CHARACTER_COMPARISON = OFF ;
    // SQLServer65 sorts nulls first, whereas Oracle sorts
    // nulls last. This ini file property should conform to
    // that of the remote target database, if there is a
    // single remote database. Otherwise, choose the order
    // that matches the predominant database (i.e. on the
    // basis of data volume, frequency of access, sort
    // performance, network bandwidth).
    NULL_VALUES_SORT_FIRST = OFF;
    DATE_TIME_DISPLAY_FORMAT = "yyyy/mm/dd hh:mi:ss" ;
    DATE_DISPLAY_FORMAT = "yyyy/mm/dd" ;
    TIME_DISPLAY_FORMAT = "hh:mi:ss" ;
    // Temporary space, memory, and resource allocation
    // parameters.
    // You may use KB, MB for memory size.
    WORK_DIRECTORY_PATHS     =     "C:\OracleBIData\tmp";
    SORT_MEMORY_SIZE = 4 MB ;
    SORT_BUFFER_INCREMENT_SIZE = 256 KB ;
    VIRTUAL_TABLE_PAGE_SIZE = 128 KB ;
    // Analytics Server will return all month and day names as three
    // letter abbreviations (e.g., "Jan", "Feb", "Sat", "Sun").
    // To use complete names, set the following values to YES.
    USE_LONG_MONTH_NAMES = NO;
    USE_LONG_DAY_NAMES = NO;
    UPPERCASE_USERNAME_FOR_INITBLOCK = NO ; // default is no
    // Aggregate Persistence defaults
    // The prefix must be between 1 and 8 characters long
    // and should not have any special characters ('_' is allowed).
    AGGREGATE_PREFIX = "SA_" ;
    # Security Section
    # Legal value for DEFAULT_PRIVILEGES are:
    # NONE READ
    [ SECURITY ]
    DEFAULT_PRIVILEGES = READ;
    PROJECT_INACCESSIBLE_COLUMN_AS_NULL     =     NO;
    MINIMUM_PASSWORD_LENGTH     =     0;
    #IGNORE_LDAP_PWD_EXPIRY_WARNING = NO; // default is no.
    #SSL=NO;
    #SSL_CERTIFICATE_FILE="servercert.pem";
    #SSL_PRIVATE_KEY_FILE="serverkey.pem";
    #SSL_PK_PASSPHRASE_FILE="serverpwd.txt";
    #SSL_PK_PASSPHRASE_PROGRAM="sitepwd.exe";
    #SSL_VERIFY_PEER=NO;
    #SSL_CA_CERTIFICATE_DIR="CACertDIR";
    #SSL_CA_CERTIFICATE_FILE="CACertFile";
    #SSL_TRUSTED_PEER_DNS="";
    #SSL_CERT_VERIFICATION_DEPTH=9;
    #SSL_CIPHER_LIST="";
    # There are 3 types of authentication. The default is NQS
    # You can select only one of them
    #----- 1 -----
    #AUTHENTICATION_TYPE = NQS; // optional and default
    #----- 2 -----
    #AUTHENTICATION_TYPE = DATABASE;
    # [ DATABASE ]
    # DATABASE = "some_data_base";
    #----- 3 -----
    #AUTHENTICATION_TYPE = BYPASS_NQS;
    # Server Section
    [ SERVER ]
    SERVER_NAME = Oracle_BI_Server ;
    READ_ONLY_MODE = NO;     // default is "NO". That is, repositories can be edited online.
    MAX_SESSION_LIMIT = 2000 ;
    MAX_REQUEST_PER_SESSION_LIMIT = 500 ;
    SERVER_THREAD_RANGE = 40-100;
    SERVER_THREAD_STACK_SIZE = 0; // default is 256 KB, 0 for default
    DB_GATEWAY_THREAD_RANGE = 40-200;
    DB_GATEWAY_THREAD_STACK_SIZE = 0; // default is 256 KB, 0 for default
    MAX_EXPANDED_SUBQUERY_PREDICATES = 8192; // default is 8192
    MAX_QUERY_PLAN_CACHE_ENTRIES = 1024; // default is 1024
    MAX_DRILLDOWN_INFO_CACHE_ENTRIES = 1024; // default is 1024
    MAX_DRILLDOWN_QUERY_CACHE_ENTRIES = 1024; // default is 1024
    INIT_BLOCK_CACHE_ENTRIES = 20; // default is 20
    CLIENT_MGMT_THREADS_MAX = 5; // default is 5
    # The port number specified with RPC_SERVICE_OR_PORT will NOT be considered if
    # a port number is specified in SERVER_HOSTNAME_OR_IP_ADDRESSES.
    RPC_SERVICE_OR_PORT = 9703; // default is 9703
    # If port is not specified with a host name or IP in the following option, the port
    # number specified at RPC_SERVICE_OR_PORT will be considered.
    # When port number is specified, it will override the one specified with
    # RPC_SERVICE_OR_PORT.
    SERVER_HOSTNAME_OR_IP_ADDRESSES = "ALLNICS"; # Example: "hostname" or "hostname":port
    # or "IP1","IP2":port or
    # "hostname":port,"IP":port2.
    # Note: When this option is active,
    # CLUSTER_PARTICIPANT should be set to NO.
    ENABLE_DB_HINTS = YES; // default is yes
    PREVENT_DIVIDE_BY_ZERO = YES;
    CLUSTER_PARTICIPANT = NO; # If this is set to "YES", comment out
    # SERVER_HOSTNAME_OR_IP_ADDRESSES. No specific NIC support
    # for the cluster participant yet.
    // Following required if CLUSTER_PARTICIPANT = YES
    #REPOSITORY_PUBLISHING_DIRECTORY = "<dirname>";
    #REQUIRE_PUBLISHING_DIRECTORY = YES; // Don't join cluster if directory not accessible
    DISCONNECTED = NO;
    AUTOMATIC_RESTART = YES;
    # Dynamic Library Section
    # The dynamic libraries specified in this section
    # are categorized by the CLI they support.
    [ DB_DYNAMIC_LIBRARY ]
    ODBC200 = nqsdbgatewayodbc;
    ODBC350 = nqsdbgatewayodbc35;
    OCI7 = nqsdbgatewayoci7;
    OCI8 = nqsdbgatewayoci8;
    OCI8i = nqsdbgatewayoci8i;
    OCI10g = nqsdbgatewayoci10g;
    DB2CLI = nqsdbgatewaydb2cli;
    DB2CLI35 = nqsdbgatewaydb2cli35;
    NQSXML = nqsdbgatewayxml;
    XMLA = nqsdbgatewayxmla;
    ESSBASE = nqsdbgatewayessbasecapi;
    # User Log Section
    # The user log NQQuery.log is kept in the server\log directory. It logs
    # activity about queries when enabled for a user. Entries can be
    # viewed using a text editor or the nQLogViewer executable.
    [ USER_LOG ]
    USER_LOG_FILE_SIZE = 10 MB; // default size
    CODE_PAGE = "UTF8"; // ANSI, UTF8, 1252, etc.
    # Usage Tracking Section
    # Collect usage statistics on each logical query submitted to the
    # server.
    [ USAGE_TRACKING ]
    ENABLE = YES;
    //==============================================================================
    // Parameters used for writing data to a flat file (i.e. DIRECT_INSERT = NO).
    STORAGE_DIRECTORY = "<full directory path>";
    CHECKPOINT_INTERVAL_MINUTES = 5;
    FILE_ROLLOVER_INTERVAL_MINUTES = 30;
    CODE_PAGE = "ANSI"; // ANSI, UTF8, 1252, etc.
    //==============================================================================
    DIRECT_INSERT = YES;
    //==============================================================================
    // Parameters used for inserting data into a table (i.e. DIRECT_INSERT = YES).
    PHYSICAL_TABLE_NAME = "OBI Usage Tracking"."Catalog"."dbo"."S_NQ_ACCT" ; // Or "<Database>"."<Schema>"."<Table>" ;
    CONNECTION_POOL = "OBI Usage Tracking"."Usage Tracking Writer Connection Pool>" ;
    BUFFER_SIZE = 10 MB ;
    BUFFER_TIME_LIMIT_SECONDS = 5 ;
    NUM_INSERT_THREADS = 5 ;
    MAX_INSERTS_PER_TRANSACTION = 1 ;
    //==============================================================================
    # Query Optimization Flags
    [ OPTIMIZATION_FLAGS ]
    STRONG_DATETIME_TYPE_CHECKING = ON ;
    # CubeViews Section
    [ CUBE_VIEWS ]
    DISTINCT_COUNT_SUPPORTED = NO ;
    STATISTICAL_FUNCTIONS_SUPPORTED = NO ;
    USE_SCHEMA_NAME = YES ;
    USE_SCHEMA_NAME_FROM_RPD = YES ;
    DEFAULT_SCHEMA_NAME = "ORACLE";
    CUBE_VIEWS_SCHEMA_NAME = "ORACLE";
    LOG_FAILURES = YES ;
    LOG_SUCCESS = NO ;
    LOG_FILE_NAME     =     "C:\OracleBI\server\Log\CubeViews.Log";
    # MDX Member Name Cache Section
    # Cache subsystem for mapping between unique name and caption of
    # members for all SAP/BW cubes in the repository.
    [ MDX_MEMBER_CACHE ]
    // The entry to indicate if the feature is enabled or not, by default it is NO since this only applies to SAP/BW cubes
    ENABLE = NO ;
    // The path to the location where cache will be persisted, only applied to a single location,
    // the number at the end indicates the capacity of the storage. When the feature is enabled,
    // administrator needs to replace the "<full directory path>" with a valid path,
    // e.g. DATA_STORAGE_PATH = "C:\OracleBI\server\Data\Temp\Cache" 500 MB ;
    DATA_STORAGE_PATH     =     "C:\OracleBIData\cache" 500 MB;
    // Maximum disk space allowed for each user;
    MAX_SIZE_PER_USER = 100 MB ;
    // Maximum number of members in a level will be able to be persisted to disk
    MAX_MEMBER_PER_LEVEL = 1000 ;
    // Maximum size for each individual cache entry size
    MAX_CACHE_SIZE = 100 MB ;
    # Oracle Dimension Export Section
    [ ORA_DIM_EXPORT ]
    USE_SCHEMA_NAME_FROM_RPD = YES ; # NO
    DEFAULT_SCHEMA_NAME = "ORACLE";
    ORA_DIM_SCHEMA_NAME = "ORACLE";
    LOGGING = ON ; # OFF, DEBUG
    LOG_FILE_NAME     =     "C:\OracleBI\server\Log\OraDimExp.Log";
    Help me out Gurus thanks in advance

    Hi,
    Star = OracleBIAnalyticsApps.rpd, DEFAULTthis should be end with semicolon
    Star = OracleBIAnalyticsApps.rpd, DEFAULT;
    Assign Points and close thread, if your question is answered...
    Cheers,
    Aravind

  • Modification to SAP Logon Cannot be written to INI file

    Hi,
    When i am trying to create a New Item in SAP logon it is giving an error "Modification to SAP logon could not be Written to INI file
    Check permission for file 'C:\Windows'.
    The problem is that, this is showing even when i m logged in as "XXXADM".
    I have Reinstalled the SAP GUI, but the problem is as it is.
    OS: WINDOWS 2003 server
    Database: Oracle.
    Please help me.
    Thanks in advance,
    Sharib

    I had this same problem under a VISTA Enterprise client setup.  I tried all the various recommendations, including setting the SAPLOGON_INI_FILE environment variable to point to c:\windows\saplogon.ini.  None of these changes worked, I even modified the file ownership to match up with my logged on user without success.
    I then looked at the shortcut for launching SAPLOGON, and tried to set the shortcut to run as an Administrator.  That option was greyed out.  I deleted the shortcut, and re-created it.  Still unable to save changes.  I then set the new SAPLOGON shortcut to execute as the administrator, and once I confirmed that I trusted the program, everything is now working as it should.
    Not content to leave it this way, I moved my saplogon.ini file OUT of the c:\windows directory and instead placed it in the directory pointed to by %USERPROFILE%\saplogon.ini .  I updated the environment variable setting and also removed the falg to execute the shortcut as the system administrator.
    Now everything is working as it should without any special hoops -- seems that even with full access, VISTA security would not let a domain user that was part of the PC's Administrators account to edit the file w/o running as the system administrator.
    Edited by: David L. Flad on Oct 30, 2009 4:02 AM

  • Accessing Opera files on Nokia N78

    I have nokia N78 and i installed opera mobile browser on it. However through PC sync software that comes with phone i cannot access opera.ini or other files of opera.
    Please some one guide

    Install LCG X-plore or Y-Browser file managers on your n78. You'll be able to access all files direct from the phone and send via bluetooth to your PC.
    http://www.lonelycatgames.com
    http://www.DrJukka.com
    Message Edited by gerrymoth on 15-Oct-2008 11:08 AM
    gerrymoth
    http://nokiAAddict.com
    Using E71, N97 & 5800 XM on O2 Simplicity

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

  • Error in executing transformer.ini file in SSM

    Hi,
    I am working on Hybrid Olap in SSM. I have prepared a transformer.ini file with required sections. I have exported my dimension model to RDBMS. But while executing transformer.ini file i am facing a error where a dialog box appears which says
    ' The library database could not be accessed while trying to report message 7026 ' .
    If anyone know about this errror or face the same error, then please let me know its solution.
    Also does anyone know about what is the exact function of first section of transformer file ie. [windows]
    does and why do we give the path of TBDB file.
    regards
    Himanshu

    Hi Ravi,
    i mapped some of the data fields. Control fields i disabled them....
    Can you giv me wat are the importent fields for Cremas04...
    I did all the field that are indicated in red color..
    still i m getting error
    Message was edited by:
            Pavani Kumari Kokkiragedda

  • NI PXI-1042 controller.ini file

    Hi,
    My PXI-1042 system just came in and now I am configuring the controller. A NI PXI-8361.
    But in my MAX I can not find the controller.ini files. Where should I look when browsing for it ?
    Same goes for the chassis but my guess is that the chassis three will become available when I found the controller.
    Thanks in advance.
    Stieve
    Solved!
    Go to Solution.

    Hi Stieve
    Just in the case you didn't yet found out, as your post is already quite old.
    The PXI-8361 is a MXI controller using an external PC. Therefore in MAX, you have to identify is as 'External PC' and not an actual controller. Once this is selected, you should also get access to the proper chassis setup.
    Best Regards
    Michiel
    Applications Engineer
    NI Belgium
    http://www.ni.com/ask

  • SAPLOGON.SAL- different saplogon.ini files

    Dear all,
    I'm looking for a possibility to use different ini files, dependent from the access via network (lan) or VPN.
    The local saplogon.ini file should only be used if the saplogon.ini file from the network directory is not available. Maybe with SAPLOGON.SAL?
    thanks in advance!

    if (netWorkIsAvailable())
    System.Runtime.InteropServices.Environment.SetEnvironmentVariable("SAPLOGON_INI_FILE", "c:
    windows
    SAPLOGON.SAL");
    else
    System.Runtime.InteropServices.Environment.SetEnvironmentVariable("SAPLOGON_INI_FILE", null);
    SAPLogonDestination dest = new SAPLogonDestination();
    Message was edited by: Reiner Hille-Doering

  • File Error 8 when saving an ini file in C:\Program Files\ without Admin rights

    I have built my LabVIEW 7.0 Functional Tester software into an application. During install I use a batch file to copy the limits.ini file to the install directory (Usually C:\Program Files\Wellington\ )
    If I log in as administrator (Windows 2k) LabVIEW can write to limits.ini OK. However without Administrator rights LabVIEW can't modify this file (using the Configuration File vi’s) - it returns File Permission Error 8. (It can read the file).
    1. Is there a way around this without manually hacking the registry?
    2. I tend to put my ini files for my LabVIEW software in the same directory as the LabVIEW exe file. Should I be using a different location (eg the \data directory)?
    3. The reason I do not include the *.ini file in the installer is that I can modify it without having to rebuild the app. Instead I get the installer to run a batch file that copies *.ini files from the source directory to the install directory.
    Thanks for your help in advance.
    Nicholas

    Nick wrote:
    > I have built my LabVIEW 7.0 Functional Tester software into an
    > application. During install I use a batch file to copy the limits.ini
    > file to the install directory (Usually C:\Program Files\Wellington\ )
    >
    > If I log in as administrator (Windows 2k) LabVIEW can write to
    > limits.ini OK. However without Administrator rights LabVIEW can't
    > modify this file (using the Configuration File vi’s) - it
    > returns File Permission Error 8. (It can read the file).
    >
    > 1. Is there a way around this without manually hacking the registry?
    Give the particular user write access to that directory.
    > 2. I tend to put my ini files for my LabVIEW software in the same
    > directory as the LabVIEW exe file. Should I be using a different
    > location (eg the
    \data directory)?
    For newer OSes like Unix, and Windows 2k or better yes it would be a
    good idea. Unix typically uses a . file in the home directory
    of the user. Another idea would be to create a known directory inside
    the home directory and put all it's data files there.
    LabVIEW 7.0 has a new VI to return the user data directory.
    > 3. The reason I do not include the *.ini file in the installer is that
    > I can modify it without having to rebuild the app. Instead I get the
    > installer to run a batch file that copies *.ini files from the source
    > directory to the install directory.
    This will only work when you work on the same machine as you developed
    it (or at least the same network).
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • CFP LV RT 2009 (ETS) Bug - Crashing on bad INI file

    Hello,
    This problem was actually touched upon in this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=466392&jump=true#M466392
    I have found, that if the ni-rt.ini file contains any "unexpected"  or wrong parameters (like the thread above describes), my cFP 2210 with LV RT 2009 crashes. After the crash, the following is the situation:
    - The ni-rt.ini file is garbled with strange charcters.
    -  I have format the "disk"  and reinstall all software again to make it work correctly!
    This is bad, since I have never encoutnered such a problem with LV 8.2 on a cFP 2120: 
    We have two of these running in a Concrete Production Plant here in Norway.
    They have been stable for 2 years.
    I could send updates via email: Just the .rtexe and the .alias file.
    The electrical engineer at the plant used FTP to replace the existing .rtxex and .alias file,
    Then he edited the .ini file with the name of the new .rtexe.
    If any errors where entered into the .ini file, the cFP simply would report the error to one of the logs, and NOT CRASH!
    I recon this is a bug, and it may easily be reproduced by trying to enter the entries I have listed in the thread linked to above.
    Geir Ove

    Hello,
    I have updated information on this problem:
    First a little background on "how it used to be"  when running LV 8.2 RT on a cFP 2120:
    To update the cFP with a new program, I did the following over a wireless network while the cFP was running but the machine it controlled was sitting stationary:
    1) On the cFP: renamed the .rtexe to .rt (to allow the file to be deleted)
    2) Deleted booth the .alias and .rt file
    3) downloaded new .rtexe and .alias files
    4) uploaded to my PC the ni-rt.ini file. Edit the name of the startup program
    5) downloaded the new ni-rt.ini file to the cFp
    6) From my PC rebooted the cFP
    THis may seem like a wild thing to do, but it works like a charm.
    It turns out, it also works well on the cFP 2120  with LV RT 2009.
    However, on the cFP 2210  the ni-rt.ini file becomes corrupted if the file is downloaded again to the cFP while it is running.
    If, however, the cFP is rebooted into Safe Mode first, I can still do all the steps above to update the cFP.
    WHy I do not use LV to do the update? Well,  in this manner the customer can do the update with no special tools or LV knowledge.
    Also, it is valuable to be able to update the cFP without accessing it physically, because it is not easily accessible (A conveyor running under the roof of the factory !)
    I do not understand why there should be a difference between the cFP 2120 and cFP 2210 in this respect !
    But since it is, it should be documented. We use LV to save development time, but this has costed extra time in this project.
    Geir Ove

  • 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

  • Labwindow ini files

    I am new to Labwindow/CVI . I need to write INI files for device configuration, If anyone can post few examples and related docs and links it would be very helpful
    Solved!
    Go to Solution.

    There is really nothing to "configure" in that instrument: the structure of the .INI file you want to creat / access is totally in your hands.
    Supposing you want to store some parameters to define an acquisition decive, you must define a section, e.g. "Acquisition", and then define the single items that will go into that section, for example "Channels" or "Device", being the first an integer and the latter a string. After you have planned the file structure, you simply create the proper strings to store informations, e.g.
    Ini_PutInt (IniTextHandle, "Acquisition", "Channels", 3);
    and the instrument will create a file like this:
    [Acquisition]
    Channels = 3
    (do not forget to create the IniText handle first and to call Ini_WriteToFile last)
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Bug : LVRT ini file pollution/corruption... (leaves me speechless)

    Hello,
    I programming a platform independend autonomous datalogger in C based on 6009 and Nidaqmxbase but i see something strange in Windows platform about ini file
    I see the lib hook al I/O access to overlappe file read/write and adding some keys especially in INI file with the exact same name of executable
    For exemple you got [LVRT] at the top of the ini file, and this not be properly handle, this corrupt INI files lines
    I lot my voice when i discover it ! leaves me speechless !
    What did you do NI dev team ? did you think about performance & ressources & simplicity ? hum...
    You can reproduce with the joined sample with MINGW and make.bat
    Hop something respond me a day
    rom1nux
    Attachments:
    acquirelvrt.c ‏5 KB
    make.bat.txt ‏2 KB

    rom1nux wrote:
    Hello Ben,
    The type of change you are requesting to avoid the issue you are seeing would take years to implement
    Hum...you get right, but in "C world" this kind of things is a complet "non-sens"...
    if we use C, this is because we want to know exactlly what we do !
    Getting accross a lib wich can produce this kinds of non-documented manipulations is not very safe in my world...
    immediatly we get doubt  "...what other surprising things this library can reserved...", "...does it coded with feet..."
    And more scarry, why this strange not-documented backgrounded operations dont work properlly ? (ie: corrupt acces to file with simple fprintf() )
    Look what kind of code NI devs need to "hook the I/O systems-calls" and your begin to think about performance and ressources losts, and begin to be really scarry...
    Other thing, basic, why something "normally disabled" (ie: LABView) want to write to a config file ? and what he use my own system call ?
    Hum..yes...this takes years to re-implement
    So the best i can do is suggest you treat the name as "reserved" to NI and work around it.
    Yes, this is what we do, but for our case this is quiet the "straw that broke the camel", too much problem/limitation/workaround on linux version...seem identical on Windows...
    I have to check if Nidaqmxbase3.4.5 got improvements...My boss goes to decide in few day...he currently look if mcc is according real C philosophies...
    Thanks a lot for your Help and your suggestions
    Rom1nux
    With great power comes great complexity. I'm still learning everything that has bee dumped on my brain.
    Pssst don't tell anyone but....
    mcc is now owned by NI.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Calling report from form with lexical parameter

    hi DECLARE      repid REPORT_OBJECT;      v_rep VARCHAR2(1000);      rep_status VARCHAR2(20); BEGIN           repid := FIND_REPORT_OBJECT( 'REPORT34' );           set_report_object_property(repid,report_other,'p_SEASON_YEAR='||:SALE_ORDER.SEASON_YEAR

  • HT204409 WIFI BUTTON DISABLED

    hi there my wifi button is disabled and this happed after my last update

  • How to get Caption of custom metadat

    Hi everybody, I tried to change tha page "Workflow in queue". I would like to add my custom field. I don't have a problem to add custom metadata field, but I have problem with the Caption. This code doesn't get the Caption of the field xInvoice_Numbe

  • 9iAS: Configuration to work against uncertified database versions

    Can 9iAS be configured, and is it worthwhile in the opinion of this forum, to try to configure 9iAS against uncertified versions of the database like 7.x The customer is planning to migrate all plsql custom apps from OAS to 9iAS / DB-8.1.7. However,

  • Different problems on different architectures

    The 64 bit installer can't see my hard drive. cfdisk gives a fatal error for any of the usual /dev/ candidates, and a quick check through /dev/ seems to suggest that none of them are there. The normal installer has no trouble seeing or partitioning m