Storing Waveforms

I am designing a new laboratory database. I want to store the raw results for all tests together. However, results can either be a single measurement or a raw waveform.
Which case below is ideal (and why)? ... or provide your own ideal option.
TEST
  test_id*
  (other TEST fields)
OPTION 1: Separate single values and waveform results
    TEST (1 -- many) MEASUREMENT
         ( \-- many) RAW_HEADER 1 -- many RAW_POINT
    MEASUREMENT             RAW_HEADER
      measurement_id*         raw_header_id*
      test_id (FK)            test_id (FK)
      rec_time as DATE        start_time as DATE
      measurement             sample_rate
                            RAW_POINT
                              raw_header_id* (FK)
                              point_index*
                              raw_measurement
OPTION 2: Overlap common fields from OPTION 1
    TEST (1 -- many) MEASUREMENT (1 -- many) RECORDING_POINTSame as OPTION 1 except:
    <tt>MEASUREMENT</tt>: <tt>measurement</tt> for signals is the sample_rate
    <tt>RAW_POINT</tt>: <tt>raw_header* (FK)</tt> changed to <tt>measurement_id* (FK)</tt>
    <tt>RAW_HEADER</tt>: not needed
OPTION 3: Encode signals into <tt>BLOB</tt>
    TEST (1 -- many) MEASUREMENT
    MEASUREMENT
      measurement_id*
      test_id (FK)
      rec_time as DATE
      measurement
      signal as BLOBFor a single value <tt>measurement</tt> is the measurement and <tt>signal</tt> is <tt>NULL</tt>
For signals <tt>measurement</tt> is the sample_rate and <tt>signal</tt> stores the encoded data points
Legend:
<li><tt>__*_ </tt> Fields followed by an asterisk are
the complete primary key.
<li><tt>(FK)</tt> Fields followed by <tt>(FK)</tt> indicate field has foreign key constraint.
<li><tt>____</tt> All fields are of type <tt>NUMBER</tt> unless otherwise specified.
FYI:
In my own opinion:
I like Option 1 because it separates the single values and signals. I could even add a raw_point_id and store the number of data points in the RAW_HEADER to access the data in both directions.
Option 2 which combines common fields to put everything in one place.
Concerning Option 3, and correct me if I'm wrong. It would be difficult for Oracle (rather than the program retrieving) to decode the raw data stored in the BLOB to use in other calculations
Edited by: StevenATK on Jun 29, 2009 3:20 PM

delete this edit.

Similar Messages

  • How to acquire reference waveforms from Tektronix oscilloscopes

    Hi,
    I want to acquire stored waveforms .wfm from oscilloscope to LabVIEW for analysis purpose.I tried by using Tek scope drivers,but gives error. what is the appropriate way to do it. Plz help...
    Thanks in advance.
    sayaf.

    Use Tektronics Programer Manual. Find All GPIB commands and there find what command to acquire waveforms. Usually, you write GPIB command and read response from Tek.

  • Timestamps overwritte​n, Error 1074115594

    Hey everyone,
    I'm back with another enigmatic error.    My 5152 is currently set to collect and store a large number of waveforms, then fetch them only when enough are collected to fill a large 2D array in LabVIEW. 
    At the moment I am filling a 750x220 array -> 165,000 entries.  After the first fetch,  I am receiving Error -1074115594 which is along the lines of "Timestamps have been overwritten, data cannot be read". 
    In talking with NI support,  the cause of it stems from the digitzier:  the number of timestamps (which are collected for every acquisition) are limited at 100,000.  After 100k entries, additional timestamps overwrite the old ones.  This is not a common error, though, and they have little additional information.
    I'm not sure if this is a limitation of the 515x series or my 5152, but the hard 100k limit makes it seem that the timestamps are stored separately from the waveforms. I was hoping that someone could help shed light on this issue:
    1.  Are the acquisiton timestamps stored separately from the waveforms?
    2. Where/how does this occur?
    3.  Is there any work-around? (property nodes, disabling timestamps, etc)?
    The stored waveforms are only 133 bytes each, so 133 bytes x 165,000 waveforms = 21MB.  My scope has 128MB onboard memory, so I should not be in a danger zone for overflowing my onboard acquisition memory.
    What makes this frustrating is that I have been successful in collecting this volume of data before.  However, I have since started to "clean up" my code, and....we know how that goes.  Any ideas how I may have been able to store and fetch this much before?
    I'm hoping someone can chime in and offer some more insight as to the root of the issue and whether there is anything I can do to get around this.
    Many thanks,
    jm

    Hi JM,
    The timestamp data is in fact buffered separately from the records and 100k is the limit for the number of "unfetched" records to reside on your digitizer, even if you have sufficient memory as the records are small.  This information is documented in the "Waveform Specification" information in your NI-5152 Device Specifications.
    The good news is that the error is very easy to work around.  In the case of 165k records, you could for example make two fetch calls, each requesting 82.5k records. The properties of interest are "number of records to fetch" and "fetch record number".  You would set the first parameter to 82.5k, and the second would increment after each fetch (i.e. initially be 0, then increment to 82.5k).
    This should avoid the timestamps overwritten error you are seeing.  If not, please share some information on the trigger rate you are testing with.
    - Jennifer O.

  • Need help in transmitting TV signals thru an IR Led via mydaq

    Hi,
    I currently have this project that uses mydaq to receive the TV remote signals and stored in a measurement file.
    I have come to the stage where i can store the demodulated signal via IR receiver in a text file. However, I have difficulty in transmitting the signal thru the IR Led that is connected to ao1. I have already multiplied the stored waveform with a 38khz carrier frequency square wave. Can anyone help me on this?

    What kind of problems are you having?  Do you get errors? Does the TV always switch to "I Love Lucy" reruns? What kind of amplifier/driver are you using for the LED? The myDAQ AO lines are limitied to 2 mA, which is at the low end for driving an LED.
    Are you using the correct modulation scheme? The Philips RC-5 code, for example, would not be generated by multiplying a waveform by a carrier.  The myDAQ anaolog output is fast enough to generate this signal, but I do not know if the timing can be set to the exact frequency required.  The pulse is specified at 6.94 us.
    Lynn

  • How can I control AWG2021?

    I'm trying to control tektronix AWG2021 using GPIB with labview, but the library for 20XX or for 40XX don't seem to work well with this device... anyone knows a better resource?

    Ihsan wrote in message news:<[email protected]>...
    > I'm trying to control tektronix AWG2021 using GPIB with labview, but
    > the library for 20XX or for 40XX don't seem to work well with this
    > device... anyone knows a better resource?
    I've actually written code to control the AWG2020 and AWG2021 series
    waveform generators in the past. It's not very hard if you can get
    the manuals. The protocol is SCPI based like a lot of these test
    instruments.
    Basically there are few commands for setting up clock rates and
    loading pre-stored waveform files in the system and activating them.
    I used the AWG2021 as a source for digital modulation patterns for
    testing Agilent Technologies ESG443x series signal generators w
    hich
    could use external waveform sources or their own internal generators
    while I worked for Motorola CE in Plantation FL.
    If you have a commercial project please send me an email and I will
    send you my resume.
    Douglas De Clue
    Miami Florida,
    [email protected]

  • Analysing waveform for digital values stored in a file

    i have certain digitals values obtained in a file in .txt format.
    i have to obtain a waveform by giving the input as these digital values in that file.
    I have programmed for array input manually.
    But the waveform analysis should be made such that it do analyze automatically by taking the values stored in the file.
    The values are stored as like follows-
    0.00159
    0.01432
    0.01654
    0.15432
    etc
    Give me a module to do this task.

    Use the Read from Spreadsheet file and then just connect it to a waveform chart. This will do what you need. Post back.

  • Storing Digital Waveform using HWS

    Hi there,
    I'm trying to store digital waveforms using HWS which works as long as my waveform contains only 0s and 1s. As soon as I'm using signals like Xs or Zs in my waveform, the VI refuses to work, telling me it's only able to save only 0s and 1s which is not enough for me, since I need the other values as well..... is there any workaround apart from writing my own file format?
    Thanks in advance
    Oli
    Programming languages don't create bad code, programmers create bad code....

    I know this post is over 5 years old, but since I had to dig into this, I thought I would add some content to clarify. The Store functions that use numerics can only store 1s and 0s. As discussed in the article Digital Waveform Data Representation, "The WDT is required when you use more than the 0 and 1 states in a waveform, for example, if your waveform includes Z's, X's, H's, or L's." You must use the digital waveform for storing this feature, so try the Store function that writes from a waveform data type.
    - Regards,
    Beutlich

  • I am trying to acquire several cycles of a waveform and save it to an excell file.

    Only one or two (I don't remember which) of the values shows up on the excell spreadsheet, the spreadsheet remains otherwise empty. I know that the waveform is being captured by the DAQ because it is graphed, and it looks fine. If someone could point to where I have gone wrong and offer some suggestions, I would greatly appreciate it. Also, if there are some obvious indications that I am missing some necessary understanding of what is going on within my vi, feel free to enlighten me.
    Thanks for all your help.
    Attachments:
    Acquire_N_Scans_save_to_ss.vi ‏87 KB

    The reason is that you are trying to wire a 1D arrray of WDT (waveform data type) to the file box. WDT is a special data structure where are stored not only the signal readings but also t0 (the time stamp = date of the first data point) and delta t (the time increment between to points). You need to reorganize the data before saving to a file. Use the "get waveform components" (in the waveform subpalette) to separate the time stamp from the data.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How can I convert an array to a waveform in signal express

    hello friends,
    I have imported a labview VI in signal express. After processing the data in VI , I have stored the result in a form of array. Now I want to see this array in a form of waveform in signal express. How to go about it. 
    Vipin

    Sorry, this is the kind of thing that happens when you have been out for too long.
    Message Edité par chilly charly le 10-22-2006 11:09 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    array%20to%20image[1].png ‏3 KB

  • How to queue two waveforms in dynamic data

    I am collecting two waveforms for voltage data via DAQ assistant. The output is dynamic data which I can view as two waveforms via a chart. 
    I am sending the retrived data to a queue for storage until a seperate loop can flush the queue and write the data to a measurement file via the Write to Measurement File vi.
    When I retrive my measurement file only one of the two waveforms have been stored.
    I have troubleshot the issue and have determined the correct data is going into the queue

    I'd recommend posting some code.  Are you passing in the two waveforms to the queue as an array of waveforms, or a cluster of waveforms?  Without seeing the code, it is just a guess as to what is going on.

  • Writing waveforms from Ch. 0 of niSCOPE to binary file in a multi-record setup?

    Hello,
    I am not very experienced with niSCOPE and writing waveform records, so I need some expert help here.
    Here is my application:
    I am generating a pulse train using a 6602 counter/timer. Each rising edge of this pulse train triggers an niFGEN to generate a single sawtooth waveform output to another device and, at the same time, acquiring data from Ch. 0 of an niSCOPE. I am fetching one record per rising edge of the pulse train for the niSCOPE (multi-record setup).
    The attached VI is where I am at thus far. All triggering and reading/fetching of the waveforms seems to be working just fine when testing with an oscilloscope. I now need to save each waveform record along with the timestamp of its rising edge trigger to a binary file. The bottom of the VI is where my attempt is at saving the waveforms to a binary file, so the attention should be there when looking at it.
    I am running LabVIEW from a computer connected to the NI PXI-Chassis using a cross-over cable.
    Questions:
    1.) Do I need to convert the data coming in on Ch. 0 of the niSCOPE to digital? Does it come in as analog from an oscilloscope? If I need to do this, how can I accomplish this?
    2.) When I try to run an example VI to write a waveform to a binary file by choosing "My Computer" in the bottom left of the VI window, it works it saves the file just fine. When I change this to run on "PXI2", a file is not even created and I get an error on File Dialog (code# 7, I think) each time the file is attempted to be closed. This may be a stupid question, but why can I not save data to a file on my computer if running the VI on "PXI2"?
    3.) Assuming the saving of each waveform to a binary file is working (read: (2) is successfully addressed), how can I also write the timestamp of the starting trigger for the waveform along with the waveform in the binary file? An example VI of how I can accomplish this would be fantastic, but I haven't been able to find one thus far.
    4.) When I was messing around and trying to accomplish this, it seemed that doing this writing may slow down the entire process too much. I need to record data to the extent of the sawtooth waveform generated by the niFGEN AWG for each trigger. Is there any changes I should make to my acquisition process in the niSCOPE section so that I can read each waveform, along with keeping the timestamp for each, and write this information to a binary file?
    I need to get this working quickly, so any help on this is greatly appreciated. Thanks in advance.
    Attachments:
    5124_update.vi ‏157 KB

    Thank you so much for your reply, David. Let me try and explain my
    situation and setup a little better, as well as discuss the points you
    made in your reply. Beware, you may want to refill your coffee as this
    post is long .
    I am using an embedded controller in a PXI-1044 chassis. I now have the
    chassis hooked up to our local network, and I am deploying my project
    to the chassis over the network as I am also connected to the local
    network. I have an oscilloscope next to me that takes as input the
    pulse train for a trigger and the generated sawtooth from the niFGEN
    for each trigger (rising edge of the pulse train from the 6602
    counter). Just to make sure synchronization is taking place, the
    sawtooth is also fed as input to the niSCOPE for acquisition.
    "PXI2" is what shows up when I choose to run a VI on the PXI chassis
    rather than "My Computer"; not sure why the 2 is there either, but that
    is what it says. I may have tracked down the issue I was having with
    writing, but more about that a little later...
    The attached VI is an update, although not much has changed. My
    application design is like this (keep in mind that some values for VI's
    are still constants in the block diagram while others are controls on
    the front panel): I am using the 6602 to generate a 1 KHz pulse train
    and routing this pulse train to PXI_Trigger0/RTSI0. I am also using the
    PXI_Clock (10) as a sample clock for this, and also using this same
    clock as the reference clock for both the 5422 and the 5124 (as per the
    synchronization help file mentioned for synchronizing multiple
    devices). Both the 5422 and the 5124 are triggered by a digital rising
    edge (from the pulse train) on PXI_Trigger0/RTSI0 (as it was routed
    there). For each trigger, the niFGEN generates a sawtooth waveform
    using a stepped trigger mode and outputs it. For each trigger, the
    niSCOPE acquires data. They are both synchronous, which is tough to see
    since one has its trigger source on the front panel and the other has
    its trigger source on the block diagram. All devices use PXI_Clock so
    they are synchronized.
    The expected behavior is to only generate a single sawtooth waveform
    per trigger with a certain number of sample points. I want to acquire
    the same number of samples using the niSCOPE, which is what I meant by
    "the extent of the waveform" in my previous post. So, should I change
    the 8192 to 1000 for the number of samples for the niSCOPE? What would
    you recommend for the sampling rate? I have been using 5 MHz for the
    niFGEN and 5 MHz for the niSCOPE...this is how it should be done,
    correct? If it is different in the VI, please let me know. For some
    reason, I have to adjust all of the values each time I open it since
    the default values are not the ones I want.
    I want to generate and acquire one waveform per trigger (one waveform
    per record). However, I want to be able to record a large number of
    records so I have enabled the circular buffer-like treatment of the
    acquired waveforms. The 100 or 1000 records is actually just a number I
    am giving it for now to make sure it is working before recording many
    more records.
    As for saving the niSCOPE data, I would like to save all data in a
    single file that is NOT ascii (to save space). I have been looking at
    the HWS file format, and would like to use it. I think the attached VI
    includes this at the bottom of the while loop. For each trigger, I
    would like to save the time (as accurate as possible) that the trigger
    occurred for the record/waveform, which appears to be (absoluteInitialX
    - relativeInitialX) as you said in your post (thanks!). I just need to
    store as much information about the waveform and time information for
    it as possible with the waveform in the file. So it looks like I will
    need to use the wfm info for that information, providing portions of it
    as waveform attributes in the HWS VI's?
    What format of data do you recommend I fetch, and will I be fetching a
    "Single waveform" or "Multiple waveforms"? Should I use I32, DBL, WDT,
    or other for the format? A balance between good precision in values and
    time it takes to fetch/record would be best.
    Given all of the above, I am having one troube with saving data to a
    file. As a reminder, I am deploying the project to the chassis over the
    network. When I choose a location and/or file to save the HWS data to,
    I only get choices that are on the PC's hard disk (such as C:\Documents
    and Settings\cgifford\...) NOT the chassis's hard disk. When I choose
    something other than "C:\" I get an error that the file could not be
    opened. However, when I choose "C:\" everything goes fine. The saved
    data is nowhere to be found on my PC though, so I am assuming that it
    is being stored on the internal 60G hard disk in the chassis that must
    be named "C" by default or something!?
    I have been told by phone support that I should be able to make a
    direct connection with the chassis just like another PC, and should be
    able to access the information on its internal hard disk in a drag and
    drop fashion. I however cannot directly connect to the PXI chassis to
    get the data that has been saved on the hard disk. We are running
    Windows XP on the PC. We did some poking around and noticed that the
    chassis is not running Windows file sharing, and only has ftp and http
    running. We tried to access it using ftp, but we didn't have a username
    and password to supply it. So, how can we enable Windows file sharing
    on the chassis? How can I connect to it to do drag and drop to get
    saved waveform data off of it? This is the main problem I am now
    facing. Eventually we would like to store data to an external hard disk
    connected to the chassis, which assumes that I can have access to the
    internal storage to tell it to save files to the external hard disk.
    For now saving it to the internal hard disk is just fine until
    everything is proven to work, but I would like to get the data off of
    the internal hard drive to put on another computer.
    Any answers/suggestions on my above questions are greatly appreciated.
    I also want to thank you for reading this long post . I eagerly await
    a reply. Thanks again in advance.
    Chris
    Attachments:
    5124_update.vi ‏143 KB

  • How to retrieve a hosstory data waveform

    Hi,
    I want to show the temperature waveform in labview5.1.This is a real-time system.My problem is:The waveform may be changed as time goes.I want to compare the current and the history waveform in the same graph.The detail is,the temperature curve is shown when the program runs.when necessay,I push a button in the front panel,the waveform will be freezed(keep still)in the graph as a history record,The current waveform can be compared with it.When I push the button again,the history data curve will dissappear.Then there is only one curve in the graph.I have tried with property node,but I have no idea how to realize it.If I do not use transparent graph.Could you do me a favor so that I can finish the little tproject?
    Thank you very much.
    mary

    If you actually wire data to a graph, it will be displayed. The solution you are using now in which the history data plot is made transparent so that it is not visible is a feasible solution for you. Another way would be to actually change the data that is being sent to the graph. In other words, we can set it up so that normally, only your temperature plot is graphed. But if you hit a button, a history plot can be added to the data being graphed. This can be done by storing the history data in a shift register and adding it to the plotted data using a build array when necessary.
    Keep in mind that you may not want to do all of this on the RT machine. You might want to create a separate application which will run on your host computer to act as
    the user interface so that it will not affect the operation of the RT system.
    Attachments:
    Graph.vi ‏50 KB

  • Read waveform file from .mat file and perform filtering

    I have a sample waveform stored in matlab (.mat) and would like to perform various filtering after reading it. I am able to read and view the the waveform on a Waveform graph, but unable to do any filtering.
    Can somebody help suggest a way to read the .mat file, perform low pass filtering and display it on a graph ?

    Hi Lynn,
    Attached is the vi and the sample data .mat file.
    regards,
    Prakash
    Attachments:
    Read MATLAB File.vi ‏58 KB
    sigcor1.zip ‏178 KB

  • How to export more than 100 points from waveform to excel

    Hi everyone. Novice here. 
    I'm pretty sure other people had my problem, but I don't know how to word it... and can't find a solution for it... Maybe I just don't understand Labview enough to know what's going on.
    Here's what I'm doing: I have a waveform, and I'm trying to save the data to the spreadsheet.
    Problem: The cap is at 100 data plots (only what's shown on the graph). In other words, I only get data for what the graph holds at the present moment.
    Want: I want more than that - EVERYTHING. If it begins from 0s to 50s, I want all the points (10ms increments, which is done already) on the excel file.
    Can you guys help me? How do I get suck that history out of the graph?
    I attached my labview file (a really simple one), so you guys know where I am.
    Thanks guys!
    Solved!
    Go to Solution.
    Attachments:
    Save to spreadsheet.vi ‏17 KB

    If you are not in a hurry, another option is to save the data as a delimited text file. This will allow you to open it in almost any analysis program, since a delimited text file is the universal file type. A delimited text file is one in which data is stored in columns, separated by delimiters, and rows, separated by lines of text. The delimiter is usually a tab character (file extension .txt), but a comma is common in some industries (file extension .csv). Note that using a comma separator can get you into trouble if using European numbering styles, which use the comma instead of the period as the decimal indicator.
    LabVIEW has several VIs that make this easy for you.
    If you have a single set of homogeneous data and are only writing once (NOT in a loop), then use Write to Spreadsheet File.vi. This VI formats your data into rows and columns, opens the file, writes the data, then closes the file. Since it opens and closes the file, it is not suitable for use in a loop.
    If you are writing homogeneous data in a loop, use the Array to Spreadsheet String function at each iteration to format your array of data to rows and columns, then write using either of the file write primitives.
    If you have inhomogeneous data, such as a timestamp and a few doubles, format the data on a line by line basis and write to disk. The attached example, SImpleLowLevelWriteSpreadsheetFile.vi shows how to do this.
    If you need more speed, you can buffer your data so the blocks of data you send to disk are more optimized. This is a bit more complex, but the attached example, BufferedLowLevelWriteSpreadsheetFile.vi shows how to do it. This will usually give you at least 2X and could be 10X or more speed improvement.
    Have fun!
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    SimpleLowLevelWriteSpreadsheetFile.vi ‏22 KB
    BufferedLowLevelWriteSpreadsheetFile.vi ‏34 KB

  • Offline Waveform Measuerments

    Hey All,
    I have a slight problem here. Just look at  "pulse and transition measurements.vi" example provided by NI in LabVIEW. I want to slightly modify this VI and use this in my Project.
    I am capturing a waveform (lets assume for 10 cycles) from the Function Generator using DAQmx and storing as a binary file. I want to use this data into "pulse and transition measurements.vi" and take the readings.
    When I put this data it shows this error
    The type of the source is 1D Array of waveform(DBL)
    The type of the sink is waveform(DBL)
    I hope you all must have got what i mean to say. Please let me know if you require any further clarifications.
    Thank you
    Regards,
    Sarang Dhananjay Jaiswal
    Satyam Development Center, Banglore, INDIA

    Hi Sarang,
    It sounds like you are getting an 1D array of waveform data, but the input
    expects simply waveform data.  What that means is you need to somehow
    simply input one of the indices into the VI.  You can use some of the
    Array functions to pull out the particular point you want.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

Maybe you are looking for