"read from measurement file" reads only first line of data

Hello,
I have a problem when trying to read a .lvm file through "Read from Measurements file" with the following block diagram
Problem: it reads only the first line of data from what I can see in the probe window,.
A part of the lvm file for reference.
I haven't used Labview in a long long time, I'm trying to figure out what I am doing wrong.
Thanks

Sorry meant to attach the lvm. Here it is. (Actually I had to put it in .txt because the forum wont let me upload a lvm file)
I unfortunately cannot share the full vi that record the data as I am not its owner/creator. I'll try to give as much info as I can with the relevant pictures attached, I hope it allows us to at least have an hint of where the problem might be.
(this is in a while loop)
In the stacked sequence, the other pannels are similar to the one shown here: value read fron a variable, converted to dynamic and a signal attribute is set. The "start recording" control operation is "switch when pressed".
Here are the properties of the set signal attributes
And here are the properties of the "write to measurement file"
Attachments:
NoTarget_full circle__Rx_-10-SAMPLE.txt ‏60 KB

Similar Messages

  • Read from Measurement File Express VI - Time information

    I need some assistance with a small problem with building reports of collected data. I don't see it very relevant, but I'm collecting data from several modules on a 9074 cRIO. I'm not using the cRIO the way it is intended, but it is perfect for my needs. Anyway, I'm collecting the different types of data in RT, then using the express VI "Write to Measurement File" with TDMS option selected and one time column only selected. Also one header, etc. Nothing fancy.
    In another VI I want to use this collection of .tdms files to create an Excel report. Everything is working good however I need a time column for reporting my data. When I view the .tdms file using Excel Importer, the time column is there and perfect, with the next column a relative time (or iteration) and then columns with the signal names at top and all the data below. Perfect.
    I'm similarly using the "Read from Measurement File" Express VI to get the data back the same way it went in. I have everything in it's correct place on building the Excel Report, but I haven't been able to find any way to include the first time column in my import. I can use "Get Attributes" Express VI to get the signal names from the read, but that's not going to help with the time data. How is it possible that Labview allows to put the time data there, but not retrieve it? I'm aware of the warnings that Timestamps aren't supported by TDMS file format vs LVM, but there MUST be a way to retrieve that time information if "Excel Importer" can do it.
    If that time column in the TDMS file is somehow computed using the start timestamp and dt, can someone explain how to compute that for my report?
    Unfortunately, I can't use the LVM format because I need to allow the users of these VI's the backup of using Excel Importer to see this data if my report generation VI is not functional.
    I'll attach one of the TDMS files for illustration. The first column of the second worksheet is exactly the data I need for my report.
    Attachments:
    TDMS Imported.xls ‏28 KB

    DylanC,
    Your solution works as needed. Thank You.
    I think I found a better solution though. Apparently if you convert a signal from the Express VI "Read from Measurement File" into a waveform the time data required is included, then you can convert to a string with a for loop and insert it as a row header into a table. The result gives me what I need. I attached a screenshot if someone is interested.
    AWyers
    Attachments:
    TableFromTDMS.JPG ‏61 KB

  • Read From Measurement File... removes X Values of first column?

    During one of our tests, two instruments were switched at the terminal by accident. I need to read in the massive lvm files, remove the wrong scaling and apply the correct scaling, while switching the values in the columns and right it all to new files. Simple right?
    I wanted to use the Read from Measurement File.vi to make things easier, because the files are very large and I would like to analyze them 100 rows at a time. Some of the the files are around 1.5 Gigs in size so I need to read them in chunks.
    The read from measurement file keeps removing the first column from the data! It outputs the data as a signal (dynamic data) and I have to use the dynamic to numeric array express vi. For some reason, before I even get to that point, the first column is not in the data.
    No matter what settings I pick on the read from measurement express vi, the time column is removed from the data. I have checked/unchecked the "first row is channel names" and "first column is time channel" to no avail. The odd thing is that in the preview it shows the first column, as if it will read it properly... but it doesnt. Nothing I change in the settings can seems to make a difference in getting the first column, the x values, out of the file.
    Below you can see the first column completely removed from the data.
    This is extremely frustrating. By probing the signal out I can see the dynamic data attributes and the time column has already been removed, so I don't think that the signal to double array express vi is the problem, but I am not sure.
    I am attaching my VI and a small data file to be analyzed. You can see what I mean.
    The alternatives seem less than adequate. The read from spreadsheet file vi wants an offset of a specific number of characters not rows. The problem is that this is not constant between rows for some reason, when hidden characters are taken into account so I cant just set the number of characters in 100 rows and increment the offset in a loop... like I normally would. That means I might miss data or get a corrupted row.
    This means that I have to use the read from text file, read how ever many characters I think a row is (over estimating a bit) then search for the newline character, find out how many chars are in that set and then offset that for the next loop iteration, all while converting each string number to a double. Talk about slow.
    I have searched around and found that I am not the only one that has had this issue. This is a common thing, but no one seems to have the answer. Why can't the read from measurement file VI read all of the numbers in every row? Why cant I tell it I want a 2d array of doubles out and not a dynamic data type? It has to be something I am doing wrong.
    Attached is a zip file with my VI and two data files. The "S19_A_DSI_detensioning_c.lvm" is the one generated by my VI (_c meaning corrected). "S19_A_DSI_detensioning.lvm" is the original measurement file. I hope you will pardon my messy VI, it's a quicky.
    Any help you guys can give would be much appreciated.
    [will work for kudos]
    Attachments:
    Scaling Factor Correction.zip ‏1109 KB

    That is a great workaround. The help talked about putting a check next to "read lines" but for the life of me I couldn't find where to do that. I wonder what other VIs have mystery check options in the right mouse click menu. I mean normally options like those are inputs, I thought. I'm going to start right clicking on every VI I drop to see if there are options there I never realized.
    I would still have to use the set file position VI and specify the byte offset right? How would I know where that is? I guess each character is a byte and I would count the characters in the string retrieved and then offset by that amount on the next iteration using a shift register?
    While waiting for help, I ended up using the read from text file and using the match string to look for the new line character, and using the spreadsheet string to array vi, analyzed the files line by line. Thats just because I couldn't easily come up with a regular expression to get 100 lines. It was slow but it worked.
    However, that still really doesn't answer the question of why it is impossible to get the first column with the read from measurement file express VI. Does anyone know? Is this a known bug?
    [will work for kudos]

  • Read from measurement file (wrong values)

    I have a VI where I save data using the ''Write To Measurement File utility''. When I open the .lvm file in the note pad I can see all the data correctly, but when I use the "Read From Measurement File" tool and try tho make a graph the data shown is not correct. Attached the .lvm file and one image of the chart that labview made using the "Read From Measurement File". If you open the lvm in the notepad you can see that the time column goes up to  22 sec. In the chart the time axis goes only up to 7,5 sec. What is going wrong??? Thanks
    Ps: I changed the file .lvm to .txt to attach
    Solved!
    Go to Solution.
    Attachments:
    Chart.jpg ‏688 KB
    teste.txt ‏156 KB

    vitor22 wrote:
    I tryed.
    And how did it turn out?  Saying I tried and not saying how it didn't work doesn't help me help you.
    I was able to do it.  But the X data wasn't correct.  That is because your timestamps aren't regular spaced.  So you can't use a waveform graph.
    You need to use an XY graph.  See the attached code for how to convert the two channels of data (time, your values) into a datatype to feed to the XY graph.
    Attachments:
    Example_VI_BD.png ‏49 KB

  • Read from Measurement File to XY on Waveform Chart

    Something pretty simple that is giving me a hell of a time right now.
    I've got a .lvm here that has been saved from a DAQ and has one column of numbers starting from 0.0000 - 27.0000 in very small steps. The next column is amplitudes of the signal at the given time. Now, from this LVM file I'm starting a new vi and I want to read those values as X and Y and get them onto a waveform chart. As of right now I've tried hooking up "Read From Measurement File" and tried "Build Table" but that won't want to plug into a chart. Plugging the file directly into a chart causes two very different lines to show up but is no where close to what I'm looking for.
    Any tips as to how to complete this?
    Solved!
    Go to Solution.

    Tasty,
    More often than not I find Express VIs to be more trouble than they're worth. Here's an example of reading tab delimited data in from an .txt and plotting Y values versus X values on a graph. Hope it helps.
    Andrew
    Andrew
    Attachments:
    ReadData.vi ‏14 KB
    data.txt ‏1 KB

  • Read from measurement file problem

    Hi all,
    I am using the "Read from Measurement File" VI that is built into LV8. I am reading in a .lvm file consisting of 2 columns. I cannot seem to figure out how to index each column. When tested using a a single column data file, I am able to use the index array vi to  access the data successfully. The problem occurs when I have 2 columns. To get around this problem I split my initial data file into 2 single column data file, but I would prefer not having to do this. Is there anyway to avoid this?
    When I read the 2D file into an array I can only index the data located in the 1st row 1st col and the data in the last row 2nd col.
    The array size function results in the value "2" yet each column has 201 entries.

    Attachments:
    Write to LVM.vi ‏128 KB
    To read LVM.vi ‏70 KB

  • Data reading and writing problem? how to set " Read from Measurment File express.vi​" 's readout datasize?

    Dear all,
    I want to use Labview to process a data.
    Now I have a array in a text file.
    this array is very very big. which is at least row*col = 6 * 100000;
    the column size always 6,
    but the row size is ramdom, some times is very big, like bigger than 65535,
    when I use "read from measurement file express.vi" to read this file, the array I could get always 6*5339, I don't know why. the column size is always 5339.
    and then I delete the 1st row of the array and then write into a txt file via "write measurement file express. vi", it takes a very long time. almost computer has no response. after a while, no file was creat to record the data.
    is there an efficient way to process such big data file and store the processed file into a new file
    thank you very much
    Jack
    Message Edited by weichengatech on 03-09-2006 12:00 AM

    Hello,
    There’s no real efficient way to read the file if you don’t
    know exactly how many rows of data you have. 
    Your going to just have to read a row at a time and add the results to
    the end of an array (granted for the clever programmers there are some more
    efficient ways to do this than just with ‘build array’).  I would start by asking you how much
    information you know about the file and what the exact structure of it is (i.e.
    is it a binary file, a tab delimited file, or a LVM file)?  Could you provide a screenshot of the code
    you are running? If you provide a little more information on the file structure
    we might be able to contribute some additional information.
    Look forward to hearing back from you-
    Travis M
    LabVIEW R&D
    National Instruments

  • Need a VB-Script that read a txt-file and only the lines that are new since last time

    Hi,
    I need help to write a VB script that read all new lines since the last time.
    For example:  The script reads the textfile at specific time, then 10 minutes later the script read the file again, and it should now only read the lines that are new since last time. Anyone that has such a script in your scriptingbox?
    cheers!
    DocHo
    Doc

    Based on the excellent idea by Pegasus, where is a VBScript solution. I use a separate file to save the last line count read from the file, then each time the file is read I update the line count. Only lines after the last count are output by the program:
    Option Explicit
    Dim strFile, objFSO, objFile, strCountFile, objCountFile, strLine, lngCount, lngLine
    Const ForReading = 1
    Const ForWriting = 2
    Const OpenAsASCII = 0
    Const CreateIfNotExist = True
    ' Specify input file to be read.
    strFile = "c:\Scripts\Example.log"
    ' Specify file with most recent line count.
    strCountFile = "c:\Scripts\Count.txt"
    ' Open the input file for reading.
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile(strFile, ForReading)
    ' Check if the line count file exists.
    If (objFSO.FileExists(strCountFile) = False) Then
        ' Initial count is 0, so all lines are read.
        lngCount = 0
    Else
        ' Open the line count file.
        Set objCountFile = objFSO.OpenTextFile(strCountFile, ForReading)
        ' Read the most recent line count.
        Do Until objCountFile.AtEndOfStream
            lngCount = CLng(objCountFile.ReadLine)
        Loop
    End If
    ' Read the input file.
    lngLine = 0
    Do Until objFile.AtEndOfStream
        ' Count lines.
        lngLine = lngLine + 1
        strLine = objFile.ReadLine
        If (lngLine >= lngCount) Then
            ' Output the line.
            Wscript.Echo strLine
        End If
    Loop
    ' Close all files.
    objFile.Close
    If (lngCount > 0) Then
        objCountFile.Close
    End If
    ' Ignore last line of the file if it is blank.
    If (strLine = "") Then
        lngLine = lngLine - 1
    End If
    ' Save the new line count.
    Set objCountFile = objFSO.OpenTextFile(strCountFile, _
        ForWriting, CreateIfNotExist, OpenAsASCII)
    objCountFile.WriteLine CStr(lngLine + 1)
    objCountFile.Close
    Richard Mueller - MVP Directory Services

  • Module pool- only first line item data saved, rest disappears??

    Hi Experts,
    I have one module pool that was developed by other developer. It has header details input fields and items details input by table control.
    Now below scenarios occur:
    1) When I enter only one line item, and save it, the data is saved properly
    2) when I enter more than one item data and save it, it only saves first line item data.
    3).When I press ENTER button after every new line item data, it saves all the data properly.
    I tried to debug the report but could not find the exact problem statement as the code is written very badly without any comments.
    I am pasting the flow logic code below for the screen.
    So please help me figure out the problem and solution for it.
    +++++++++++++++++++++++++++++++++++
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
       MODULE it_mseg_change_tc_attr.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
       LOOP AT   it_gp
            INTO wa_gp
            WITH CONTROL it_mseg
            CURSOR it_mseg-current_line.
         MODULE it_mseg_get_lines.
    *&SPWIZARD:   MODULE IT_MSEG_CHANGE_FIELD_ATTR
       ENDLOOP.
    * MODULE STATUS_9001.
       MODULE deactive_screen.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
       LOOP AT it_gp.
         CHAIN.
           FIELD wa_gp-yposnr.
           FIELD wa_gp-matnr.
           FIELD wa_gp-maktx.
           FIELD wa_gp-meins MODULE check_uom ON INPUT..
    *      FIELD WA_GP-DOC_QTY.
    *      FIELD WA_GP-REC_QTY.
           FIELD wa_gp-gp_qty.
           FIELD wa_gp-chall_qty.
           FIELD wa_gp-netwr.
           FIELD wa_gp-remarks.
           FIELD wa_gp-exp_ret.
           MODULE it_mseg_modify ON CHAIN-REQUEST.
         ENDCHAIN.
         FIELD wa_gp-chk
           MODULE it_mseg_mark ON REQUEST.
       ENDLOOP.
       MODULE it_mseg_user_command.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
       MODULE user_command_9001.
    +++++++++++++++++++++++++++++++++++
    Thanks,
    Vishal.

    Hi Aruna,
    Below is the code as you required.
    +++++++++++++++++++++++++++++
    MODULE user_command_9001 INPUT.
       ygp_header_mas-ret_type = v_gpt.
       CASE sy-ucomm.
         WHEN 'MBLNR'.
           PERFORM select_mblnr.
         WHEN 'DEL'.
           PERFORM select_delivery.
         WHEN 'INTI'.
           PERFORM grt_gi_details.
         WHEN 'GENT'.
           PERFORM get_ge_details.
         WHEN 'GP'.
           PERFORM get_returnable_gp.
         WHEN 'SAVE'.
           PERFORM gen_gp_number.
           PERFORM gen_data.
           PERFORM save_data.
         WHEN OTHERS.
           PERFORM get_ge_details_other.
           IF it_gp[] IS INITIAL.
             INSERT INITIAL LINE INTO it_gp INDEX 1.
           ENDIF.
       ENDCASE.
       IF v_entry = 07 .
         PERFORM serial_no1.
         PERFORM insert_row.
       ENDIF.
       IF sy-ucomm IS INITIAL.
         PERFORM calc_amt.
       ENDIF.
       CLEAR:sy-ucomm.
    ENDMODULE.                    "user_command_9001 INPUT
    +++++++++++++++++++++++++++++++
    MODULE it_mseg_user_command INPUT.
       ok_code = sy-ucomm.
       PERFORM user_ok_tc USING    'IT_MSEG'
                                   'IT_GP'
                                   'CHK'
                          CHANGING ok_code.
       sy-ucomm = ok_code.
    ENDMODULE.                    "IT_MSEG_USER_COMMAND INPUT
    ++++++++++++++++++++++++++++++++++
    MODULE it_mseg_modify INPUT.
       MODIFY it_gp
         FROM wa_gp
         INDEX it_mseg-current_line.
    ENDMODULE.                    "IT_MSEG_MODIFY INPUT    
    ====> Above module has some problem i think as while debugging it was not updating IT_GP as the current line number was not matching with IT_GP as it has only one line item and WA_GP was changing. Also WA_GP data was getting changed with LOOP with all line items data.
    ++++++++++++++++++++++++++++++++++++++++++++++
    MODULE it_mseg_mark INPUT.
       DATA: g_it_mseg_wa2 LIKE LINE OF it_gp.
       IF it_mseg-line_sel_mode = 1
       AND wa_gp-chk = 'X'.
         LOOP AT it_gp INTO g_it_mseg_wa2
           WHERE chk = 'X'.
           g_it_mseg_wa2-chk = ''.
           MODIFY it_gp
             FROM g_it_mseg_wa2
             TRANSPORTING chk.
         ENDLOOP.
       ENDIF.
       MODIFY it_gp
         FROM wa_gp
         INDEX it_mseg-current_line
         TRANSPORTING chk.
    ENDMODULE.                    "IT_MSEG_MARK INPUT
    +++++++++++++++++++++++++++++++++++++++++
    If I press ENTER after entering each line item, all records come in IT_GP but if not then only first line item comes. Also if I dont press ENTER after entering the first line item and and add one item (total 2) and then press ENTER then sometimes both the lines disappear.
    Thanks,
    Vishal

  • Write To Measurement File Only One Line Of Data

    Hello,
    I have an express VI setup to acquire a single channel of strain running in a simple while loop.  The output is wired directly to a Write To Measurement Express VI.  However, the resulting measurement file contains only one line of data.  
    I have tried changing the settings of the VI to no avail.  I feel that I must be missing something basic.  My while loop is setup to take one measurement on demand for each loop.  I am assuming the VI knows to write each loop as a new line of data?  
    Thanks for any help,

    Did you choose "append to file" in the Express VI configuration settings?
    You need to upload your VI for further help.  It's impossible to help someone debug a problem without the code to look at.

  • Read from Text File - Help Bug?

    Hi - I am currently working on LV8 and I think that there is some misunderstanding potential in the help file. To be more exact in the help to the "Read From Text File" VI.
    The description for "count":
    " ... If count is <0, the function reads the entire file. The
    default is –1, which indicates to read a single line if you placed a checkmark
    next to the Read Lines shortcut menu item and to read the
    entire file if you removed the checkmark next to the item. "
    If count is lower than zero, the function reads the entire file. That sounds clear to me.
    The default is -1, which indicates to read a single line if you placed a checkmark next to the "Read Lines" shortcut menu item. Now what? Does it read a single line or the whole file?
    .. and to read the entire file if you removed the checkmark next to the item. I thought it reads the whole file if I use -1 ?
    the VI itself behaves as I'd expect it to:
    * If I place a checkmark next to Read Lines and put -1, I get an array containing the lines
    * If I remove the checkmark, I get only a single string item.
    Now where is the error? Is the VI not working properly or only the description a little bit ... strange ?

    ?hein??
    ?what?
    Both you guys lost me..
    And I drink coffee without sugar (being sweet enough, already) 
    Here is what I get from Context Help on the Read From Text File:
    Read from Text File
    Reads a specified number of characters or lines from a byte stream file. By default, this function reads all characters from the text file. Wire an integer value to count to specify how many individual characters you want to read starting with the first character. Right-click the function and place a checkmark next to the Read Lines option in the shortcut menu to read individual lines from the text file. When you select the Read Lines option in the shortcut menu, wire an integer value to the count input to specify how many individual lines you want to read from the file starting with the first line. Enter a value of -1 in count to read all characters and lines from the text file.
    Humm.
    New feature (again)..  If you select checkmark the Read Lines option, it will not send the text to a sting indicator, as shown in the attached image.  If selected, then it's expecting to write lines to an array of strings...  WHY???  I don't know..  I'll ask..
    Strange...  LV8 is full of mysteries... 
    RayR
    Attachments:
    bad write file.JPG ‏33 KB
    more bad write file.JPG ‏12 KB

  • Read from text file vi won't read file...

    I am very new to LV programming so I hope you forgive any stupid mistakes I am making.   I am using Ver. 8.2 on an XP machine.
    I have a small program that stores small data sets in text files and can update them individually or read and update them all sequentially, sending the data out a USB device.   Currently I am just using two data sets, each in their own small text file.  The delimiter is two commas ",,".
    The program works fine as written when run in the regular programming environment.   I noticed, however, as soon as I built it into a project that the one function where it would read each file sequentially to update both files the read from text file vi would return an empty data set, resulting in blank values being written back into the file.   I read and rewrite the values back to the text file to place the one updated field (price) in it'sproper place.  Each small text file is identified and named with a 4 digit number "ID".   I built it twce, and get the same result.  I also built it into an installer and unfortunately the bug travelled into the installation as well.
    Here is the overall program code in question:
    Here is the reading and parsing subvi:
    If you have any idea at all what could cause this I would really appreciate it!
    Solved!
    Go to Solution.

    Hi Kiauma,
    Dennis beat me to it, but here goes my two cents:
    First of all, it's great to see that you're using error handling - that should make troubleshooting a lot easier.  By any chance, have you observed error 7 when you try to read your files and get an empty data set?  (You've probably seen that error before - it means the file wasn't found)
    If you're seeing that error, the issue probably has something to do with this:
    Relative paths differ in an executable.  This knowledge base document sums it up pretty well. To make matters more confusing, if you ever upgrade to LabVIEW 2009 the whole scheme changes.  Also, because an installer contains the executable, building the installer will always yield the same results.
    Lastly, instead of parsing each set of commas using the "match pattern" function, there's a function called "spreadsheet string to array" (also on the string palette) that does exactly what you're doing, except with one function:
    I hope this is helpful...
    Jim

  • Labview 8 crashes when using Read Labview Measurement File

    Hi All,
    I am a new user for Labview. I installed Labview 8.0 from the CD (evaluation copy). I was just testing the sample code provided by NI. I opened the "Load from File and Display" example and I was trying to open the properties for the Read Labview Measurement File component when Labview crashed. I tried it a couple of times and everytime it happens the same way (when I double click the component or right click on it).
    I am using Windows XP with all the updates done. In the Windows crash report, the application version is 8.0.0.4005.
    Other problem I encountered is a missing component on the Input Palette (no DAQ Assistant present) and the Instrument I/O Assistant raises the error "Measurement & Automation Explorer or the Instrument I/O Assistant is not installed correctly. Please install these from the Labview Driver CD". For the last problem, I will try to run the Labview Driver CD, once I get it. But I am not sure if the DAQ Assistant will show up then or not.
    Any ideas?
    Regards,
    Nick

    Hello Nick,
    While it is not my area of expertise, I would expect the DAQ Assistant would appear after installing the driver CD as you said you would be trying.
    What caught my attention was the crash.  The easiest way to resolve the crash is to delete the instance of the Read LabVIEW Measurement File on the diagram and place a new one from the Express Input palette (now called "Read From Measurement File").  In that situation, I would expect just pressing OK to accept the default configuration should work.  The crash occurs in certain circumstances when the Read / Write Measurement File Express VIs are dropped from a previous version of LabVIEW and then their config page is opened in 8.0.x.  This issue should be resolved in a future release, sorry for the inconvenience.

  • Read from text file takes very long after the first time

    Dear LabVIEW experts,
    I'm having a problem with read from text file. I'm trying to read only every nth line of a file for a preview with this sub vi:
    I seems to work well the first time I do it. The loop takes almost no time to execute an iteration.
    Then when I load the same file again with exactly the same settings one iteration takes around 50ms.
    Subsequent attempts seem to always take the longer execution time.
    Only when I restart the calling vi it will be quick for one file.
    When executing the sub vi alone it is always quick, but I don't see how the main vi (too complex to post here) could obstruct the execution of the sub vi.
    I don't have a the file opened elsewhere in the main vi, I don't use too much memory...
    Right now I don't now where to look. Does anyone have an idea?
    Regards
    Florian
    Solved!
    Go to Solution.

    I don't know the LabVIEW internals here, but I would think that it is quite possible that closing a file opened for read/write access writes a new copy of the file to disk, or at least checks the file in order to make sure a new file does not have to be written.
    Therefore, if your main VI calls this subVI sequentially (you don't give any information about the place of this subVI in the main VI), you are actually looking at a close (check/write) -> open operation for any time you call it, as opposed to a simple open operation the first time. If you were to open the file for simple read access (since that's all you do), it should work fast every time because there is no need to check to see if it has changed.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • How to read from a file line by line

    Hi
    I am new to using LabView and was wondering how I could read data from a text file one line at a time and display this data one line at a time as well. I tried looking through the Reading from Text File . vi example but that just seems to be reading and displaying everything together.
    Thanks
    -Karan

    Hi
    My aim is to read text line by line and to then go ahead and display the last 8 reaad lines of code to give the impression of text falling down a screen. I tested the first while loop and that seemed to work fine. However, when I encounter an EOF, I would like the text already read to keep making its way down the screen and keep inputting NULL characters into the array to simulate the effect of the text falling down the screen which is why I created the second while loop. I tried to input the NULL characters using a box for ENUM constants. However, I kept getting an error saying the data types do not match. What would I need to do? For the display I plan on putting indicators next to the 8 places where the text would be stored which I have not done so far.
    I am also attaching a copy of the error.
    Thanks
    -Karan
    Attachments:
    DisplayText.vi ‏40 KB
    Error.JPG ‏89 KB
    PictureOfBlock.JPG ‏120 KB

Maybe you are looking for