Text file vs labview

Hi. I have a text file of data ( please, look at the attachment) and  i want to create a single photoelectron's time spectra. I'm studying the transit time: i want to understand and characterize photomultiplier tube response to various signals. My teacher sent me that text file. I have create charge spectra by matlab ( charge spectra at 1651 V, 1710 V and 1580 V). But I can't use labview to create this time spectra ( i can't use functions tools and other ones). I need to convert 1-8192 channels in time, so  i could create Transit Time Histogram. So, could  you help me to convert x - axis ( in attachment is the channels number 1-8192) in time? I need create a data chart ( with data in my text file) in labview...thanks anyway.
Val
Attachments:
TIME SPECTRA 1651 Volt.txt ‏25 KB

Today seems like an Example Finder day for me and my suggested solutions.
LabVIEW can quite readily perform the tasks you need.  If you open the Example Finder, available in the pull-down menu under Help >> Find Examples... then and search for "read text file", "Histogram", and "graph" you will find general examples to do what you seek.
Jason
Wire Warrior
Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

Similar Messages

  • Print text file with labview 2011 and windows 7

    I am having some strange problem, hope someone out there knows the solution.
    We have a labview program running under windows xp, the program runs some test and print label from a local label printer. Last week, I have to upgrade the computer to windows 7 and all the sudden the printer will not print any more.
    The print vi is very simple. I am using the report function and I am attaching the diagram of that vi below. 
    If I use windows notepad to open that small text file, I can print fine. This means the printer driver itself is OK. However, if I print the same text file through Labview printing vi, from the printer's task list, I can see it does not recognize the char. From the attached png file, the top one is the task from notepad, it shows 2 pages and the bottom one is from the labview, it becomes 33 pages. 
    For the printer part, I use Generic / Text Only printer driver which comes from windows itself. And I am aslo attaching a sample of the text file, there are quite a lot of special char, it is for print bar code. When I tried to use labview print text vi to print general text from my computer to a regular printer, the vi works. So it seems Labview print can not handle the special char? Although it worked many years under windows XP in the past.
    Welcome to any suggestions!
    Thanks
    Attachments:
    print vi.gif ‏9 KB
    labview print bug.png ‏26 KB
    SerialLabel.txt ‏1 KB

    DGU wrote:
    where to check RAW or TEXT? the print report vi only asks for file name and printer name.
    When I print from notepad, everything just goes by default. This is a label printer, so I never need to specify printing parameter such as size, orientation, etc in the past
    Famous last words go something like this: "...never had to do that before."  Maybe you have to do that now.  It's worth at least comparing the defaults settings for bothe generic drivers.  It could save you a lot of headache if you notice something different.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Plotting data from a text file in LabView 7.1

    This my be a stupid question, but here is goes.  Working with another person, far more LabView experience than I, a VI was created to take data and output it on the screen, real time, as an x-y plot.  Once the test was completed the data was stored in an .txt file which could be read into Excel.  Now the end user wishes to read the old data back into Labview with an x-y plot of the data, the same way it was displayed during the test.  Before I started to pound my head against the wall, thought I would ask this to the group.  Everyone has been very helpful in the pass, so hopefully this will be an easy question for the group.
    The question is how do I import a text file into Labview and plot it on an x-y screen?
    Thanks,
    Scamper

    It really depends on how you've saved the data. If you have a simple text file with x data in one column and y data in another, then you can use the code below. It's just a Read From Spreadsheet File, and Index Array, and Bundle function. Modify as needed for your actual data. If you get stuck, post a small example of your data file.
    Message Edited by Dennis Knutson on 09-17-2008 11:10 AM
    Attachments:
    Read XY Graph.PNG ‏3 KB

  • Deleting a column in a text file using LabVIEW

    Hello all,
    I'm trying to delete the first column of my tab delimited text file using LabVIEW and then save it under the same file name.  Can someone show me a quick way to perform this operation.  Is this even possible with LabVIEW?  Any help would be much appreciated.
    My purpose is to automate this operation for hundreds of daily text files containing data that needs processing.  I'm currently using LabVIEW 8.2.
    Thanks!
    -noviceLabVIEWuser

    If the file is relatively small:
    Read the file using the Read from Spreadsheet File VI to get 2D array.
    Remove the column from the 2D array.
    Write out new 2D array to new file using Write to Spreadsheet File VI.
    If the file is relatively large then you will likely run into memory issues. In this case you will need to read the file in chunks. You can decide how many lines to read at a time. Use a for-loop that's set to run for the number of chunks to read (based on the total number of lines and the number of lines you want to read at a time). Hint: Quotient & Remainder function. In the loop use the Read Text File VI to read your set number of lines. Convert the lines to a 2D array delete your column, and write out that chunk of data to the new file. Rinse and repeat.

  • How can we import a text file in Labview,Is this process require CIN utility

    Hi,
    I am working in physics lab where i am working on labview and want to import a text file in labview, if anyone knows ,please mail me at [email protected]

    Hi Ajay,
    See attached V 7.0 example...
    Hope it helps,
    Nick
    Attachments:
    Read_txt_File.vi ‏20 KB

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • Charting data from text file in LabVIEW 5.1 for Windows

    I am having some difficulties trying to figure out how to plot a chart with
    data from a file. I would like to be able to read data from a text file
    into a chart using LabVIEW 5.1 for Windows. I have looked in the help
    within the program and online. I have also looked in the user manual and
    the book "LabVIEW for Everyone". Could you please give me specific
    instructions on how I would construct the program to be able to do this.
    Thank you.

    Hi Ellie,
    It depends on how data is stored in that txt file. Usually you load the data into an array either using or , the array if necessary and send it to the graph indicator in required form. If you want a more detailed answer, send me a sample data file ([email protected]).

  • Reading from graph to text file in labview 7.0

    Hi Guys!
    I am doing a project which reads analog values from a microprocessor board and I am using the Labview example Cont Acq&Graph Voltage-Int Clk.vi. I am getting an analogue graph using this VI. is there any way I can convert the values on the graph and save them to a text file?
    Any help would be much appreciated!
    Thanks
    Pauline

    Hi Pauline
    There are two ways. Either you place the Export vi in the vi you're already using or you assign the waveform indicator to a terminal (search the LV help for terminal). This makes the waveform-data available for other vi's if you use the Cont...vi as a sub-vi. This means you can create a new vi, place the cont acq&graph valtage-int clk.vi and the export waveform to spreadsheet file.vi in it and wire these together (similar to all the vi's in con acq&graph...vi).
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Read/Write text files in LabVIEW

    We have developed an instrument control and data acquisition system for a mass spectrometer using LabVIEW FPGA. Currently we have 6 counters on the FPGA, counting for 1 second intervals and transferring data to the host using a FIFO. 
    The data, as a local variable, is used in several different parallel loops on the host. One of these is coded to write the data to a text file. Unfortunately everything we have tried has failed. It is proving impossible using either the write to file VI provided with labVIEW, or to use the Open file, write and close file utilities. Each attempt has failed. Yet when running a dummy code we can write to files. The dummy code consists of 6 random number generators running in one loop and the write to file VI in a second loop. The random numbers are transferred across the loops as local variables.
    Can anyone offer any advice as to what we might be doing wrong. We're beginning to feel as though we are banging our heads against a brick wall and getting very frustrated.
    Many thanks in advance for any suggestions.

    Hi Paul,
    you neither say, what is failing nor do you show any code... How should we help then?
    "impossible using ... the write to file VI"
    Well, usually they work just fine.
    "Each attempt has failed."
    In which way? Error number given? Did you use the debuging tools, like probing, breakpoints and highlighting?
    "as local variables."
    It seems you're not properly do program "real" LabVIEW code
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Transmit BPSK from a text file in LabView; enable 8-bit IQ mode

    Hello,
    I have a BPSK sequence I'd like to transmit, and it is stored as a spreadsheet of -1's and 1's. Adapting one of the niUSRP example VI's, I made this folllowing code. 
    Currently it does not work, because the while loop doesn't transmit the array of values outside the loop until it finishes running (which it never does). But I feel this is a sloppy implementation - surely I can just store the output array as a variable. My issue is: Can I feed the USRP a single array of a few hundred elements and have it repeat once it reaches the end?
    In other words, with a short sequence (a 1D array of -1 and 1's)  to transmit, is there a way to loop my transmission so it keeps broadcasting? 
    A somewhat unrelated question is: How do I make use of the USRP's ability to transmit IQ symbols as 8-bit integers as opposed to 16-bit integers, which is the default setting? I have looked everywhere in the manuals for this, but no luck! I'd really like to use the 40 MS/s IQ rate, but am limited to 20MS so long as I use the 16-bit symbol representation.
    Thanks!
    Andrew
    Attachments:
    USRP MIMO SYS.vi ‏21 KB

    Hi Andrew,
    You should be able to consolidate the code in those two loops to run within one loop to read and transmit data while avoiding the tunneling issues you were experiencing. For your reference, the niUSRP EX Tx Continuous Async example demonstrates how to continuously transmit using the USRP.
    With regard to your second question, 8-bit mode can be set using the Configuration:Advancedample Width property accessed through the niUSRP driver. Setting this correctly should enable you to use the 40 MS/s IQ rate. Feel free to refer to the help documentation on this property for further information.
    Regards,
    Kristen

  • Text file generation in labview

    Can I generate a text file in labview and it could only be operated in labview. No one can see it and read or write it in case the data lost.
    Thanks.

    Are you looking for some form of encryption?
    If you open a file in LabVIEW, you can set the file locking (optional input: "deny mode") to determine if other applications have simultaneous access to it or not while it is open in LabVIEW. If your OS supports it, you can also set the access right using "access rights.vi".
    Maybe I don't understand the second part of the question but if the data is lost, no one can read it anyway or it wouldn't be lost. Right?
    Could you explain in a bit more detail what you want to do.
    LabVIEW Champion . Do more with less code and in less time .

  • Read from Text File.vi adds spaces between characters

    I'm openning a text file in LabVIEW, and and need to parse some information from it.  However, when I open the file, there are extra spaces between the letters.  When I just open the same file with Notepad or Wordpad, the spaces are not there.  Is there a way to eliminate this problem?

    And, since after the \FF\FE, every other character is \00, you can even do a homebrew quick&dirty solution.
    Are the files always like that, or are some "normal"?
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    readspecialfile.png ‏12 KB

  • Send text file via serial

    hi
    i've trying to send a text file via rs-232 but no success
    The file contains a code for a device im dealing with, when i send the text file with labview to the device, it went ok with no errors, but when i connect the device on hyperterminal and check if the code was loaded it was not.
    can you please give some clues to deal with this?
    thanks a lot
    attached example text file and LV code
    Attachments:
    Serial.JPG ‏45 KB
    DefineHome.txt ‏1 KB

    Some devices are very picky with the End Of Line.  You might want to right-click on your FIle Read and deselect the "Convert EOL".
    Or if you need to write 1 line at a time, right click on the Read Text File and select "Read Lines".  Set the number of line to read to -1 (read all) and then wire the resulting array into a FOR loop where you do the VISA Write.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Upload and plot text files

    Hi
    I would like to upload and plot as overlays several text files in labview.
    Uploading and ploting one file is not a problem but I want to load several and see them overlayed in a single plot.  Presumably I need a looping routine that uploads each file independently putting the data in an array, then plots each of the arrays to the x-y graph.  I just can't figure a way of doing it.  Can anybody help?

    Hi.
    Here is a small example (LV7.1)
    Message Edited by EVS on 09-05-2005 05:01 PM
    Jack
    Win XP
    LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
    Let us speek Russian
    Attachments:
    Add PlotXY.vi ‏56 KB
    Clip_7.jpg ‏64 KB

  • Transfer time stamp from text file into MS Access thru Labview

    Hello everyone,
    I am Cruz; Long time listener, First time caller.
    I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
    Additional info:
    the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
    Running Labview 2010
    attached is code and text file.
    Any help is greatly appreciated.
    Attachments:
    Oven test other.vi ‏16 KB
    datalog032010003.txt ‏1 KB

    Your first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.

Maybe you are looking for