Display saved lvm file to graph with timestamp

Hi,
I'm having headache displaying my data with proper time-stamping. There are so many methods to save data. here I've decided to save it as a text delimited file format as lvm. a segment of my vi screen shot is attached. I want to use this way instead of other methods is the flexibilty it offers. I will be able to add on more data to store as I develop the vi. (So I'm storing data from DAQ assistant and my calculated values.) I attached a the screenshot of the file I read too.
I would like to use another vi to open this file and plot it to a graph/chart to display as a trending of the data acquired. Can someone pls advise mi on what is a better way for mi to do it?
Thanks alot!
Poh
Solved!
Go to Solution.
Attachments:
datalogging vi.JPG ‏82 KB
logged data.JPG ‏76 KB

Hi Krisna,
Sorry for the late reply, I was rushing to complete my project, wasn't able to reply.
Yes, I managed to solve it. Anyway I used such high rate in the DAQ assistant is to allow continous mode acqusition & use a software filter instead of hardware filter. however writing to file in this way - writing string into .lvm, max is 10 samples/sec. unless I use tdm (I'll then log everything).
I wasn't able to display proper time-stamping was due to the fact that I didn't add in the start-time timestamp that's required in displaying of timestamp in waveform. I'll not be able to go down to my lab, & my machine do not have LabVIEW, so what I can do is to extract portions of my report to share.
For the portion that I used to display graph (can be seen from the attachment), I deleted the 1st column, which is the timestamp (for spreadsheet viewing), but extracted the 1st element - the converted to DBL timestamp when I start logging in the DAQ vi (written together with the header).
This extracted (could be seen as a bunch of numbers in the lvm file) and and converted back to timestamp type and wired to build waveform block, providing the start-time of the waveform.
Next, I replace the use of chart with graph, as graph is suitable for plotting data acquired, and chart is better for run-time display of data. now it seemed to work fine for me, except for loading time may take a while for larger files.
Thanks for your participation in this thread!
Cheers!
Poh
Attachments:
display graph.JPG ‏39 KB
data.JPG ‏171 KB

Similar Messages

  • Xy -Graph with timestamp

    Hi forum,
    i need help again. I have a .csv file from labview where the first row is a timestamp:
    08/10/201423:45:53.871
     the other rows are floating data.
    I would like to read this data and plot it with timestamp on the x-Axis. How i could do this in labview.
    Thanks and best
    Martin
    Attachments:
    Capture.PNG ‏22 KB

     Hi Martin,
    sorry for delay, but next time you should save your VI in LV2011…
    See this:
    - read in the text file and convert to array of strings
    - get columns (instead of rows!) and convert each column depending on its datatype to timestamp and float
    - plot data on XY graph
    You went wrong on
    - the format specifier for SpreadsheetStringToArray
    - indexing rows instead of columns
    - the whole process of data conversion: after converting to float you convert back to string to finally (trying) to convert back to timestamp…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Saving a file in JSF with a servlet

    Okay, here is essentially what I'm doing right now:
    1. The user selects some data that they want to export (save) to a file and enters a filename into a text box.
    2. The user then clicks an 'Export' button and a controller action is invoked that puts the filename and the data (as a String) into the http session.
    3. On success, the controller returns a successForServlet string which a navigation rule defined in faces-config looks at and sends the page to an ExportToFile.jsp page.
    4. All this jsp page does is to forward the request to my servlet.
    5. The servlet picks up the filename and data from the http session and sets up the appropriate response. This causes a 'Save' dialog to be prompted to the user so that they can choose a location and such.
    6. The user clicks save and the file is saved to disk.
    This all works wonderfully. BUT, here is the problem...I am now out of JSF's scope since the nav rule sent the request (ultimately) to a servlet. The page that the user was on is now stale and they have to click a menu item or something to get back into JSF scope. So, what now? I've tried a few things that I won't mention here until I see what kind of suggestions I get from you guys. Thanks to anyone that can help me out. Lance.

    I may not be understanding you correctly (this is very new to me), but I tried your suggestion to no avail. As I understood it, you were suggesting that I put this into my servlet. I did so in a finally block in my doPost() method. Here's the code:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    String methodName = "doPost";
    log_.entry(methodName);
    try {
    // Get a session-scoped value
    HttpSession session = request.getSession();
    String exportFileName = (String) session.getAttribute( "ExportEntityFileName" );
    String exportString = (String) session.getAttribute( "ExportEntityText" );
    response.setHeader("Pragma", "No-cache");
    response.setDateHeader("Expires", 0);
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Content-Disposition", "attachment; filename=" + exportFileName + ".txt");
    response.setHeader("Context-Type", "text/html");
    response.getOutputStream().write(exportString.getBytes());
    } catch (Exception e) {
    log_.error(e.toString());
    } finally {
    HttpSession session = request.getSession();
    session.setAttribute("ExportEntityFileName", null);
    session.setAttribute("ExportEntityText", null);
    response.getOutputStream().close();
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp");
    log_.exit(methodName);
    Something about this line:
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp");
    ...didn't look right, so I tried this also:
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp").forward(request, response);
    ...but that was no help either. Any more suggestions out there? I can't believe that this isn't being done by others. I mean, saving a file to disk!?!?!?!? It sounds rather elementary.
    Thanks for any suggestions.

  • File Synch problem with timestamp

    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than the DEST timestamp, then I delete the DEST file, and COPY the source file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these files, it says the LAST MOD date is 6:09:20. That is the case for BOTH the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time it runs. When I add logging stuff to the synch process, it tells me that the local file has a date of 6:09:21, and the remote file has a date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the times identical, but LabVIEW shows them ONE second apart, and copies them AGAIN the next time it runs. This is true for about 6 files out of a folder of 50-60. I suppose I could allow for that one second, if I knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of 1 mSec say, then I could understand that maybe the PROPERTIES window truncates the value, and the TIMESTAMP does not. But even then, it ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    CoastalMaineBird wrote:
    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced
    on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the
    remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a
    TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the
    corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than
    the DEST timestamp, then I delete the DEST file, and COPY the source
    file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these
    files, it says the LAST MOD date is 6:09:20. That is the case for BOTH
    the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time
    it runs. When I add logging stuff to the synch process, it tells me
    that the local file has a date of 6:09:21, and the remote file has a
    date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the
    times identical, but LabVIEW shows them ONE second apart, and copies
    them AGAIN the next time it runs. This is true for about 6 files out of
    a folder of 50-60. I suppose I could allow for that one second, if I
    knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of
    1 mSec say, then I could understand that maybe the PROPERTIES window
    truncates the value, and the TIMESTAMP does not. But even then, it
    ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    It
    is a file system issue. NTFS uses something like a 100nSec resolution
    but historically the FAT file times have had a two second resolution.
    Apparently the Property dialog does convert the timestamp to a DOS time
    all the time before displaying it.
    Your MacOSX system uses a completely different resolution (at least 1
    sec but probably better). The network protocol does allow for high
    resolution transmissions and so the exact time gets transmitted but
    somehow your local system has a DOS limitation for the harddisk volume
    in question so that LAbVIEW returns the DOS time too for the local
    volume. The Explorer property dialog will always show DOS time only it
    seems, I had similar issues in the past but didn't really dig deeper,
    just accepted the 1 second difference.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Saving a file in a with a file name containing Japanese Characters

    Hi,
    I hope some genius out there comes up with the solution to this problem
    Here it is :
    I am trying to save some files using a java program from the command console , and the file name contains japanese characters. The file names are available to me as string values from an InputStream. When I try to write to a File Object containing the japanese characters , I get something like ?????.txt . I found out that I am able to save the files using the unicode value of the java characters.
    So I realize that the trick is to convert the streaming japanese characters , character by character into their respective unicode value and then Create A File Object with that name. The problem is -> I cant find any standard method to convert these characters into their unicode values. Does anyone have a better solution ? Remember , its not writing japanese characters to a file , but creating a file with japanese characters in the file name !!!!
    Regards
    Chandu

    retrive a byte array out of the input Stream and store the values in String using the condtructor
    String(byte [] bytes, String enc)
    where encoding would be Shift_Jis for japanese I guess.
    Now to understand this concept basically all the Strings are unicode however when you are passing a byte array String has no means to know what is the encoding of the byte array, which is being used to instantiate the String value so if no encoding is specified it takes the System value which is mostly iso-8859-1. This leads to displaying ?
    However in case you know the encoding of the array specifying that in the constructor would be a real help.

  • File Synchronization problem with TimeStamp

    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than the DEST timestamp, then I delete the DEST file, and COPY the source file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these files, it says the LAST MOD date is 6:09:20. That is the case for BOTH the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time it runs. When I add logging stuff to the synch process, it tells me that the local file has a date of 6:09:21, and the remote file has a date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the times identical, but LabVIEW shows them ONE second apart, and copies them AGAIN the next time it runs. This is true for about 6 files out of a folder of 50-60. I suppose I could allow for that one second, if I knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of 1 mSec say, then I could understand that maybe the PROPERTIES window truncates the value, and the TIMESTAMP does not. But even then, it ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    So every time you store a file with an uneven number of seconds it will loose the last bit and become even
    That's not the case. If you read the real thread (I'm not sure how this got posted here, though I know I'm responsible), you'll see that I found cases where it rounded(?) the time from an even number to an odd number of seconds.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Waveform graph with timestamp

    I have 5 arrays of data, 4 are data values and 1 is the UTC seconds.  I want to use a waveform graph as it smooths the plots so the traces look
    more rounded compared to an XY Graph.  I have experimented with bundle and build waveform setups but the best  I have been able to do is to get the timestamp along the X axis but no data shows up in the graph  or all the data shows up as but it looks like the axis is swapped but the timestamp is still at the bottom.
    Does anyone know why the waveform graph plots are smoother than the XY Graph plots.  If I knew this answer I could use the XYGraph instead.
    Thanks
    Tim C.
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    I don't notice a difference between an XY Graph and a Waveform Graph if the dt on both are the same and assuming all of the other attributes (interpolation, point style, range, etc.) are the same as shown below. To create a waveform graph and assuming that the dt is constant in your time array, you can do something like the other image. An XY graph is normally used only when the intervals on the x axis are not constant. If you see a difference, you should post your VI (with data in the arrays) so that someone can look at it.
    Message Edited by Dennis Knutson on 09-15-2007 09:38 AM
    Attachments:
    Waveform Graph versus XY Graph.PNG ‏21 KB
    Build Waveform.PNG ‏8 KB

  • Need help with saving Premiere files to work with any update

    Hey everybody,
    I've been editing with Premiere for a while now and I haven't really had too many issues until now. I live on campus at school and they just opened up a new Library with extensive Mac Pro editing stations, some with 4K monitors! The problem is that the school is not updating the software. So I am running the latest version on my Macbook Pro, but when I try and open the files on the library computers, it tells me something like, "Cannot open file because file was saved on a newer version." Now I know it seems obvious that I should just stick to my computer, but it's nice having a much faster editing station with 27"+ screens. Because the library is so new, they are having trouble keeping up with all the updates and they don't seem to plan on updating them except every semester. So, are there any workarounds? Can I save my files as a more multi-platform file?

    I would take your computer back to the earlier version the college uses, there are workarounds to go back versions but they are not perfect.

  • Saving .dng files in raw with sidecar

    I loaded raw images as .dng -- edited the photos -- and am trying to export as "File Settings / Format: Original" (with the attendant side car XMP).  The export folder still contains .dng files and I do not understand what else must be done. I'm a iMac user.  Thanks for the help.
    Chuck N+13

    Chuck,
    One other method to extract the XMP from the DNG would be the following:
    In LR, Save Metadata to File on all your DNGs
    Make your DNG Files read only
    Open them in ACR (e.g. using PS)
    Make a trival change to the image and then reverse it (e.g. change WB from what it is to something else, then back)
    Click Done in ACR
    ACR will try to write the XMP data into the DNG, but because it's read only, it will write a sidecar XMP for it.
    Step 4 might not be necessary to achieve a write-back of the XMP.
    Of course, you still need to get your RAW from somewhere ...
    Beat Gossweiler
    Switzerland
    Message was edited by: b_gossweiler

  • Problems loading and saving pdf files from sites with latest version.

    On my utilities I wish to download and save pdf files of my e-bill.
    Lately when I click on getting bill, Firefox opens new tab and stops.
    with a light message in url place saying "Type a web address".
    To get around this I must do a right click on the save bill and
    select open in new window, then it opens a new copy of Firefox,
    and two tabs, with the second one asking me to use Adobe to see
    pdf file. I tell it to open and then save it and print it from the tab
    that opens with the pdf file in it. This never happened before was
    always able to just click on link and it would open new tab with
    pdf file there.

    Thanks for the replies. I don't think I was clear enough with my question.
    What I want to be able to do is to click on a PDF file in my Firefox browser and be able to save it as an Adobe PDF file, not a Preview PDF file, in any folder on my computer, rather than just the specified default location for downloads. This way I can save, for example, phone bills in the phone bills folder and bank statements in the bank statements folder without having to save them to the desktop, "Get Info" on each, and change the "Open with:" box from Preview to Adobe Reader.
    Fortunately, thanks to Michael's post, I found an add-on from Firefox that allows me to do just that: https://addons.mozilla.org/en-US/firefox/addon/636
    Thanks for your help. Now, within my Firefox browser, I can choose whether to view or download PDF files, always in Adobe rather than Preview, and when I save them I get the option to choose the location each and every time.
    MacBook Mac OS X (10.4.9)
    MacBook Mac OS X (10.4.9)

  • Displaying local image file in JEditorPane with relative path

    Hi All,
    I am showing an html inside JEditorPane. I have set its content type to text/html. The code goes like this,
    StringBuffer bf=new StringBuffer();
    bf.append("<html><head></head><body>");
    bf.append("<img src=\"calendar.gif\" width=\"10\" height=\"10\" border=\"0\">");
    bf.append(" <font face=\"Verdana\" size=\"3\">");
    bf.append("Hi All");
    bf.append("</font><br>");
    bf.append("</body></html>");
    jeditorpane.setContentType("text/html");
    jeditorpane.setText(bf.toString());
    The image calendar.gif is present at the base directory of the package. But still it is not shown in JEditorPane. But if i give full path like,
    <img src="file://C:/man/calendar.gif">
    then image appears.
    Any idea like what is the document root for JEditorPane??
    Thanks in Advance,
    Manjinder Singh

    One solution is to dynamically set the base href
    String s = "test.txt"; // "dummy" file in current directory
    File f = new File(s);
    s = f.getAbsolutePath();
    s = "file:\\"+s;
    p("<BASE HREF='" + s + "'>");

  • Saving .html files in TextEdit with OSX Lion

    HELP!!!
    Just upgraded to Lion.
    When i paste html code into TextEdit and save as .html, the moment i edit and save that same file it automatically changes the extension of the file from .html to .txt..how do i turn this off so that it saves it as .html?? in Snow Leopard it never did this.
    Many Thanks.

  • Plot excel data onto X-Y graph with time stamp

    Dear all, I have the same set of data but it is saved in excel format instead of text file now. However i think the column data are separated by tab, i have tried to write some codes but it dont seem to plot out the graph properly. I have no problem ploting out data in text file but not this excel file. Can anyone help out to plot this graph with timestamp?
    Attachments:
    test4.txt ‏1 KB

    I still don't understand your comment 'I have no problem ploting out data in text file'. The Read From Spreadsheet by default uses a tab separator so you should have no problem reading the file. Post the code you have already written so someone can see where your problem is.

  • Read several lvm files into VI

    Hello all,
    I have a question about how to load several files into a VI. I have done a long measerement with a high samplerate so LabVIEW has made approximatelly 900 lvm files. I want to do two things. The first thing that I want to do, is to see chart/graph of the data with a scroll bar so I can look trough the data. The second thing that I want to do is write the same data (approximatelly 900 files) to lets say 20 files. So the samplerate is from 100 Hz to 0.2 Hz. Is that possible?
    In the attachment I have put the VI that I currently have + one of the 900 files that I want to load.
    Thanks in advance.
    Attachments:
    VI + LVM file.zip ‏556 KB

    Hello Mark,
    I'm a bit confused about the situation:
    - Although you're talking about 900 files I only see 1 file in your attachment (as you also mentioned in the post).
    Do they all have the same format/sample rate (and amount of samples) in each column?
    If not, then please provide the necessary examples, because I don't see your variation of 0.2 Hz to 100 Hz sample rate based on this file.
    That left aside, merging files should always be possible (up to a certain point)
    - Can you also provide the code you used to generate the lvm-files?
    This will give some background information.
    Especially beccause I don't see any metadata available in your lvm-files.
    - Graph/Chart choice:
    If you only want to see all data at once, then a graph would be the solution seeing that you are not interested in the data sets while they're loading and only in the full set of data. Please do also keep in mind the size of the data set you're loading.
    If you want to plot all colums in the same graphg with different sample rates per channel/column, then a good idea would be a multiplot XY Graph.
    However, here you will also have to keep the data set size in mind.
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • Color Display for PDF Files Creative Cloud in Browser View

    I have noticed that there is a great difference in color display between a PDF and .ai/eps files. When viewed in the browser there seems to be no ICC taking affect for PDF files even though options to include the profiles, etc in output were selected. This makes it hard to use as a tool when showing clients proofs via the browser as they will never see proper color. I know color will vary between monitors but the difference is huge for some colors. Like a dark almost Navy Blue appearing like a vibrant pen ink blue. On a Mac when you use the quick spacebar preview the correct color shows for all versions of file type but in the browsers it shows the color incorrectly. Have tried this so far on the Mac in in Safari, Chrome and Firefox. Even Google Drive can display all the file types correctly with correct color although the way it shows eps files is a bit off. That I don't mind as I rarely save eps files anymore.
    Is there something I am missing or is this a defect in the browser display?
    The other possible option would be to flip my thinking and save everything as .ai files with PDF compatibility turned on and then have to tell clients that they should be able to open that ai file in Acrobat. At the moment I save everything as PDF files with Illustrator compatibility turned on.

    Can anyone throw light on this. I'm facing same problem.

Maybe you are looking for