Write waveform timestamps with data in TDMS file

Hello,
I am attempting to write data from an array of waveform data derived from a multi sample DAQmx acquisition, but I have found where I have used the get date / time function within my while loop passed to a TDMS Write in series with another being passed the waveform data, that I have many more data points than timestamps, as I am getting a timestamp then the list of sampled points.
I am looking at using the timestamp data from the waveform, but I'm not sure how to make this work.  Attached is an example where I have attempted this, but just managed to obtain mismatched data types.
Could anyone please offer some advice on how to get the following structure in my file:
timestamp of sample | channel 1 sample | channel 2 sample | .... | channel N sample
Thanks
Dave 
Solved!
Go to Solution.
Attachments:
testMultiWaveformLogging.vi ‏24 KB

I'm not quite clear about your use case in the attached VI. However, you should give input of channel names to the 2 "TDMS Write" nodes since they have different type of raw data.

Similar Messages

  • Save multiple sample rate data to TDM file

    Hello, LV connoisseurs
    I use 2 Multifunction boards and LV 7.1 to gather slow and fast data simultaneously, 'slow' being 10 temperatures at 150 Hz, 'fast' being 12 pressures at 15 kHz, rate factor between slow and fast is constant 100. My acquisition is set to 'continuous' with blocks of 15 and 1500 resp., so each sample set takes 0.1 sec.
    Currently, I use 2 loops, one for each board. Slow data are written to .lvm, fast to .tdm, and this works fine.
    But I wonder if in this configuration it might be possible to
    - use one loop only (yes, trivial) with the main target being to
    - write data into two channel groups of one .tdm-file, one for the 'fast' the other for the 'slow' data?
    If at all possible, would this require the consumer/supplier scheme such as to allow the interspersing of data or can I do this directly?
    Thank You for your input.
    Michael

    Just to make the distinction, you should probably be using TDMS (the S stands for streaming) instead of TDM if you are continuously writing data. TDM is more for writing a snap-shot and doesn't work so well for continuous data (big memory leaks last time I used it back in '06).
    Also, as no time data is stored you probably also want separate timestamp channels then for your fast and slow data.
    As mentioned, it is no problem having multiple writing loops using the same TDMS reference.
    nrp
    CLA

  • Filter data in tdms file

    I am needing to look at select data of a TDMS file in an analyze portion of a stat machine. The VI is to test both AC and DC motors. I am getting 18 different reading from a power analyzer. I am writting these to a TDMS file for ease of passing through the rest of the states. In the "Analyze" state I am wanting to look at  13 of readings an compare them to see is they are within tollerence. I will then use this check to highlight the reading green or red.
    My questions are:
    Should I even have an 'Analyze' state or should I do the analysis in the state that the reading is taken?
    If I do use the 'Analyze' state is pulling the data from the TDMS file the best way to do this?
    Also, if you see any other possible errors in the vi, please let me know. This is my first experience with LabView and it is steep learing curve.
    Thanks, 
    Attachments:
    AC TEST PANEL.vi ‏524 KB

    Since you are using a State machine approach, I would suggest to keep that idea and add the Analyze state to keep the code organized. Plus, you can add a shift register to pass around the acquired data which will be more efficient than reading from the TDMS file.
    For future reference, when using the state machine while you analyze, log, etc...you are forcing sequential execution and loosing time that can be used for hardware I/O. When this becomes a concern you can implement the following structure. Keep up the good work
    Alejandro | Academic Program Engineer | National Instruments

  • How to store data (in tdm files)

    I'm looking for advice on how to store data in tdm/tdx files.
    The main challenge is like this: At regular time intervals there is new data available (say every 10 minutes there are 10 minutes of new data available). All data is time based. So every ten minutes I may create a new tdm/tdx file containing this data segment. However, when i want to analyze the data i dont necessarily want to view 10 minutes of data from all channels, but maybe 20 hours of data from one particular channel.
    The way I've achieved this so far is to manually load each 10 minute segment of this particular channel and then add these parts together. This is both time consuming and cumbersome. Is there a better way to do this that I've simply not discovered yet? Is there a better way to store data to simplify this process?
    One solution is of course to save data from several 10-minute frames in one file, but seeing as there is a never ending supply of data i cant simply save all data in one giant file, it has to be split up at some point, and the problem will still remain.
    One factor to have in mind here is that this is rather large amounts of data (maybe 10GB each day), so the option to simply load all the data into memory goes out the window rather quickly.
    Feel free to ask if I've not made myself very clear

    Hi salte,
    If your test ever ended, and if you had LabVIEW 8.20 or higher, I would recommend using a TDMS file, which handles data appeands flawlessly.  DIAdem 10.1 now also does data reduction and index windowing during file loading for TDM / TDMS / DataPlugin files, so that you could easily load out only the part of the file you wanted to look at.  But since you describe your data acquisition as never stopping and amassing 10 GB per day, I agree that it would be impractical to use only 1 data file.  So we are stuck with some number of files which each contain a part of your measurement.  This approach can have advantages, since you can save operational properties for each "buffer" such as average value, dominant frequency, ambient room temperature, etc., and later on you can use the DataFinder to query out only the data buffers which meet specific conditions based on these properties.  The problem remains to load and assemble data based on multiple files.  This is an old problem in DIAdem, and one for which I have an efficient and I hope satisfactory workaround application.  It does what you describe already doing in the minimum amount of time and with the minimum amount of user interaction, and it can be highly parametrized to suit your particular situation.  The ideal way to start the application would be as part of a ResultsList custom menu.  This would enable you to query out the buffers you wanted, highlight those rows in the ResultsList, right-click and choose your custom menu, and WHAM! the selected buffers for your queried channel(s) are automatically appended together in the DataPortal.  Launching from a ResultsList custom menu would mean that you could skip the file dialog and just read out the data sources directly from the ResultsList selection.
    Let me know what you think,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Importing Data from Multiple DataPlugin Files.zip ‏198 KB

  • Prepopulating PDF Fillable Forms with data from XML files

    How can I get a PDF fillable form to open pre-populated with data from an XML file automatically? I've been using Adobe Standard 9.0 and am willing to upgrade in a modest fashion if necessary. I am aware of the Navigation method > Forms > Manage Form Data > Import Data. This works fine, however, my users are not smart enough to do tis much clicking and selecting. Is there an automated way to have this XML data merged into the PDF file on the fly. These files will reside on an internal local area network and will be operated on local PC's that will probably have Acrobat Reader ONLY. I have been told that the only way to accomplish this is through Java Scripting. I would prefer to do this the 'old fashioned' way of command line switches, but that does not appear to be an option. Does anyone have a sample Javascript that would accomplish what I am trying to achieve. Any help would be greatly appreciated.

    Hi Sharon
    The easiest way is:
    - Open your PDF form within Acrobat
    - From the File menu, import the XML form data into the form
    - From the File menu, use Save As... to save the file with a new name.
    The new PDF will be identical to the original one, but will have the data embedded in it. Voila.
    If you want the same form to pre-populate with different XML files depending on the circumstances, or if you're generating the XML on the fly, then things get more complicated. (And more expensive.) As your consultant said, LiveCycle Forms is one option, but it is expensive (actually even more than 10K). There are other options, including Cold Fusion, custom servlets, etc.
    Howard
    http://www.avoka.com

  • How to auto save output with date added to file name, and email the results?

    Hi,
    We found a script to capture disk space usage, that automatically places the results into an Excel file. We would like the script to autosave this file to a specific directroy with the date ran as part of teh file name. We would then like these results to
    be emailed to us if possible. (also if possible to highlight cell in red that is 5% OR less available disk space would be great)
    Here is what we have:
    $erroractionpreference = “SilentlyContinue”
    $a = New-Object -comobject Excel.Application
    $a.visible = $True
    $b = $a.Workbooks.Add()
    $c = $b.Worksheets.Item(1)
    $c.Cells.Item(1,1) = “Machine Name”
    $c.Cells.Item(1,2) = “Drive”
    $c.Cells.Item(1,3) = “Total size (GB)”
    $c.Cells.Item(1,4) = “Free Space (GB)”
    $c.Cells.Item(1,5) = “Free Space (%)”
    $c.cells.item(1,6) = "Name "
    $d = $c.UsedRange
    $d.Interior.ColorIndex = 19
    $d.Font.ColorIndex = 11
    $d.Font.Bold = $True
    $d.EntireColumn.AutoFit()
    $intRow = 2
    $colComputers = get-content "C:\Servers.txt"
    foreach ($strComputer in $colComputers)
    $colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
    foreach ($objdisk in $colDisks)
    $c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
    $c.Cells.Item($intRow, 2) = $objDisk.DeviceID
    $c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
    $c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
    $c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
    $c.cells.item($introw, 6) = $objdisk.volumename
    $intRow = $intRow + 1
    $d.EntireColumn.AutoFit()
    cls
    Thank You

    Hi Phorbin1128,
    The script below amy be helpful for you to save the Excel file with date in filename, and send email with the attachment of the excel report.
    $erroractionpreference = “SilentlyContinue”
    $a = New-Object -comobject Excel.Application
    $a.visible = $True
    $b = $a.Workbooks.Add()
    $c = $b.Worksheets.Item(1)
    $c.Cells.Item(1,1) = “Machine Name”
    $c.Cells.Item(1,2) = “Drive”
    $c.Cells.Item(1,3) = “Total size (GB)”
    $c.Cells.Item(1,4) = “Free Space (GB)”
    $c.Cells.Item(1,5) = “Free Space (%)”
    $c.cells.item(1,6) = "Name "
    $d = $c.UsedRange
    $d.Interior.ColorIndex = 19
    $d.Font.ColorIndex = 11
    $d.Font.Bold = $True
    $d.EntireColumn.AutoFit()
    $intRow = 2
    $colComputers = get-content "C:\Servers.txt"
    foreach ($strComputer in $colComputers)
    $colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
    foreach ($objdisk in $colDisks)
    $c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
    $c.Cells.Item($intRow, 2) = $objDisk.DeviceID
    $c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
    $c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
    $c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
    $c.cells.item($introw, 6) = $objdisk.volumename
    $intRow = $intRow + 1
    $d.EntireColumn.AutoFit()
    $date=Get-Date -f yyyy-MM-dd
    $filename = "D:\test\"+$date+".xlsx"
    $b.SaveAs($filename)
    $a.Quit()
    Send-MailMessage -SmtpServer xxxxxxxxxx -To [email protected] -From [email protected] -Subject "test mail" -Body "file name is: $new_file" -attachment $filename
    For more detailed information about the cmdlet Send-MailMessage, please refer to this article:
    Send-MailMessage
    I hope this helps.

  • Prepopulating PDF forms with data from XML file

    How can I get a PDF form to open pre-populated with data from an XML file automatically? I've been using Adobe LifeCycle Designer 8.0 and there doesn't seem to be a way to do it. The closest I came was to use the ImportData method, but that only lets you specify a data file if the form is signed (certified), which these aren't and don't need to be because we're using them on an internal company web page. ImportData works if there is no file name, but then the user has to navigate to and select the correct file, which we can't rely on our users to do.
    I've researched this problem for days on this and other websites and haven't found an answer (one Adobe advisor suggested purchasing LifeCycle Forms, which is not an option because it's a $10,000 software package and the company wouldn't authorize a purchase that steep). We will buy a less-expensive option if there is one. We'll even hire a consultant if we can find one to who can design a supportable solution. All suggestions will be much appreciated.

    Hi Sharon
    The easiest way is:
    - Open your PDF form within Acrobat
    - From the File menu, import the XML form data into the form
    - From the File menu, use Save As... to save the file with a new name.
    The new PDF will be identical to the original one, but will have the data embedded in it. Voila.
    If you want the same form to pre-populate with different XML files depending on the circumstances, or if you're generating the XML on the fly, then things get more complicated. (And more expensive.) As your consultant said, LiveCycle Forms is one option, but it is expensive (actually even more than 10K). There are other options, including Cold Fusion, custom servlets, etc.
    Howard
    http://www.avoka.com

  • Write RAW buffer (binary data) to OS file

    Hi there,
    It is easy to insert BLOB data into a BLOB-column of a table from a BFILE. But how can a do the other way around? That means:
    Read the BLOB (maybe into a variable 'buffer RAW(...)') and write it into a binary file? As I know, the UTL_FILE package only supports ascii files.
    The following demo example works to display the raw-data on the screen:
    CREATE OR REPLACE PROCEDURE displayLOB_proc IS
    Lob_loc BLOB;
    Buffer RAW(255);
    Amount BINARY_INTEGER := 255;
    Position INTEGER := 1;
    BEGIN
    /* Select the LOB: */
    SELECT Photo INTO Lob_loc
    FROM testblob WHERE id = 1;
    /* Opening the LOB is optional: */
    DBMS_LOB.OPEN (Lob_loc, DBMS_LOB.LOB_READONLY);
    LOOP
    DBMS_LOB.READ (Lob_loc, Amount, Position, Buffer);
    /* Display the buffer contents: */
    DBMS_OUTPUT.PUT_LINE(utl_raw.cast_to_varchar2(Buffer));
    Position := Position + Amount;
    END LOOP;
    /* Closing the LOB is mandatory if you have opened it: */
    DBMS_LOB.CLOSE (Lob_loc);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE('End of data');
    END;
    What should be inserted instead of DBMS_OUTPUT.PUT_LINE(...).
    Please help
    Peter

    >I have discovered that I just posted the same question.
    Please annote your other post as such.
    >Does DBMS_UTIL 9.2 run under Oracle 8i?
    UTL_FILE (not DBMS_UTIL), and 9.2 = Oracle9i Database Release 2. So, no. You will need to implement an external procedure via c or java to get you home with 8i. Search this forum (as best as you can) for the multitudes of such solutions.
    >Where can I locate some of the sameple code that you mention?
    I have none handy, yet. You can read all about it @ http://tahiti.oracle.com
    Michael O'Neill
    Publisher of the PigiWiki
    clever-idea.com

  • File Adapter : read XML file with data validation and file rejection ?

    Hello,
    In order to read a XML file with the file adapter, I have defined a XSD that I have imported to my project.
    Now the File Adapter reads the file correctly but it does not give an error when:
    - the data types are not valid. Ex: dateTime is expected in a node and a string is provided
    - the XML file has invalid attributes.
    How can I manage error handling for XML files ?
    Should I write my own Java XPath function to validate the file after is processed ? (here is an example for doing this : http://www.experts-exchange.com/Web/Web_Languages/XML/Q_21058568.html)
    Thanks.

    one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
    <partnerLinkBinding name="StarLoanService">
    <property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>
    hth clemens

  • How to initialize Object  Array Data Provider (OADP)with data from txt file

    Hi,
    I want to show in a table some columnar data from a txt file. I ran the creator demo application on OADP successfully. http://blogs.sun.com/divas/entry/using_the_object_array_data
    I created a javabean class to read a txt file.However, I am stuck at how I can fill the data into an OADP array:
    I am familiar with C extensively but not much at java. can anyone help??
    thanks..
    dr.am.mohan rao

    Thanks for that. I changed it a little bit, but when i ran this script, got ORA-06532: Subscript outside of limit.
    declare
    O_voucher_comment SYSADM.AP_COMMENT_COLL := sysadm.ap_comment_coll(null);
    begin
    FAS_AP_EXCEPTIONS.GET_VOUCHER_COMMENTS('FCCAN', '20494753', 0, 'KEHE', O_voucher_comment);
    end;
    PROCEDURE get_voucher_comments (
    v_bu_in IN VARCHAR2,
    v_voucher_in IN VARCHAR2,
    v_line_in IN NUMBER,
    v_userid IN VARCHAR2,
    voucher_comment OUT      sysadm.ap_comment_coll
    IS
    i NUMBER := 1;
    v_comments VARCHAR2 (254) := ' ';
    comment_type sysadm.ap_comment_type;
    v_line_num NUMBER := 0;
    CURSOR get_all_comment
    IS
    SELECT voucher_line_num, descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in;
    CURSOR get_line_comment
    IS
    SELECT descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in
    AND voucher_line_num = v_line_in;
    BEGIN
    --voucher_comment() := SYSADM.ap_comment_type (NULL, NULL, NULL, NULL, NULL, NULL);
    --' ', ' ', 0, ' ', '', ' ' sysadm.ap_comment_coll
    voucher_comment := sysadm.ap_comment_coll(null);
    IF v_line_in = 0
    THEN
    OPEN get_all_comment;
    LOOP
    FETCH get_all_comment
    INTO v_line_num, v_comments;
              if i > 1
              then
                   voucher_comment.EXTEND;
              end if;
    voucher_comment (i) := ap_comment_type (v_bu_in,
    v_voucher_in, v_line_num, v_userid,
    TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS'), v_comments );
    i := i + 1;
    END LOOP;
    ELSE
    OPEN get_line_comment;
    LOOP
    FETCH get_line_comment
    INTO v_comments;
              voucher_comment.extend(6);
    voucher_comment (i) := ap_comment_type (v_bu_in, v_voucher_in, v_line_num, v_userid, TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS' ), 'DD-MON-YYYY HH24:MI:SS'), v_comments);
    i := i + 1;
    END LOOP;
    END IF;
    END get_voucher_comments;

  • Problem with Data load from file

    Hi,
    if i try to load data from an comma seperated file into oracle, i get an error that the page cannot be displayed, after the dialog where to specify the file and the separation method.
    My Browser does not try long to open the page approx. 1 sec. ...
    Anyone have a Idea about that ?
    P.S I know my englisch is horribile, sorry

    A known bug. See below for a solution to set the timeout. Remember to reboot the PC for the changes take effect.
    See Re: Problem with importing HTML DB applications

  • Compare table data with data in csv file

    Hi, I have a database table with ~32 milj rows. I want to compare the data from a csv file(~ 1500000 rows) with the data in a specific database column. And as a result I want to see what rows exists in both the csv file and db and what records in csv file are unique. The text I'm searching for is VARCHAR2. I am not allowed to export the database table so that's not an alternative. This is also a production environment so one need to be careful not disturbing the production.
    Rgds J

    2c0eaa24-46c9-4ff7-9f01-564f37567899 wrote:
    Hi, I have a database table with ~32 milj rows. I want to compare the data from a csv file(~ 1500000 rows) with the data in a specific database column. And as a result I want to see what rows exists in both the csv file and db and what records in csv file are unique. The text I'm searching for is VARCHAR2. I am not allowed to export the database table so that's not an alternative. This is also a production environment so one need to be careful not disturbing the production.
    Rgds J
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002
    Does CVS fille reside on DB Server system now?

  • Export Waveform Chart Plots data to spreadsheet file based on X scale (Time Stamp) min and Max Value

    Hi All,
    Query 1:I am trying to export the Chart data(Total plots 6 ) only between the X scale Min Time and Max time limit .
    But couldnt able to achieve that progammtically.
    is their anyway to achieve this.
    Query 2:Also ,In chart their is an  right click option to export data to excel,but when using this option the data get exported in its own temporary name(iv*****.tmp),i dont want this to happen.Instead the data expored using that option should be written in a file specified by me(everyting should happen in backend)
    pls suggest the best solution for above 2 queries.
    Thanks,
    Selvan.

    Hi selvan,
    1) read the chart history (or better keep a history in your own shift register) and limit the data to the XMin and XMax values (read all those chart settings from its properties). Then save the data using WriteToSpreadsheetFile…
    2) The right-click option is as it is. When you need different behaviour you need to program your own routine. Once you finished query 1 it will be no problem anymore to also solve query 2…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • SM 35 Session log with data in flat file.

    I have created a session from a flat file using LSMW, after running the session through SM35 is there a way by which I can get the details of data loaded in the log of SM35.
    Example I am loading SAP HR data to infotypes but the SM35 log gives index value in the flat file rather than actual employee number (PERNR) uploaded on printing the log.

    No That is not possible.

  • I write digital port by 'DAQmx Configure Logging.vi​' and receive TDMS file with 8 boolean channels. How can I write to 1 integer channel?

    Hello!
    I want to write 1 digital port from PXI-6536 with streaming to TDMS file.
    I'm writing by 'DAQmx Configure Logging.vi' and become TDMS file with 8 boolean channels.
    How can I write to 1integer channel?
    Attachments:
    1.JPG ‏27 KB

    Hey Atrina,
    The actual data stored on disk is just the raw data (that is, a byte per sample in your case).  It's really just a matter of how that data is being represented in LabVIEW whenever you read back the TDMS file.
    I'm not sure if there is a better way to do this, but here is a way to accomplish what you're wanting:
    Read back the TDMS file as a digital waveform.  Then there's a conversion function in LabVIEW called DWDT Digital to Binary.  This function will convert that set of digital channels into the "port format" that you're wanting.  I've attached an example of what I mean.
    Note: When looking at this VI, there are a few things that the downgrade process did to the VI that I would not recommend for these TDMS files.  It added a 1.0 constant on the TDMS Open function, and it set "disable buffering" on the TDMS Open function to false; you can get rid of both of those constants.
    Message Edited by AndrewMc on 01-27-2010 11:21 AM
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    digitalconvert.vi ‏13 KB

Maybe you are looking for

  • Register updation in SAP

    Hello Experts, My client has implemented SAP in 2007 and from there they have not yet updated any register in the system,now they want to update RG23A, RG23C and RG1 so which are things I need to take care of. I know how to update the registers, how

  • Oracle SQL Developer 1.5.5 Unable to save data in nvarchar2 column

    If I change the contents of a column in a table with Data Editor i get this when trying to save change: UPDATE "ADMIN"."T_AZIENDA" SET DESCRIZIONE = 'PIPPO' WHERE ROWID = 'AAAMrpAAEAAAI0XAAA' AND ORA_ROWSCN = '556217' One error saving changes to tabl

  • Lead time reffering to open SO- - -***** URGENT ***

    Hello When we create a brand new PO, the materials due date should be automatically calculated using the  materials standard Lead Time.  For example, if we are to create a PO on 10/1/07 for a part that has standard Lead Time 65 days, the materials du

  • Discoverer Security

    Hi! We are in the process of installing an Oracle-based application. We have tightly controlled access to the database by using the Application's security which is tied to Oracle's. When we use Discoverer Plus, we are dumbfounded to find that the dat

  • Erro when creation Purchase Invoice

    Hi , when creating a new Purchase Invoice , we have a message : Incorrect Syntax near '000000' ( OIVL ) we do not have queries , nor add on . and it's the first time we got this message if someone can help me , thanks regards laurent