Overwrite specific value on .txt file

Hello
Does any one know how to overwrite specific values in a .txt file?
here's and example of what i need:
I just want to replace the numbers 1 and 2 every time I run my code, the rest remain the same.
this is the part of the code Im using
thanks!

Hello Tokighy,
What Bryan mentions is a good approach, you can also check the Write to Text File and Read from Text File.vi in the Find Examples section in LabVIEW, you can take the output from the Read from Text File (having as input your .txt file) and then use either Replace Substring or Search and Replace String functions from the String palette.
http://zone.ni.com/reference/en-XX/help/371361H-01/glang/search_and_replace_string/
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/replace_substring/
Hope you find this information useful!
Regards, 

Similar Messages

  • Read Specific value/Search Into file

    Hi i need a java code which read specific value from a file.
    Example:
    I have a text file named data.txt
    it contain :
    Customer Name :Sarwar
    Customer Id : 001
    Product Price :2000
    now how can i take values 001 and 2000 from the file data.txt and save them in a another text file named new_data.txt ?
    Can any one help me?

    Search Google for 'java file read'. Wanna write to a file? Search for 'java file write'. Ain't Google awesome?
    If you haven't already done so, I suggest you search www.amazon.com for a beginner book on Java that has good reviews. Its much more efficient to read a book on Java than spend countless hours trying to learn it through code examples found on the internet.

  • Reading values from txt file

    Hi,
    I was hoping someone could help me. I am trying to read these values
    3.182, 0.02734, 1126.0, 4.998E-4, 0.01581, 11.0, -150.3, 10.46, 3.735, 0.8474, -0.4854, 0.7866, 1.475, 0.9439, 0.769, 0.1846, 0.07678, -0.9491, -1.236, -0.9908, 0.5265, -0.27, 0.3569, -0.09167, 0.1295, -0.04507, 0.1029, -0.03005, 0.0, 0.03752, 0.001151, 0.2935, 74.84, 19080.0, 6.086, etcfrom a txt file. I have done some coding on it but dont seem to be getting the desired results. I want to take these values and put them in a 2D array.. but its not doing it. Can you see any mistakes i have done please ?
    public double[][] readFile(){
              double[][] dArray = new double[164][37];
              int a  = 0;
            int b = 0; 
                    try
                    {  FileReader fin = new FileReader("myFile.txt");
                               BufferedReader in = new BufferedReader(fin);
                                 String line;
                                 while((line = in.readLine()) != null){
                                String[] value = line.split(", ");
                                for (int x=0; x<value.length ; x++){
                                     System.out.println("a:  "+a+" || b: "+b);
                                         if (b == 37) {
                                                a = a++; 
                                            } else
                                                dArray[a] = Double.parseDouble(value[x]);
                             System.out.println("value: "+dArray[1][1]);
                             b++;

    Yes thats because its part of larger code.. it is just a method within my code.
    but your right about the catch but so yeah sorry i missed it when i copied pasted. I ve also added you a main method.
    public double[][] readFile(){
              double[][] dArray = new double[164][37];
              int a  = 0;
            int b = 0; 
                    try
                    {  FileReader fin = new FileReader("myFile.txt");
                               BufferedReader in = new BufferedReader(fin);
                                 String line;
                                 while((line = in.readLine()) != null){
                                String[] value = line.split(", ");
                                for (int x=0; x<value.length ; x++){
                                     System.out.println("a:  "+a+" || b: "+b);
                                         if (b == 37) {
                                                a = a++; 
                                            } else
                                                dArray[a] = Double.parseDouble(value[x]);
                             System.out.println("value: "+dArray[1][1]);
                             b++;
              catch (IOException e){}
              return dArray;     
    public static void main(String[] args) {
              new Extract();
              }/code]

  • Batch File to look at specific location in txt files

    Is there a way to have at batch file look at a specific line and location from a text file and pull it for use in the batch file?  For example, line 1 of sample.txt position ~15,8.
    I'm currently using the Find command(FIND /C "" *.TXT) but would like to be more specific in search.

    From a command line prompt, type 'help set' and look at environment variable expansion. Read the part that says "May also specify substrings for an expansion." It shows an example that uses ~10,5 to start at offset 10 and get the next 5 characters. Of course,
    this means that you will need to you will need to loop through each line. Use the FOR command; type 'help for' and start reading from "Some examples might help." It shows how you can parse a text file:
    FOR /F %%i IN (myfile.txt) do @echo %%i
    In a batch file, use two percent signs. At the command line, use one percent sign. 
    After the 'do' in the FOR command, you can use a CALL :Someprocedurename %%i, which would pass the line from the file into a sub and you can use the SET command to parse it.
    The Help mentions Command Extensions. At command prompt, type 'help setlocal' and read about ENABLEEXTENSIONS. At the bottom of the Help, they give you an example of how to add this to a batch file. You will need this to use the SET command to parse lines
    from the file.
    If you want to save the output, use the redirects, > or >> (create output file or append to output, respectively). Use the same for HELP output: help for > for-help.txt. In your line parser, you would do something more like this:
    [code]
    :ParseLine
    @echo %1 >> outputfile.txt
    exit /b
    GoTo :Eof
    [end code]
    To exit a sub, use either exit /b or goto :eof. Exit will allow you to return a value or error code. Goto :eof simply goes to end of file and returns control to the caller (in our case the FOR command). Of course, you can type 'help exit' to learn more.
    Outside of a subroutine, exit will end the batch file script and return to command prompt. This can be useful when you call this batch file from another script, but if you are starting it from Windows you may want to keep the command prompt open to show user
    the results or simply tell them to look at the output file.
    You can find good samples on Rob Van Der Woude's website.
    http://www.robvanderwoude.com/batchstart.php
    A major geek...

  • How to create folder names based on Excel values or Txt files?

    Hi there,
    I often need to create large numbers of folders based on names I have saved in an Excel spreadsheet. I know in windows there is a way to create a macro within excel that automatically generates folder names based on cell values.
    I was therefore wondering how to do the same on a Mac operating system. The main thing is to find a way to automate the process. I understand this may involve copying the values to a text file.
    Below is an example of the names I need to create folders for (copied from the excel spreadsheet):
    Wash Bowl Small 600
    Deck Mounted Wash Bowl 500
    Wash Basin - 866 - 2 Shelves
    Wash Bowl Large 800
    Built-In Wash Basin With 1-Taphole
    Deck Mounted Wash Bowl 625
    Would really appreciate a simple step by step approach to an explanation. As my understanding of using Automator, Apple Script, Terminal, etc, is extremely basic.
    Thanks and Best Wishes,
    Graham

    Hi Niel,
    Thanks again for another superb response. I have another question. Is it possible to automatically generate sub-folders along with the folder.
    For example:
    Folder                                                Subfolder
    Wash Bowl Small 600          >            2D CAD
                                                               3D CAD
                                                               BIM
                                                               Images
                                                               Brochures
                                                               Specifications
                                                               Technical
                                                               Case Studies
                                                               Operations
    Deck Mounted Wash Bowl 500    >   2D CAD
                                                              3D CAD
                                                              BIM
                                                              Images
                                                              Brochures
                                                              Specifications
                                                              Technical
                                                              Case Studies
                                                              Operations
    Above shows the 9 generic sub-folders I need to create within each folder that is generated.
    Best Wishes,
    Graham

  • Replace environment specific values in xsl file.

    My xml has source and target, whose values depend on the enviroment. I have used "Set Text" to assign the values for these elements. I am using SOA 11g, bpel process.
    But since these are environment specific, I need to change them when porting to different env. I read that "SOAConfigPlan" wouldn't
    work on xslt.
    How can I achieve this?
    Edited by: user10367892 on Oct 8, 2010 3:45 PM

    My xml has source and target, whose values depend on the enviroment. I have used "Set Text" to assign the values for these elements. I am using SOA 11g, bpel process.
    But since these are environment specific, I need to change them when porting to different env. I read that "SOAConfigPlan" wouldn't
    work on xslt.
    How can I achieve this?
    Edited by: user10367892 on Oct 8, 2010 3:45 PM

  • How to set specific value of attached file in CRM 2013

    Hi,
    I have a requirement when I attach a file in notes it should has some value in currency. how to assign value for each attachment file?

    Hello,
    That's not possible.
    In case you want to implement it I would suggest to create additional entity, store value in currency inside, add reference to your initial record and store that data in this way.
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Change value in specific address in hex file

    Hi all : I have hex file that I want to change specific values in some specific address , how can I do that in labview  Attach see file please for hex file   Please see another attach file which explain what I want in steps  Thanks a lot Wisam
    Attachments:
    Problem.doc ‏33 KB
    TRXS-860.zip ‏32 KB

    What you have is just a plain text file containing hexadecimal formatted text.
    Do you know the offset of the data you need to change? Is the "address" a variable? Why don't you simply read your file as plain text, use search string to find ":1064F", then increment the location by the desired offset to get the locations you need to overwrite as described by smercurio.
    How often does this need to happen? Is the file just 32k? For simplicity, you might just want to do the changes in memory and overwrite the entire file.
    LabVIEW Champion . Do more with less code and in less time .

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • How to generate a specific size txt file?

    Hey guys,
    I'm working with a system wich reads txt files. These files have to be 100kb of size.
    Is it possible to generate specific size txt files in abap? I'm trying to do this but i cant get exactly 100kb.
    Best regards

    [Character Streams|http://java.sun.com/docs/books/tutorial/essential/io/charstreams.html]

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

  • How to save a value in a .txt n retrive back the exact value from the file?

    Well I have a number. Let's say 600. I need to save this value in a .txt file so that I can retrive this value. I tried using the below source code. It can be executed but I'll get num 49 everytime I execute it even though the value in my .txt is 600.
    try {
                   File inputFile = new File("Lt.txt");
                   File outputFile = new File("outagain.txt");
    FileReader in = new FileReader("Lt.txt");
    FileWriter out = new FileWriter(outputFile);
    int c;
              c = in.read();
              in.close();
    System.out.print("\nggggggggg"+c);
    in.close();
                   } catch (IOException ex) {
                   System.out.println("IOException:"+ex.toString());

    Thank you. I execute the program below. I can now retrive the data from the Lt.txt. But the value is limited to 3 digits. For example, the content of my file is 777888.
    When I run the program, I only get 777. How can I retrive the whole exact number?               
    import java.io.*;
                   class Test {     
                   public static void main(String args[]) {          
                   try {               
                   File inputFile = new File("Lt.txt");               
                   File outputFile = new File("outagain.txt");                    
                   FileReader in = new FileReader("Lt.txt");               
                   FileWriter out = new FileWriter(outputFile);               
                   char[] tmp = new char[3];               
                   int cnt = in.read(tmp);                              
                   System.out.print("\nRead: ");               
                   for (int i = 0; i < cnt; i++) {                    
                   System.out.print(tmp);               }               
                   System.out.println(" ");               
                   in.close();          }
                   catch (IOException ex) {               
                   System.out.println("IOException:"+ex.toString());          }     }}

  • File with list of .txt files in a specific directory

    Hi,
    I need to create a file with list of .txt files in a specific directory (actually the command will be used by a java application).
    I am using the below command,
    ls home/apptmt/park/*.txt > home/apptmt/park/reportgen.txt
    but this command prints output as
    home/apptmt/park/report1.txt
    home/apptmt/park/report2.txt
    home/apptmt/park/report3.txt
    I need only the files in reportgen.txt file, like
    report1.txt
    report2.txt
    report3.txt
    any one help me on the command I should use to get this output?
    Thanks
    MT

    Thank you Dude!
    I just found out that
    cd /home/apptmt/park;ls *.txt > reportgen.lst works for me...
    I will try this one as well... thank you very much...
    MT

  • Writing the ASCII value of a character found in a .txt file

    I have a program that reads in a file and outputs certain characters to a new smaller file. The program works fine (thanks to some forum help) but I now need to print the ASCII value of the characters that are written to the file.
    The problem I'm having (besides writing the ascii value of the char) is that the Unix .txt file has some weird properties. When I run the program on a .txt test file that I created with spaces in it, the program ignores the space characters.
    Yet, when I run the program on the Unix file it wites the 'spaces' to the output file. That is why I want to write/print the ASCII value of the "blank "character in the Unix .txt file.
    I already serached the forum and did a Google search for Char to ASCII conversion but I didn't find anything.
    Thanks,
    LS6v
    Here's the code and the clips of the ouput files:
    package source;
    import javax.swing.*;
    import java.io.*;
    public class Scanner4
         public static void main(String[] args)
              getContents();
              System.exit(0);
         public static void getContents()
              char charArray[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
                                         'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
                                           '0','1','2','3','4','5','6','7','8','9','$','.', '#', '-', '/', '*', '&', '(', ')',' '};
              String Chars = null;
              String lineSep = System.getProperty("line.separator");
              int iterator = 0;
              int i = 0;
              int charNum = 1;
              int lineCount = 1;          
             // StringBuffer contents = new StringBuffer();
             //declared here only to make visible to finally clause
             BufferedReader input = null;
             BufferedWriter out = null;
             try {
                         //use buffering
                         //this implementation reads one line at a time
                         input = new BufferedReader( new FileReader( "C:\\testFile\\test1.txt" ));
                         out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\test.txt" ));
                         String line = null;
                    out.write( "Character\tLine Number\tCharacter Number" + lineSep ); 
                              while (( line = input.readLine()) != null)
                               //contents.append(System.getProperty("line.separator"));
                               i = 0;
                               charNum = 1;
                               iterator = 0;
                              while( i < line.length() )
                                             for( int count = 0; count < charArray.length; count++)
                                                  if( (charArray[count] != line.charAt(iterator)) && (count+1 == charArray.length) )
                                                       out.write( "[" + line.charAt(iterator) + "]\t\t" + "[" + lineCount + "]\t\t" + "[" + charNum + "]" + lineSep);
                                                  if( charArray[count] == line.charAt(iterator) )
                                                       break;
                                        charNum +=1;
                                        iterator +=1;
                                        i++;                               
                                 lineCount +=1;
             catch (FileNotFoundException ex) {ex.printStackTrace();     System.out.println("File not found.");}          
                 catch (IOException ex){ex.printStackTrace();               System.out.println("IO Error.");}
             finally
                           try{
                                 if (input!= null){
                               //flush and close both "input" and its underlying FileReader
                                 input.close();
                                 out.close();
               catch (IOException ex){ex.printStackTrace();  System.out.println("IO Error #2.");}
    My created .txt file:
    1. a!asdsad
    2. @
    3. #
    4. $
    5. %sdfsdf
    6. ^
    7. &
    8. *
    9. (
    10. )
    11. _
    12. +sdfsdfsdf
    13. -
    14. =
    15. ~
    16. `
    17. dfgdfg;
    18. :
    19. '
    20. "fghfghf
    21. ,
    22. dfgdfg<
    23. .
    24. >fghfghfg
    25. /
    26. gggggggggggggggggggggggg?
    27. a
    Output for my .txt file:
    Character     Line Number     Character Number
    [!]          [1]          [5]
    [@]          [2]          [4]
    [%]          [5]          [4]
    [^]          [6]          [4]
    [_]          [11]          [5]
    [+]          [12]          [5]
    [=]          [14]          [5]
    [~]          [15]          [5]
    [`]          [16]          [5]
    [;]          [17]          [11]
    [:]          [18]          [5]
    [']          [19]          [5]
    ["]          [20]          [5]
    [,]          [21]          [5]
    [<]          [22]          [11]
    [>]          [24]          [5]
    [?]          [26]          [29]************************************************************************
    Output generated after reading the .txt file from the unix box:
    Character     Line Number     Character Number
    [ ]          [1]          [17]
    [ ]          [1]          [18]
    [ ]          [1]          [19]
    [ ]          [1]          [6530]
    [ ]          [2]          [2041]
    [']          [29]          [1834]
    [']          [29]          [2023]
    [']          [30]          [1834]
    [']          [30]          [2023]
    [']          [30]          [2066]
    [']          [47]          [2066]
    [']          [67]          [2067]
    [']          [77]          [2066]
    [+]          [80]          [28]

    Thanks I didn't even think to try and cast it to an int...
    The tool I'm using to create my .txt in windows is Notepad.
    I wrote a program to simply copy the original (3GB) Unix file and terminated it early so I could see what was there. What I found was some text and symbols and a lot of space between brief bursts of text. I can't really copy and paste an example because the amount of space is too large, it's basically a 3GB unformatted .txt file...
    Unix file was created on: unknown
    It sounds like the .txt file that I copied from the Unix box was formatted differently. But I thought that the formatting had more to do with end of line issues, not blank space between characters. Because a blank space should be seen by my program and ignored...
    Here's the ASCII value of the "blank" spaces:
    Character     Line Number     Character Number
    [ ]          [1]          [17]     Ascii Value: [0]
    [ ]          [1]          [18]     Ascii Value: [0]
    [']          [868]          [2066]     Ascii Value: [39]
    [,]          [877]          [186]     Ascii Value: [44]
    [,]          [877]          [276]     Ascii Value: [44]
    Also, the Ascii value printed for the blank spaces looks like the number zero here but it looks like it has strange points on the bottom of it in my output file. It looks like the extended ASCII character 234 &#937;

  • Read a txt file, display a table of values, select a value to set min value for DAQMX

    Hello everyone, I am having trouble with the following data importing. I want to do the following:
    Open a txt file, have it be imported as a table. Allow the user in the GUI to select a value on the 2nd column, set that value as either min or max for a daqmx analog output. I'll attach the .txt file being used. I can add the code but I was basically using the read from text.vi example with no luck.
    Attachments:
    090414-200-800-16x.txt ‏1 KB

    Thank you all, I have set up this input but I have a couple more questions. First now that I have the ability to have a mouse click to set a value, is it possible to have two events, such that the first sets a certain value and the second retains a different one?
    In addition (im not sure if this would be ok to post here but for the sake of clarity and decluttering the forum I shall post it here) is it possible to switch from a constant voltage mode (in DAQMX analog output) to a waveform mode ( attacthed the binary waveform) all while maintaining a constant min value (untill updated from the table by user, which is also attached).
    I have attachted a vi (Labview version 8.2) that I threw together today.
    Thank you all,
    DB
    Attachments:
    calib.csv ‏3 KB
    Example.vi ‏157 KB

Maybe you are looking for