.INI files vs .TXT files for changing default values in a .EXE?

Hi,
I have a two-part question related to updating the default values of controls in an executable:
I am creating a LabVIEW executable for installation on two different production-floor computers.   I need to be able to change the default values of the front panel controls (as I would do with the “make this value default” command during development). From reading prior posts, I understand that I could use the “Write Configuration Settings File.vi” and “Read Configuration Settings File.vi” to generate a .INI file that would be read by the .EXE and would establish the desired values of the controls. However when I took a look at the block diagrams for those configuration .VIs, they don’t appear (to me) to be any easier to use than just reading values from a spreadsheet file. IE: Instead of using these configuration files and a .INI file, could I not instead just read values from a .TXT file that contains the desired values?   I’ve never used a .INI file before, or had to worry about “keys” and “sections,” so from my (perhaps naïve) perspective, the .INI method seems less easy to use. Is there any advantage to the .INI format?
Regardless of whether I use the .INI file or a .TXT file, I have this additional problem: One of the things that changes when I install my .EXE file on a new computer is the COM port numbers used by two serial devices.   (On my development computer, the two serial devices use COM5 and COM6, whereas on the two production-flood computers, the COM ports will almost certainly be different).   I suppose I could use the Device Manager on the production-floor computers to change the COM ports to be the same as those on my development computer, but I’d prefer to be able to (again) change the default value of the COM ports in my .EXE.   However, I’m not sure how to do that.   The configuration VIs, have options for reading / writing Booleans, strings, paths, and numeric, but not, (so far as I can tell) for a VISA class.
Any thoughts / suggestions are welcome. Thanks.
Solved!
Go to Solution.

Dan_the_Clam wrote:
Thanks for your reply, Yamaeda,
Great that I can use a string to open a VISA session - I had no idea.  I'll try that.  
And - ah - you are right about the .INI files.  I just did an experiment in which I re-ordered the sections and randomly changed which letters were capitalized in the key values, and the "read configuration settings.VI" still read the file correctly.  Thanks for that.
Unfortunately, in my existing code, the controls on the block-diagram aren't all co-located together; they are scattered throughout the block diagram - some of them in case structures and loops.   I suppose that means I'll have to move them all to the left side of the block diagram, route them to these "Write Key.VIs" and then wire them up into the cases and loops with fairly long wires.   It's just a hassle, and is going to make my block diagram more complicated.  Well, I suppose that's how one learns...
Thanks again.
dan
Assuming you have a state machine and an Init state it's a fair use of Local Variables to update controls from the ini-file. The same goes for saving the values.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV

Similar Messages

  • I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    How to know character's encoding is ASCII?

  • Wrongly transformed the sentences of left and right paragraphs into one sentence in PDF files to txt files by Acrobat 9 Pro

    I found that the when transforming PDF files into TXT files by Acrobat 9 Pro, the Acrobat will wrongly transform the sentences of the left hand side and right hand side paragraphs into one sentence, while the correct format should be the later sentence follows the former sentence in each paragraph.
    An example PDF is : http://cardiovascres.oxfordjournals.org/content/cardiovascres/45/1/200.full.pdf
    Is there any solution for this problem? Or should I use other software (or other version of Acrobat) to solve the problem? Thank you.

    PDF is not a word processor file format.
    It has no "styles", "format", "layout", "columns", "rows", "tables", etc.
    PDF writers paint the content to the canvas that is the PDF page.
    Depending on what was used and how it operates this painting can be like a paint by numbers affair.
    ISO 32000-1:2008, the ISO standard for PDF explains it all.
    So, when exporting to text from your PDF the progression is left to right, top down.
    Remember, PDF has no awareness of "columns". What we see is our construct not PDF's.
    What you and I see as two columns with a specific read order is our imposition.
    What is on the PDF page is simply a line of text characters.
    That is how it is with all versions of Acrobat. Applications can only make use of what the file format supports eh.
    What to do?
    Master content in a logical hierarchy in the authoring file.   
    Always use the build-in Headings for Headings.     
    Use the built-in "table" feature.  
    Use a PDF writer process that is compliant with the ISO standard and that supports proper output of Tagged PDF.   
    A well-formed Tagged PDF will export properly.  
    Two key design considerations for Tagged PDF are:  
    (1)  Support Accessible PDF   
    (2)  Support Export of PDF page content. 
    What constitutes a "well-formed tagged PDF?"
    This would be a PDF that is ISO 14289-1, PDF/UA-1 compliant.
    Be well... 

  • Wrongly transformed the sentences of left and right paragraphs into one sentence in PDF files to txt files by Acrobat 11

    I found that the when transforming PDF files into TXT files by Acrobat 11, the Acrobat will wrongly transform the sentences of the left hand side and right hand side paragraphs into one sentence, while the correct format should be the later sentence follows the former sentence in each paragraph.
    An example PDF is : http://cardiovascres.oxfordjournals.org/content/cardiovascres/45/1/200.full.pdf
    Is there any solution for this problem? Or should I use other software (or other version of Acrobat) to solve the problem? Thank you.

    Hi Anubha,
    Same problem occurred when converted into word file.
    I convert the PDF into txt as I need to use the txt format for running some analyses (and I have thousands of such PDF).
    However, I found the same problem even if I use the original PDF file, so I am seeking the solution.
    Actually the PDF can be converted to any format if the problem can be solved! Thank you.

  • Converting batch pdf files to txt files

    Hello all,
    I am a intermediate level programmer with experience in Visual Basic 6. I am developing a small application to read data from pdf files. However, i was unable to directly read the data from pdf files. So, i converted them to txt files and then was able to process them.
    However, the first step of converting pdf files to txt files is still doen manually. I want to automate it. Can someone help on how to go about it using VB6?
    Im using Adobe Reader X (Ver 10.1.6) and Window 7 Operating System.
    Thanks
    Rupam

    Can you provide  afull details on how to convert PDF file autocad drawing to original autocad system....thanking

  • [Forum FAQ] How do I change default values shown in Report Delivery Options?

    Introduction
    Some users want to change default values shown in Report Delivery Options when creating standard subscriptions. Someone might want to always Cc the report to a specified user without sending the report URL. So they want to display those default values display
    automatically when creating standard subscriptions like below.
    Solution
    To achieve this goal, please embed JavaScript code into the SubscriptionProperties.aspx file to change those default values (By default, the file’s location is: <Installation directory>\Reporting Services\ReportManager\Pages\SubcriptionProperties.aspx).
    The example below will show how to set default values for “Cc” field and “Include Link” field.
    Before coding, pleas find out the corresponding HTML tags of the two fields in the browser using IE Developer Tools.
    Get “Cc” field with its corresponding HTML tag
    Get “Include Link” field with its corresponding HTML tag
    Embed such a code snippet at the end of the existing code within the SubcriptionProperties.aspx file
    <script runat="server">   
    protected void Page_Load(object sender, EventArgs e)
        Page.ClientScript.RegisterStartupScript(typeof(Page),"MyScript", "var cc = document.getElementById('CcEmailAddressesID');cc.value = '[email protected]';var IncludeLink = document.getElementById('ui_cbIncludeLink');IncludeLink.checked
    = false;",true);}
    </script>
    Create a new subscription to check the default values shown in Report Delivery Options 
    Applies to
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How to change default value in a table using ALTER TABLE

    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • [svn:fx-3.x] 10868: change default value of selectable in ASDoc comment to true

    Revision: 10868
    Author:   [email protected]
    Date:     2009-10-05 11:05:50 -0700 (Mon, 05 Oct 2009)
    Log Message:
    change default value of selectable in ASDoc comment to true
    QE notes: -
    Doc notes: -
    Bugs: -
    Reviewer: -
    Tests run: - checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/TextArea.as

    Thank you much for your response.
    I tried that and it did work. But my requirement is to have a user input the date. The basic idea is if the user decides on a predefined time range like Day Shift Today or Yesterday and so on... then the report would automatically calculate the values based on predefined date time values. On the other hand, if the intent is to run the report for an arbitrary period then the user supplies the date and time limits.
    What I am trying to achieve is have the same parameter available for user input , but when the User decides he wants Predefined then the "textbox" populates with date and time as per his choice of predefind range.
    I understand that by this the user can still overwrite the date and time on the text box, but the report will run the predefined values as long as he has the @PredefinedDateSelection Set to true.
    Is there a way I can impement this?
    Once again I thank you and appreciate  your input.

  • Changing default value DropDownbyindex in wdinit in view

    Hi everyone, I'm using drop down by index in a view. It has many values but I want to change default value.
    I think that I have to simulate an action on dropdownbykey like select a value.
    Can i retrieve the index of an element of nod passing his value?
    Thanks a lot.

    hi ,
    u can try looping into the internal table .
    u must  be having that dynamic value ,suppose lv_sysid, based on which u want to set the index
    thn u can proceed like this :
      DATA : itab_sys     TYPE STANDARD TABLE OF z2ts_systems .
    *   populating internal table
        SELECT *
         FROM z2ts_systems
          APPENDING TABLE itab_sys.
    DATA : lv_index type i .
        clear  wa_sys.
      LOOP AT itab_sys INTO wa_sys.
        IF wa_sys-SYS_ID =  lv_sysid.
          lv_index = sy-tabix.
        ENDIF.
    here I have compared the work area value to lv_sysid
    lv_sysid is the value based on which u want to set ur index
    thn u can proceed to set the lead selection to lv_index.
    rgds,
    amit

  • Badi for setting default values in the transaction in APO.

    BADI NAME: SMOD_APOCF005 which is used for setting default values in the transaction.
    I have implemented the BADI using the below code but that BADI is not triggering. Please can you provide any solution for resolving this.
    As per my requirement I am trying to set default values for these three fields RRP_TYPE, WHATBOM, CONVH.
    DATA: LS_MATLOC LIKE LINE OF IT_MATLOC.
    LOOP AT IT_MATLOC INTO LS_MATLOC.
    LS_MATLOC-RRP_TYPE = '4'.
    LS_MATLOC-WHATBOM = '5'.
    LS_MATLOC-CONVH = '999'.
    MODIFY TABLE IT_MATLOC FROM LS_MATLOC TRANSPORTING RRP_TYPE WHATBOM CONVH.
    ENDLOOP.
    DATA: LS_MATLOCX LIKE LINE OF IT_MATLOCX.
    LOOP AT IT_MATLOCX INTO LS_MATLOCX.
    LS_MATLOCX-RRP_TYPE = 'X'.
    LS_MATLOCX-WHATBOM = 'X'.
    LS_MATLOCX-CONVH = 'X'.
    MODIFY TABLE IT_MATLOCX FROM LS_MATLOCX TRANSPORTING RRP_TYPE WHATBOM CONVH.
    ENDLOOP.

    The  BADI name: SMOD_APOCF005 .
    T.code at APO : /sapapo/mat1
    Once we enter in that T.Code with some Product and Location data.
    There under PP/DS tab.
    Under Planning Procedure there is a field PP Plng Procedure which I want to set as 4
    And under Order Creation there is Plan Explosion which needs to be set as 5
    And Under Horizons there is PP/DS Horizon which needs to be set as 999.
    BADi is implemented and active.
    And once the data is CIF from ECC to APO
    These default values are not set in the T code in APO and the BADi is not triggering.

  • OAF : LOV mappings do not execute for specified default value in the LOV

    Dear All,
    I know the topic of default value in an LOV has been discussed a million times.
    Please bear with me -
    I set the "Initial Value" property for an LOV to populate a default value in the LOV field when the page loads. This works fine
    My LOV has about 4 lov mappings that populate 4 "formValue" items on my page.
    However, for the default value, these mappings are not executed and the formValue items remain empty. (Though the default value shows up fine on the screen)
    Do I have to explicitly default these formValue items as well ? Is there anyway to get the mappings to execute ?
    Thanks,
    Gagan

    Anyone ?

  • How to change default value in "Project file" dialog

    I'm new to Labview, and I've encountered an example with a dialog that allows to define a path to a file.  If I open the properties on the block diagram of this block the name of the block appears to be "Path Properties: Project file:"   The default value points to a different place than where the file installed and the VI won't run untiI I change the path.  If I save and open the file, it doesn't remember the change.  When the vi is running I can right click the text and there is an option to reinitialize to default.  I've rooted around all over the place and can't find where this can be set or changed.  How do I change this? 

    On the front panel, change the control to the desired value.
    Now, right click on the control, select Data Operations and Make Current Value Default.
    -Matt Bradley
    ************ kudos always appreciated, but only when deserved **************************

  • .csv file Vs .txt file Content conversion sender file channel

    Hi Experts,
                     I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
    when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
    Thanks
    Deepak

    Hi,
    Use the following parameters for Sender file channel in case of reading .csv file
    Recordset Structure.fieldSeparator -
    Recordset Structure.endSeparator -
    'nl'
    Recordset Structure.fieldNames -
    provide field names separated with ,
    Regards
    Seshagiri

  • Change default value for no of records in T code KSB1

    Hi,
    I am trying change the default value (no of records) in T code KSB1.
    Is it defaulted progarmatically or through some configuration?
    Any help is appreciated.
    Thanks
    Govind

    Thank you all for immediate reply.
    I know that I can create a variant or change the value by hitting more settings.
    I have also seen in the program and its hard coded there as 5000.
    We need that value to be defulted as 10000.So my question is that can we change via configuration or it can be done only progamatically?
    Thanks
    Govind

  • Change default value (200) of Max No of Hits for selection screen in WAD

    How do i change the default value of Maximum Number of Hits from 200 to 1000 for selection screen's find box in Web Application Designer .
    Thanks in Advance
    Points will be surely Rewarded

    Dear Hammad,
    Please refer to the wiki created by me,
    http://wiki.sdn.sap.com/wiki/display/BI/Information+on+the+user+setting+for+the+selector+dialog
    Regards,
    Arvind

Maybe you are looking for