Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get time data of waveform

Hi everyone, I currently have a problem that I can't solve.


I control the oscilloscope through labview to capture the waveform, and the exported file is in csv format. But now the waveform I captured cannot have the X-axis (time) information like accessing data directly from the oscilloscope via USB. How should I modify the program?


Please help me, thanks a lot.

 

Attached files :

The code I wrote to control the oscilloscope, the waveform I want to capture on the screen of the oscilloscope, the waveform data of the oscilloscope to access via USB, and the waveform data I captured with labview.

Download All
0 Kudos
Message 1 of 11
(1,104 Views)

This subVI seems to format the time column in date/time format.

 

If you want relative time with desired resolution, just calculate the time column from d0 and dt get the Y array for the second column and write this 2D array using e.g. write delimited spreadsheet. Do you know if the time information in the waveform is correct?

0 Kudos
Message 2 of 11
(1,087 Views)

Thanks for your reply, Altenbach.

 

I Would like to ask the "calculate the time column from d0 and dt get the Y array for the second column" you mentioned, can you show me the example? Or which sub-vi should I use to solve this problem?

 

About the time information in the waveform, I think it is correct.

0 Kudos
Message 3 of 11
(1,056 Views)

Hi

Your waveform graph ignores the waveform graph x-axis properties.

This is a checkmark that you can deselect either with a property node or directly in the properties dialog.

You can open the properties dialog of the waveform graph by rightclicking on the frontpanel control and select properties.

 

The tab you need is the scales tab as shown and deselect the checkmark in the lower left corner.

2022-03-28 14_09_26-Graph Properties_ Waveform Data.jpg

good luck

 

greetings from the Netherlands
0 Kudos
Message 4 of 11
(1,034 Views)

I thought the problem was in the saved file, not the graph. Hard to tell from the original message. So, yes the graph should of course not ignore the timing. How do you want the time in the file to look like (e.g. relative seconds?)

0 Kudos
Message 5 of 11
(1,030 Views)

Thank you for your reply, but sorry, my problem is in the waveform data, not the waveform graph.

0 Kudos
Message 6 of 11
(1,015 Views)

I want the time in the file to be the same as the attachment (data captured from the oscilloscope via USB) so I can know how long the waveform has been since time zero.

 

This time data can help me reconstruct the waveform when I use matlab later.

0 Kudos
Message 7 of 11
(1,007 Views)

 

Here's one simple way to generate your time column for the data part. Simple math!

Writing the header (fist N lines) is up to you. 😄

 

altenbach_0-1648483941113.png

 

To get the 2.63e-5 offset (t0), add that after the multiplications. Is it meaningful?

 

0 Kudos
Message 8 of 11
(998 Views)

Thank you ! I'll test soon.

 

 I think it is meaningful because this information is important about my research.

 

btw 

Can you give me your code? 

 

0 Kudos
Message 9 of 11
(984 Views)

Finally,I found these functions.

 

And now I have a question,

I think the time in tek005CH1.csv, just like 2.63e-5, is relate to the Horizontal Delay,

How can I get those time information from LabVIEW?

 

Thank you.

0 Kudos
Message 10 of 11
(974 Views)