Waveform timestamp

I am using DAQmx and I am using the read function with the 1D waveform polymorphic instance. I am simply reading 10 channels of analog voltage data, but the reason I'm using waveform is becuase I need timestamp data for each sample collected. I also need multiple samples, which is why I'm not using single sample polymorhpic instance.
WIth the ten channels, I'm extracting the Y data and then concatenating all the values into one 2-d array where each channel column represents one channel of data. I'm trying to extract the timestamp from the waveform using (get waveform component t0), however, how do I get the timestamp into a form that can be concatenated with the other 1d data? When I convert it to double it just gives me one element and not an array of data. So theres only one timestamp for every like 100 lines of voltage data. 
Please see below code. 
Solved!
Go to Solution.

Hi Dennis, I see what you're saying with using the math operations on the waveforms themselves. However, as you can see below I'm trying to add the single waveform arrays into one 2D array then write to waveform spreadsheet file, where each column represents each DAQ channel. Do you know how I can accomplish this?

Similar Messages

  • How do you begin waveform timestamps at zero?

    I am new to labview, writing my first program.  I am collecting 1000 Hz temperature data, the sample rate of which can be changed on the fly.  I have 12 channels of data, so I get an array of 12 waveforms.  I wanted to get the timing data from just one waveform, so I was able to use the "get waveform time array" vi to collect that information, but it displays the real time (number of seconds since 1903 etc), and I want my timing to start at zero when I begin the vi.  It needs to be accurate to the millisecond.  I thought that I could just subtract the time (in seconds since 1903) of when the vi started from each element of the array and I would then start at zero, but there appears to be some kind of timing error or lag time and the results I get always start the time somewhere between 1.000 and 5.000 seconds, (something like 1.458, etc), which is unacceptable.  I can easily fix the problem in Excel, but if anybody knows a better way around this problem, the help would be greatly appreciated.
    Attachments:
    Welding Program Variable Rate.vi ‏412 KB

    rgehmlich,
    I think the reason you're having trouble getting the timestamp to start at 0 is because the acquisition and the Get Date/Time in Seconds.vi are not happening at the same time. I think the system time is being read at the start of the program, and then the code goes through creating or opening the file, setting up the task, and doing the acquisition and all this probably takes between 1 and 5 seconds (with selecting the file to be opened). What I think would work better is to take the time information of the first waveform from the first iteration of the while loop and subtract that value instead of the Get Date/Time in Seconds value. I've modified your code to do this (and I took out the daq code and replaced it with an express VI since I don't have a daq card in my computer right now) and the timestamps start at 0 for me. Take a look and see if it helps.
    Tyler S.
    Attachments:
    Welding Program Variable Rate[2].vi ‏470 KB

  • 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.

  • Waveform timestamps

    Greetings, All.
    What is the source and accuracy of the timestamp in the waveform data structure if it is acquired with the AI Read function from a DAQ card (PCI-6036E)?
    The PC clock? Something internal that is initially set to the PC clock?
    I'm trying to sync my collected AI data to a signal that is collected via a serial input in a parallel loop. I have set up the AI data to be 2x the frequency of the streaming serial data.
    Using LabVIEW 6.1.
    Thanks-
    -dennis.

    Dennis-
    Yes, the timestamp is taken from the PC system time. So it will only be as accurate as the OS allows it to be (due to time slicing, thread scheduling, etc). Also, it is only in seconds, so you won't be able to get very precise times. If you need accurate analog input data, you should set up your program to acquire hardware timed data. The scan clock of the DAQ device is very accurate. FYI, you can check the specs of your board here:
    http://www.ni.com/pdf/products/us/4daqsc202-204_ETCx2_212_213.pdf
    Hope this helps.
    -Alan A.

  • How to view both real data and timestamp informatio​n in TDM data viewer?

    Attached, I have a VI that uses NI-Scope (NI-5122) to digitize and store data.  I have added some TDMS functions in order to save waveform data in binary format ( our acquisition time is around 3 hours and the files become very large)  As you can see, I am using TDM file viewer to view the data, the problem I am having is that I can only see the voltages and not time stamps.  I am interested in viewing and analyzing timestamped data.  I do see that the graph contains both voltages and timestamps and idealy I would like to see both in the value tab.
    Please let me know what is the best way to see both sets of data. 
    Thanks!
    Attachments:
    niScopeFetchWDT_TDM1.vi ‏55 KB

    The TDMS file does preserve the timing information for a waveform, you can see it if you go to the 'Properties' tab.  The attributes are there to calculate the waveform timestamp data, however, it does not look like the code behind the TDMS file viewer supports displaying the timestamp values in a column on the 'Values' tab.  This seems like a good case for filing a product suggestion.  As for a work-around, if you are set on using a TDMS file and viewing the timing information you would require a custom version of a TDMS file viewer.
    -Bob
    -Bob

  • Waveform time shift

    Using a waveform graph, multiple waveforms are ploted from an ASCII array.
    I would like to 'time shift' one waveform relative to the others.  The 'insert into array' or 'delete from array' effects all the columns of data, I only want to shift one.
    Any suggestions?
    thanks, rh

    victorluo wrote:
    Hi GerdW
    I was trying to shift a time signal by a half period or so and do a substraction between them. But I was stucked here. I can not shift one channel of the signal!! Could you please help me? Thx
    Vic
    Be careful.  There is a setting for the graph under the X Scale to "Ignore waveform timestamp on x-axis".  This is checked by default.  Then you will see your time offset.
    Now, as GerdW said, you need to get the two waveforms under the same time frame.  So you have to remove part of the waveforms in order to subtract.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Waveforms with Time Offset.png ‏36 KB

  • Timestamp incorrect system time

    Hello, Guys,
    Quick question about system time and timestamp inconsistency.
    I used the following program to generate analog output (with duty cycle) but as i am outputting, it give me the time of 12/31/1903 at 16:00.
    I checked and reset the system time and it made no difference.  please advise,
    thank you.
    ck
    Message Edited by uclabme on 04-17-2006 05:18 PM
    Attachments:
    Square_analog_output_voltage.vi ‏91 KB
    abc.txt ‏32 KB

    Hello,
    The square waveform generator VI that is producing the waveform doesn't use system time as its basis, and that appears to be where the issue lies.  By default, the output waveform will be aligned to a t0 (initial time) of 0, since the waveform time stamp in this case is relative to the start of the program.  To align the time with the current system time, all you need to do is use the Align Waveform Timestamps VI to shift the t0 value of the generated waveform to match the current time.  I've attached an example (aligntimes.vi)  built in LabVIEW 7.1.1 that demonstrates - you should be able to adapt it very easily to fit your needs. 
    Cheers,
    Matt Pollock
    National Instruments
    Attachments:
    aligntimes.vi ‏44 KB

  • How can I tell if signals from two devices are truly synchronised?

    Hi there,
    How does one check that signals from two devices (two separate devices in a single X-series chassis) that should be synchronised actually are?   I am using a PXIe6361 and PXIe4331 on a PXIe-1073, with Labview 2001 SP1 64-bit. All devices are using the Sample Clock from the 4331 device, and an AI Start Trigger, so they should be synchronised.
    I thought that writing the signal data to file and checking the time stamp for each column of data would be the most accurate, but I have been told that timestamps are software created and therefore don't reflect the actual time that the signals were acquired by the hardware.  When I do this, the timestamps vary by up to 150ms which is larger than I expected.
    If I set the x-axis of the waveform graphs (on the GUI) to "Time" then it appears that the first data sample is taken at different times for the two plots (one plot per device).
    If I set the x-axis of the waveform graphs (on the GUI) to "Ignore time stamp" (so that the x-axis just starts from 0 rather than a date-time) then the first data point occurs at "0" for both graphs. However, I'm not sure that this reflects the actual alignment of the signal.
    What is the best way to check if signals collected on different devices in the same chassis are actually synchronised?
    Thanks,
    Claire.

    Hi Lynn,
    Thanks for your help and for sending the demo.
    I understand the concept of how the signals will look if they're not synchronised and your demo shows that nicely. I guess I have been perplexed by someone else telling me that the timestamps in the output file (and following from that I assume timestamps on a waveform graph) do not give an indication of whether signals are synchronised. The reason they gave for this was that the timestamps are manufactured by the software, not the DAQ hardware.  They suggested that I put the setting "ignore waveform timestamps" on my waveform graphs, and then check that both signals come in at the same time (i.e. both start at zero), but I'm not convinced about this. 
    When I use an analog trigger, neither the timestamps in my output file or on the two waveform graphs are synchronised. If I don't use the trigger, then there is far less disparity in the timestamps in the output file. I've attached two output files here, and my VI.
    This is my first attempt to synchronise a voltage module and a strain gauge module on an X-series chassis, so I want to make sure that I'm achieving the best synchronisation that I can, and the difference in behaviour with and without the trigger worries me.
    Thanks,
    Claire.
    Attachments:
    without trigger.txt ‏5 KB
    with trigger.txt ‏6 KB
    Multi-Device Synch-Analog Input-Finite Acq-Analog Start_Claire_wDigitalin_12June2012 PTbridge.vi ‏196 KB

  • How do I read my wave form data back from an LVM file?

    I collected a waveform and saved it using the LVM file format. I would like to read the waveform back into labview and display it with its timestamp and assigned name. The only way I could read the data back into Labview was to convert it to a number array. I figured if you could write a waveform and save all its data, you should be able to read it back rather easily. I've included my LVM file and two simple programs. The program I'm using is much larger, but these two programs are representative of what I'm trying to accomplish.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Write To LVM.vi ‏96 KB
    Read From LVM.vi ‏67 KB
    Test Data_08-12-11_1252.txt ‏29 KB

    Hi Knoebel,
    To display the waveform data, you'll need to change a couple things.
    1. Open the "Convert from Dynamic Data" vi and change the Conversion to have a resulting data type of 1D array of waveform, as this is the datatype you are writing with the "Write To LVM.vi"  Currently you are converting to an array of scalars here, which is why you are losing timestamp data.
    2. Open the "Read from Measurement File" express VI and Change the Time Stamps to be Absolute (date and time) rather than relative. 
    3. If you want to display the timestamp on the waveform graph, pull up the properties window for the Waveform graph and change the Display Format to be Absolute Time for the X-axis and then check the Scales tab to be sure you have unchecked Ignore waveform timestamp on x-axes
    After making the change to convert from dynamic data type to 1D array of waveform you can also probe the wire going into the waveform graph to check the t0 and dt values of the waveform as you read from file.
    Lastly, if you look at the Write to LVM.vi block diagram, you will see a little red coercion dot between the waveform data wire and the Write to Measurement File data input terminal.  It would be better to use the "Convert to Dynamic Data" express VI to make this conversion.
    Hope this helps!
    Sherrie 

  • Alignment of peaks

    Hello
    I am in the middle of writing a program to deconvolute the signal from
    a modulated temperature differential scanning calorimeter (in which a
    sinusoidal wave is superimposed on the linear heating ramp).
    What I need to do is take the ratio of two sine waves (heating rate
    and heat flow). However, there is a phase lag between each wave (due
    to the time taken for the heat flow to respond to the applied
    temperature) and this phase lag is not constant throughout the course
    of the experiment because it is dependent of several factors (e.g. if
    the sample in the calorimeter is undergoing some kind of transition).
    What I need to do is treat the waves cycle by cycle i.e. divide cycle
    1 of the heat flow by cycle 1 of the heating rate, then c
    ycle 2 of the
    heat flow by cycle 2 of the heating rate, etc., and I need to align
    the waves for each cycle. I need to make sure the peaks of the
    heatflow cycle are exactly aligned with the peaks of the heat rate
    cycle.
    The vast majority of my program is written, and I have just got
    stumped as to how I can align my peaks. Does anyone have any ideas?
    Thanks
    Dr Jon Atkinson

    Hello,
    first of all, see examples/Waveform/operations.llb
    the vi called Align Waveforms Timestamps example.vi
    I hope it help you, if any problems let me know.
    Mike Manzheley
    Dr Jon Atkinson wrote:
    > Hello
    >
    > I am in the middle of writing a program to deconvolute the signal from
    > a modulated temperature differential scanning calorimeter (in which a
    > sinusoidal wave is superimposed on the linear heating ramp).
    >
    > What I need to do is take the ratio of two sine waves (heating rate
    > and heat flow). However, there is a phase lag between each wave (due
    > to the time taken for the heat flow to respond to the applied
    > temperature) and this phase lag is not constant throughout the course
    > of the experiment because it is dependent of several factors (e.g. if
    > the
    sample in the calorimeter is undergoing some kind of transition).
    > What I need to do is treat the waves cycle by cycle i.e. divide cycle
    > 1 of the heat flow by cycle 1 of the heating rate, then cycle 2 of the
    > heat flow by cycle 2 of the heating rate, etc., and I need to align
    > the waves for each cycle. I need to make sure the peaks of the
    > heatflow cycle are exactly aligned with the peaks of the heat rate
    > cycle.
    >
    > The vast majority of my program is written, and I have just got
    > stumped as to how I can align my peaks. Does anyone have any ideas?
    >
    > Thanks
    >
    > Dr Jon Atkinson

  • Hws error code - 21572

    Hi
    I am using HWS format to store files on PXI-RT.
    I use the HWS Set Attribute vis to set the waveform details, during logging.
    The attributes i set are: Waveform Name and Y-axis label.
    I get an error '-21572' (invalid timestamp) when i try to read the 'Timestamp' attribute using 'Get Wfm Attribute' function. I have not explicitly set the timestamp while writing to the files. could this be a reason for the error?
    I have not found any material on this error code. Kindly someone explain to me, why i get this error.
    Thank you

    Hello,
    I attempted to reproduce what you were seeing using LV RT 8.5 and a PXI 8186.  I didn't have any analog hardware, so I simulated a device and ran the following VI:
    Then I FTP'd into the system and downloaded the hws file and ran the following VI on it:
    It seems like the timestamp is able to be saved to the hws file and seen by the VI that reads this file.  Are there any errors that are occurring when you write the file in the RT system?  If there were an error when trying to get the timestamp of the waveform by the hws VIs, then it may default the timestamp to what you are seeing.  You said that you verified that the waveform timestamp is the current time, is the current time reflected by other timing VIs like Get Date/Time In Seconds?  It could be that the clock on the RT system is not being read correctly, either by the DAQ task, or by the HWS writing VIs. 
    Message Edited by Coal Man on 10-07-2008 04:18 PM
    Brian Coalson
    Software Engineer
    National Instruments
    Attachments:
    RT VI.jpg ‏138 KB
    PC VI.jpg ‏107 KB

  • Waveform chart X-Axis reverses itself when upper limit is edited in Absolute Time - problem may be linked to Timestamp Control?

    I've seen this problem for some time now, and it still exists in the Silver toolset Waveform Chart in LV 2012.  If the chart is in strip mode, and you edit the upper limit value to a point in the future, the X-Axis will invert (higher values/ later time to the left), to the limit of the Chart History length.  This happens whether the chart is active (logging data on a compiled executable) or even when in design mode, though it's more consistent when there's data in the chart.  It's not history length related as far as I can tell, as I set the length to 7 days of sampling @ 1-second intervals (605K), and it happens when I try to set the end time to an hour in the future with only a few minutes of data collected - suddenly the right Absolute Time becomes the time my last sample point was collected, while the left Absolute Time becomes nearly 7 days in the future (so neither end point is what I was setting it to).
    It's nice that the chart gives the option of editing the limits, but as such, it's important that they work as you would expect them to.
    Also - until this is addressed, is there a way to lock it against editing?  Until a fix is made, my workaround is to put a transparent button over the range start & end points, and a transparent flat rectangle above all other mid-range points, and pop-up a data entry form with a Timestamp control to allow editing.  Unfortunately, this doesn't work as I would expect, as typing "11 AM" in the Timestamp control over a prior value of say "10:05:34.232 AM" ends up becoming "11:05:34.232 AM" instead.  ???  Another error - or is this by design?  If it's by design, is there an option to make it behave as I would prefer (11 AM = 11:00:00.000 AM), as Excel behaves with timestamps?  I can't help but suspect this may be linked to the chart axis issue.
    Also - I just built a simplified chart modeled somewhat on my current project, and could not get this to recur.  BUT... had the strangest thing happen:  My sample data was generated using the Trig functions for Sine and Cosine, and at one point my waveforms distorted on the display, so I'm attaching that here plus the simplified chart project.
    Last - my system is LV 2012 on Win7 Pro-x64.
    Thanks!
    Erik
    Attachments:
    Chart data distorted.png ‏45 KB
    Waveform Chart Flaw.zip ‏17 KB

    I am not so sure that this is a bug, and I have not been able to reproduce this behavior that you are describing. 
    But you can lock it from editing by right-clicking on the graph and go to Properties>>Appearance>>Enabled State --> Disabled
    Also, word of advice for the future: You will get more replies from the community with shorter posts and keeping it to one question per post. Summarize what the issue is, and put the detailed documentation and instructions to reproduce in the actual VI. 
    Huntington W
    National Instruments
    Applications Engineer
    ***Don't forget to give Kudos and Accepted as Solution where it is deserved***

  • 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

  • Timestamp PXI-5152 waveforms in GPS time

    Hello,
    I am trying to collect waveforms with a PXI-5152 and correlate them with other data which is collected in GPS time.  I have a GPS receiver that can output a PPS pulse.  The PPS pulse is the only signal that the two systems can share.
    NI support recommended the following.
    Split my PPS signal and send one copy into a spare channel on the 5152. Prior to my data acquisition, I would collect one waveform of the PPS pulse.  The timestamp of this waveform would be used as my offset from the time counter on the 5152 to the GPS time (assuming I could figure out what second it was which I can)
    The other PPS pulse would go to a 6682 time sync card.  I was told the card could sync to the PPS and output a 10MHz clock to the 5152.  
    All measurements on the 5152 would then be converted to GPS time using the offset calculated earlier.
    The problem I later found is that the 10MHz clock that is output by the  6682 is not disciplined by the PPS pulse.  It is freerunning.  Therefore, over time, there would be clock drift between the clock on the 5152 and my other data that is collected in GPS time.  This is a problem as I must have 2.5usec accuracy on the time of the data collected on the 5152 card in order to be able to correlate it with the other data set.
    Now the question is can this design be salvaged.?  Is there a way to use the 6682?  It would seem that the 6682 should be able to compute number out 10MHz clock cycles between each PPS pulse. For example if it output 10,000,010 clock cycles between PPS, then there would be a 1 micro second drift for that second.   If I were able to read this error once per second then I could (in software) compute and update the error each second.  This would allow me to esentially eliminate the clock drift over the long term.
     If this is not possible then is there another card that can do something similar...I have been looking at the 6608 which may do something like this.
    I appreciate any advice that is out there.  Thanks!
    Paul

    Hi Paul,
    You're right, the 6682 out of the box cannot discipline CLK10 to one of the supported Time References. 
    I think you have 2 high-level options. By leveraging a Trimble Thunderbolt's disciplined CLK10, you can create a system that samples synchronous to GPS. See this link for more information: http://zone.ni.com/devzone/cda/tut/p/id/6818 
    If you instead want to correlate your free-running 5152 samples to GPS, you're dead on with the approach although this would likely need to be supported with new features from NI-Sync. We currently support timestamping a signal directly which for CLK10 would amount to far too much data. I'd e-mail [email protected] to discuss the possibility of this further.
    Thanks for the detailed e-mail
    -Adam 

  • Timestamps on AI Read waveform

    Hello everyone.
    I am a total newbie to this board and to LabView in general.
    What I have so far is, I am reading in an Analog Input through a NI PXI-4472 card.
    This I have working nicely, even managing to write data to a file.
    I am also reading in GPS time through a ZTec zt1000pxi GPS card.
    What I am trying to do is alter the timestamp on the AI Read waveform to reflect GPS time instead of my PC system time.
    Is there any way to do this?
    I am attaching my cade so far.
    Thanks for any help.
    Attachments:
    Analog input write to file.vi ‏103 KB

    Hi NIquist,
    I appreciate your response.
    I have a few questions for you. 
    How can I get the components of the waveform from the AI Read function?  I have not been able to get the waveform out of the output by itself to feed into the Build Waveform function.
    My next question is how to convert the GPS time to a TIme Stamp that the BUild Waveform function will accept?
    When I try to tie the UTC time from the ZT1000 function to the d0 of the Build Waveform function it gives me an error telling me the source is an unsigned 32 bit real and the sink is an extended. So i put in a "To Extended" conversion node, and it then tells me the source is extended and the sink is Time Stamp and it still won't accept it.
    Any ideas for getting around this?
    Sorry for the beginner type questions, but I really havent been able to find any info on my own for using this ZT1000 card for this, or any other, type of process.
    Thanks a lot.

Maybe you are looking for

  • HT201359 I was billed twice for the same song?

    Who do I contact for being billed for the same song twice?

  • IPod slideshow limitations?

    I have an iPod video 30 GB. I have only 1500 photos that I wish to use, but the Slideshow does not seem to "dip" into the pool past a certain point. Is there a known limit to the number of items from which it will select, or is there a way to set tha

  • Only installs shared components, not Dreamweaver cs3....

    First... hello! Total newbie! Operating system: XP Pro I just bought Dreamweaver CS3. I have tried NUMEROUS times (for the past 2 days!) to install this on my computer. Every single time I get all the shared components, but NEVER dreamweaver CS3. Has

  • Prefered way to check availability of SAP system

    Hello! We would like to monitor the SAP ERP productive system from SAP Solution Manager. Our current solution is based on CCMSPING agent that has been installed on the server of the satellite system. This solution is not the ideal, because of the CCM

  • Deleted micro photo driver how to install

    hi everybody i have a micro photo and somehow by mistake deleted the driver how do i download the driver. my laptop (windows xp service pack 2) won't regongize the player unless i have the driver for it. so if somebody could send me in the right dire