Strange character appear when writing to text file.

Hello, I am facing some problem when I read some data from and binary file (.dat) and then saving them into text file.
When I convert those data into string and then write to a text file. Some strange characters were found in the file when I opened it with excel. Could anybody tell me how these strange characters( ) are generated and how to eliminate them?
The VI , .dat file and the text file are attached as below.(use the "open file" in the menu to open .dat file and then use the "export file" in menu to export to text file)
Thank you very much......
The .dat and text file are attached in the next post.
Attachments:
test2.xls ‏1 KB
VPSDataViewer_vac_temp2.vi ‏111 KB
Sel_File.vi ‏20 KB

raw data file.
Thank you very much.
the vpsxxxx.ini is the raw data(file with .dat extension cannot be attached).
viewer.vi is the menu file. (please change the file name to viewer.rtm, also for attaching file purpose. ^_^)
Attachments:
VPS20070107_152605.ini ‏2 KB
Viewer.vi ‏1 KB

Similar Messages

  • Controlling the share permission when writing a text file

    I have several application that writes a delimited text file to a file share.  Another application, not a LabVIEW application then reads the delimited text file.  When my application is creating and/or writing to the delimited text file, is there a way to manipulate the permissions so that no other application can read the file at the same time I'm writing to the file?  I can do this in Visual Basic via the FileShare (http://msdn.microsoft.com/en-us/library/system.io.fileshare(v=vs.110).aspx) option when creating filestream, but I don't see this option in LabVIEW.  Thanks.
    Solved!
    Go to Solution.

    Nevermind.  I believe this can be accomplished with the "Deny Access" function.

  • Characters y and b appear when reading a text file

    The vi shown in the picture opens a text file from hard drive with "Open/Create/Replace File" and with "Read from Spreadsheet File".
    Then the vi displays the text in the respective indicators. 
    In both indicators, there is a y and b that appear as the very first first characters.
    It's not exactly a y and b. The y has two dots over it and the stem of the b hangs low, a non-English script. 
    In Word and Notepad these charcters don't show up. The first character is a zero as I originally wrote. 
    The text file was originally created in Excel and then saved as unicode text. 
    From whence do these funky letters come? and how do I get them to leave? 
    Also, it looks like the text in both indicators is adding a blank line after each line. That doesn't show up Notepad or Word either. 
     

    Carmen92126 wrote:
    The text file was originally created in Excel and then saved as unicode text.
    There's your problem: unicode.  You might want to check out this quick thread: Config file "byte order mark"
    Yes, by saving as Unicode, you have a couple of extra bytes that most text editor know to ignore.  But LabVIEW just gives you the raw data.

  • Errors when writing metadata to files on Windows Server

    Good day!
    I have an iMac running OSX 10.9 (Maverick) and Lightroom 5.2.
    My catalog is on the local iMac drive, and the images are on SMB shared drive (handled by Windows 2012 server).
    I decided to do the final layout of my album using InDesign, and for that I needed to access to images using Bridge. So selected all the images (the rated once...) and issue a Metadata/Save command.
    The system came back with errors on many of the files (such as Photos are read only, and unknown errors).
    Retrying to save the metadata on image that was flagged with an error usually (but not always) worked.
    I tried to select save the metadata for few (6) images in a time, many times it was ok, but sometimes, one or two of them failed (and retrying again usually solved the problem).
    It looks to me like a timing related issue.
    Any ideas?
    (After spending about an hour on this, I have exported the images to my local drive...). In general I don't have similar problems with other apps.
    Any ideas?
    Yuval

    I Yuval
    I'm experiencing more or less the same behavior (see Read-only error when writing metadata to file over network (Synology DS1315+ using AFP) ). For me however, the problem is more pronounced if I use the AFP protocol and is better (I think as you described) if I use SMB (all done on a Synology DS1315+). With SMB it most often works but in very rare cases I also get the "read only" message!
    Do you have solution to this? Or are you stuck as I am?
    Cheers, Chris

  • Error when Writing Metadata to Files in Bridge (Mac) but not in Bridge (PC)

    We get an error when writing metadata to files in Bridge (Mac) but not in Bridge (PC). In the same drive and folder, the PC can successfully write a keyword to a file on the PC, where the Mac returns an error. I have researched this at the Adobe Knowledgebase, but their answer seemed to indicate it was a global issue, and we don't see that behavior on the PC.
    The client is a Mac of course, and the server volume is a Windows share volume. The Mac is bound to AD, and the domain\username and username formats have both been tried when logging in, but you receive the error in both.
    Any help would be appreciated.
    Thanks!
    Rich Oliver

    Hi, I'm having the same problem using FreeNAS (which uses Samba and Netatalk in the backend), but I tried with both AFP and SMB on Mavericks and Yosemite, I still have the same issue.  I think it might be a timing issue with how lightroom interact with a slower write delay using network shares.  I suggest you also chime into this thread:  Lightroom 5 can't write metadata to DNG files   I really hope this is resolved as this is impacting my productivity as I moved my workflow to my Macbook with a shared NAS.

  • Writing plain-text files in UTF-8 encoding under MacOSX

    Hello forums,
    I've run into some problem writing text-files under MacOSX. I've tried several methods of writing, the current one I'm using is as follows;
    private void stringToFile(File file, String string) throws IOException
        OutputStream fout = new FileOutputStream(file);
        OutputStream bout = new BufferedOutputStream(fout);
        OutputStreamWriter out = new OutputStreamWriter(bout, "UTF-8");
        out.write(string);
        out.close();
    }However, when I open the file letters other than A-Z appear corrupted in Text-Edit, though in BBEdit the file is identified as UTF-8 without BOM. (still corrupt.)
    The application uses some components I am not so familiar with, which makes trouble-shooting less of a breeze.
    It is a spring-framework web-app, and the string to be written is passed to the application through a HTTPClient.
    The string itself is constructed by
    MultipartFile content = multipartRequest.getFile(CONTENT_PARAM_NAME);
    String contentStr = (content != null) ? new String(content.getBytes(), "UTF-8") : null;and is created client-side by
    new FilePart("content", new ByteArrayPartSource("content", strContent.getBytes()), "", "UTF-8")I would appreciate any clues you have hinting towards a solution.
    I have tried to isolate parts by f.ex. writing a fixed string (which still would not work properly, which leads me to think that the HTTPClient/Spring part is not to blaim).
    Message was edited by:
    joakim.back

    Good idea,
    I'm now ensuring that the hashcode of the clientside and serverside String match, supply the bytes as UTF-8, and write it properly with
    private void stringToFile(File file, String string) throws IOException
        BufferedWriter out = new BufferedWriter(
                    new OutputStreamWriter(
                                new FileOutputStream(file), "UTF8"));
        out.write(string);
        out.close();
    }I adjusted the stringToFile earlier, so I'm not sure wether the old code still works.
    TextEdit under MacOSX still view the files as corrupt, but BBEdit and EditPlus under windows view the result fine.
    Lessons learned? Beeing very careful about identifying sub-tasks and dealing with them separately.
    ..ofcourse, my job is not done since the damned applescripts dealing with the output treats the files as TextEdit do, but that's a task for tomorrow.
    Thank you for your assistance!

  • Need Help: UTL_FILE Reading and Writing to Text File

    Hello I am using version 11gR2 using the UTL_FILE function to read from a text file then write the lines where it begins with word 'foo' and end my writing to the text file where the line with the word 'ZEN' is found. Now, I have several lines that begin with 'foo' and 'ZEN' Which make for one full paragraph, and in this paragraph there's a line that begins with 'DE4.2'. Therefore,
    I need to write all paragraphs that include the line 'DE4.2' in their beginning and ending lines 'foo' and 'ZEN'
    FOR EXAMPLE:
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    I am only interested in writing the first paragraph tha includes line DE4.2 in one of ther lines Not the Second paragraph that does not include the 'DE4.2'
    Here's my code thus far:
    CREATE OR REPLACE PROCEDURE my_app2 IS
    infile utl_file.file_type;
    outfile utl_file.file_type;
    buffer VARCHAR2(30000);
    b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
    BEGIN
    -- open a file to read
    infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
    -- open a file to write
    outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
    -- check file is opened
    IF utl_file.is_open(infile)
    THEN
    -- loop lines in the file
    LOOP
    BEGIN
    utl_file.get_line(infile, buffer);
         --BEGINPOINT APPLICATION
    IF buffer LIKE 'foo%' THEN
              b_paragraph_started := TRUE;          
         END IF;
         --LOOK FOR GRADS APPS
              IF b_paragraph_started AND buffer LIKE '%DE4%' THEN
              utl_file.put_line(outfile,buffer, FALSE);
    END IF;
         --ENDPOINT APPLICATION      
              IF buffer LIKE 'ZEN%' THEN
         b_paragraph_started := FALSE;
              END IF;
    utl_file.fflush(outfile);
    EXCEPTION
    WHEN no_data_found THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    utl_file.fclose(infile);
    utl_file.fclose(outfile);
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20099, 'Unknown UTL_FILE Error');
    END my_app2;
    When I run this code I only get one line: DE4.2 I AM MISSING THE ENTIRE PARAGRAPH
    PLEASE ADVISE...

    Hi,
    Look at where you're calling utl_file.put_line. The only time you're writing anything is immediately after you find the the key word 'DE4', and then you're writing just that line.
    You need to store the entire paragraph, and when you reach the end of the paragraph, write the whole thing only if you found the key word, like this:
    CREATE OR REPLACE PROCEDURE my_app2 IS
        TYPE  line_collection  
        IS       TABLE OF VARCHAR2 (30000)
               INDEX BY BINARY_INTEGER;
        infile               utl_file.file_type;
        outfile                      utl_file.file_type;
        input_paragraph          line_collection;
        input_paragraph_cnt          PLS_INTEGER     := 0;          -- Number of lines stored in input_paragraph
        b_paragraph_started      BOOLEAN      := FALSE;     -- flag to indicate that required paragraph is started
        found_key_word          BOOLEAN          := FALSE;     -- Does this paragraph contain the magic word?
    BEGIN
        -- open a file to read
        infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
        -- open a file to write
        outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
        -- check file is opened
        IF utl_file.is_open(infile)
        THEN
         -- loop lines in the file
         LOOP
             BEGIN
              input_paragraph_cnt := input_paragraph_cnt + 1;
                 utl_file.get_line (infile, input_paragraph (input_paragraph_cnt));
              --BEGINPOINT APPLICATION
              IF LOWER (input_paragraph (input_paragraph_cnt)) LIKE 'foo%' THEN
                  b_paragraph_started := TRUE;
              END IF;
              --LOOK FOR GRADS APPS
              IF b_paragraph_started
              THEN
                  IF  input_paragraph (input_paragraph_cnt) LIKE '%DE4%'
                  THEN
                   found_key_word := TRUE;
                  END IF;
                  --ENDPOINT APPLICATION
                  IF input_paragraph (input_paragraph_cnt) LIKE 'ZEN%' THEN
                      b_paragraph_started := FALSE;
                   IF  found_key_word
                   THEN
                       FOR j IN 1 .. input_paragraph_cnt
                       LOOP
                           utl_file.put_line (outfile, input_paragraph (j), FALSE);
                       END LOOP;
                   END IF;
                   found_key_word := FALSE;
                   input_paragraph_cnt := 0;
                  END IF;
              ELSE     -- paragraph is not started
                  input_paragraph_cnt := 0;
              END IF;
              EXCEPTION
                  WHEN no_data_found THEN
                   EXIT;
              END;
          END LOOP;
        END IF;
        utl_file.fclose (infile);
        utl_file.fclose (outfile);
    --EXCEPTION
    --    WHEN OTHERS THEN
    --        raise_application_error(-20099, 'Unknown UTL_FILE Error');
    END my_app2;
    SHOW ERRORSIf you don't have an EXCEPTION section, the default error handling will print an error message, spcifying exactly what the error was, and which line of your code caused the error. By using your own EXCEPTION section, you're hiding all that information. I admit, the error messages aren't always as informative as we'd like, but they're never less informative than "Unknown UTL_FILE Error'. Don't use your own EXCEPTION handling unless you can improve on the default.
    Remember that anything inside quotes is case-sensitive. If your file contains upper-case 'FOO', then it won't be "LIKE 'foo%' ".
    Edited by: Frank Kulash on Dec 7, 2011 1:35 PM
    You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as your code) on this site, type these 6 characters:
    \{code}
    (small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.

  • Strange character at the end of some file/folder names

    I'm getting a strange character at the end of some of my file and folder names. This is it:  When I enlarge it, it says "private use" on the top and bottom, "E000" on the left side, and "F8FF" on the right side. It acts like a character within the font, but I'm not sure why it's there.
    In case that didn't work, I'm going to try to attach or embed a gif of the character. I'm not sure if it will work or not.
    Also, some longer file names seem to be dleeting some of the letters and are inserting a pound sign and a few numbers (e.g. #34) in place of the letters.
    What's going on?
    As usual, thanks in advance,
    Lloyd

    I thought that might be it...at first. Then I found some file names that were nowhere near 32 characters long whose names were truncated.
    It's not a huge problem, except in QuarkXPress when I collect the files for output and I have to reconnect to the ones whose names have been changed (to protect the innocent, I suppose).
    Thanks for the input mark.
    Lloyd

  • Why do I get a NI-488 error massage when writing into a file and at the same time copiyng this file with a backup softwarre like Easy2Sync?

    I have a small LabVIEW program which writes random numbers very fast into a ASCII-file. I want that file to be copied to a new position every 10 min. Therefor I use a backup/synchronisation software which is doing a copy operation every 10 min. It works fine a certian amount of time and after a while I get either an LabVIEW error (LabVIEW: Fiel already open: NI-488 Comand requieres GPIB Controller to be System controller) or an backup-software error (couldn´t open file...whatever). I´m guessing, it has something to do with file-access but I don´t know why?!? If I run the LabVIEW program and I copy and paste the random-number-file with the windows explorer very fast (pressing ctrl+v rapidly) while LabVIEW is still writing into this file, no error appears. Can sombody help me?
    LabVIEW 2011

    Hi Serdj,
    you don't get a GPIB error, the error number has just 2 different explanations...
    Well, you have two programs accessing the same file. One program just wants to make a copy, the other (LabView) is trying to write to the file. When copying a file that is written to you get inconsistent results! That's why one of both programs is complaining an error...
    You can't have write and read access at the same time! (But you can have more than one read access at the same time...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Timestamp when saved in text file and reloaded does not give correct dates

    Hello
    I am struggling with time stamp. I have almost corrected the problem but it is not as good as I expect it to be.
    I have data in the main vi which logs into text file with time stamp for everyday results logs.
    I then pull all this data to display on waveform graph with the performance data on y axis and time stamp on x axis.
    I convert the time stamp data from string back to time stamp using scan from function in string pallette. When I run the waveform graph vi. The time stamp data is not correct one. I see year values beginning 1974 etc. I change these values to 2011 and the correct dates and then could see the accurate logged data from data logger but I would like to have the starting date in my logged file the left most date on x-axis. I try modify dates in display format section of waveform graph but I think it gives the values in seconds which doesn't make much sense to me. Is it possible to automatically set the starting value of the graph as the first date in the logged file? I am new with using time stamps. Any feedback will be appreciated.
    Kind Regards
    Austin

    Hi Austin,
    "Is it possible to automatically set the starting value of the graph as the first date in the logged file?"
    Sure: Use autoscaling, format x-axis as time and use waveforms with correct t0 value...
    For all other questions you should attach a VI to show your current state of programming!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Recording data at particular iterations and writing to text file

    Hi all,
    this is my first time posting on the NI boards. I'm running into a couple problems I can't seem to figure out how to fix.
    I'm collecting data using a LabJack U3-HV daq. I've taken one of the out-of-the-box streaming functions that comes with the LabJack and modified it for my purposes. I am attempting to simply save the recorded data to a text file in columns, one for each of my 4 analog strain gauge inputs, and one for time. For some reason when the 'write to measurement file.vi' executes it is puts everything in rows, and the data is unintelligible.
    The 2nd issue I am facing, which is not currently visible in my vi, is that I am running my test for 60,000 cycles, which generates a ton of data. I'm measuring creep/fatigue with my strain gages so I don't need data for every cycle, probably for the first 1000, then the 2k, 4k, 6k, 8k, 10k, 20k, etc. More of an exponential curve. I tried using some max/min functions and then matching the 'write to measurement file.vi' with a case structure that only permitted it to write for particular iterations, but can't seem to get it to work.
    Thanks in advance for any help!
    Attachments:
    3.5LCP strain gages v2.vi ‏66 KB

    Hey carfreak,
    I've attached a screenshot that shows three different ways of trying to keep track of incrementing data and/or time in a while loop. The top loop just shows a program that demonstrates how shift registers can be used to transfer data between loops. This code just writes the iteration value to the array using the Build Array function.
    The first loop counts iterations in an extremely round-about way... the second shows that really you can just build the array directly using the iteration count (the blue "i" in the while loop is just an iteration counter).
    The final loop shows how you can use a time stamp to actually keep track of the relative time when a loop executes.
    Please note that these three should not actually be implemented together in one VI. I just built them in one BD for simplicity's sake for the screenshot. As described above, the producer-consumer architecture should be used when running parallel loops.
    Does that answer your question?
    Chris G
    Applications Engineer
    National Instruments
    Attachments:
    While Loops and Iterations.JPG ‏83 KB

  • Keeping edits when updating linked text file

    My main use of indesign is laying out text files that are created in work. They need be linked, becuase the authors of these files are constantly updating them.
    I place the file, and then format the tables to make them look better, and also sometimes add images into the text
    However, when the original changes, and I update the text box with the new text, all the formatting i've added is lost.
    This must be a common problem with linked files, so, if anyone has any recommendations please let me know. Most importantly would be a way to automatically apply / keep the stlying for the tables.

    You can try exporting to RTF and relinking those files back to your
    document and letting your writers work on those, but InCopy is far
    better solution.
    Why not download the demo and show them how much time they'll save with
    it? Or bring in a consultant who can demonstrate it. I've found that
    doing a demo can really open some eyes to the possibilities.
    Bob

  • Can I make a special character appear when typing? (Part 2)

    Hi there
    I am now working on an extended version of the issue describes in this thread: http://forums.adobe.com/message/3147856#3147856
    The new field should hold digits in the format 9999-99999-99999-99, and I would like the hyphens to appear automatically when typing. I tried to modify the script I used before, but I can't get it to work properly. Can someone tell me, what I'm doing wrong?
    My modified script looks this way:
    if (xfa.event.change.match(/[0-9\-]/) == null)
        xfa.event.change = "";
    if (xfa.event.change == "-" && xfa.event.selEnd != 4)
        xfa.event.change = "";
    if (xfa.event.change.match(/[0-9]/) != null &&
        xfa.event.newText.length == 5 &&
        xfa.event.selEnd == 4)
    if (xfa.event.change == "-" && xfa.event.selEnd != 10)
        xfa.event.change = "";
    if (xfa.event.change.match(/[0-9]/) != null &&
        xfa.event.newText.length == 11 &&
        xfa.event.selEnd == 10)
    if (xfa.event.change == "-" && xfa.event.selEnd != 16)
        xfa.event.change = "";
    if (xfa.event.change.match(/[0-9]/) != null &&
        xfa.event.newText.length == 17 &&
        xfa.event.selEnd == 16)
        xfa.event.change = "-" + xfa.event.change; } 
        var vMax = 16; if (xfa.event.newText.indexOf("-") != -3)
        vMax = 19;
    But it only makes the hyphen at 17th character appear automatically.
    I hope to hear from you.
    Kirstine

    I found the answer here:
    http://forums.adobe.com/message/2766333#2766333

  • How do I remove the blue bar which appears when I make text tracking changes in CS5?

    I have searched the preferences, but can't find an option to remove the ugly blue background which appears when you adjust the tracking of selected text. It really interferes with the design view, especially when working on large type sizes.
    Please can someone let me know how to get rid of this annoying feature!!
    thanks
    Ian

    (10 seconds after entering "tracking" in the Online Help)
    http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6e14a.h tml (the section titled "Highlight text containing custom kerning and tracking")

  • Adobe Acrobat Reader Plug - Writing to text file

    Hi,
    I have an Acrobat plug-in which performs various functions including writing to a text file on c:\
    If I use my plug-in with Acrobat all is well.
    If I use the same plug-in with Reader everything seems to work ok except that it won't create the text file. It's as if Adobe reader is protecting this somehow.
    Has anyone seen this before? Any one know how to get around it?
    Regards
    Stuart

    More about protected mode. It is designed specifically to protect the user against attacks originating INSIDE Adobe Reader (e.g. via exploits). Sandboxing is a leading edge protection technology, which (for example) is also being applied to browsers. Your plug-in is therefore part of the problem to be protected against. You have to fully understand the philosophy to exist inside this new sandboxed world. Here is some reading
    http://blogs.adobe.com/livecycle/2010/11/technical-details-of-adobe-reader-x-protected-mod e.html
    http://blogs.adobe.com/security/2010/07/introducing-adobe-reader-protected-mode.html
    http://blogs.adobe.com/security/2010/10/inside-adobe-reader-protected-mode-part-1-design.h tml
    http://blogs.adobe.com/security/2010/10/inside-adobe-reader-protected-mode-part-2-the-sand box-process.html
    http://blogs.adobe.com/security/2010/11/inside-adobe-reader-protected-mode-part-3-broker-p rocess-policies-and-inter-process-communication.html
    http://blogs.adobe.com/security/2010/11/inside-adobe-reader-protected-mode-part-4-the-chal lenge-of-sandboxing.html

Maybe you are looking for

  • Donot want to fix the schedule lines at an Early date even P.O is the creat

    Hi ,   If a material is sourced via a Scheduling Agreement, then MRP automatically creates schedule lines for this to meet MRP requirements. However, if a separate PO is raised for the same material (irrespective of the supplier) at a date after one

  • Search on screen bottom disappears when closing tab

    With Firefox version 25.0 the behaviour of the "search" field (bottom left) seems to have changed: when I have multiple tabs opened and search i.e. in tab 1 for "search string" the other tabs don´t feature the same search. Instead I need to CTRL + F

  • Is this a typical Adobe support response?

    My wife bought me a copy of PSE8 at Costco. I installed it on my Windows 7 PC. When I launched it, none of the scroll bars worked. Neither did most of the click to select an object functions. Drove me crazy for a couple of hours. Then it hit me - I'm

  • MS Word Web Service Interface: bad format of date and currency fields

    Hi, I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values)

  • Video Podcasts Question

    Hello all. I'm still a rookie to the MacWorld. Is it possible to view video podcasts in full screen mode using iTunes? I recently subscribed to the MacBreak video podcasts but when I watch it on my iMac G5, all I get is the lower left hand corner vie