03-27-2022 01:38 PM
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.
03-27-2022 05:38 PM
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?
03-27-2022 11:29 PM
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.
03-28-2022 07:10 AM
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.
good luck
03-28-2022 10:01 AM
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?)
03-28-2022 10:14 AM
Thank you for your reply, but sorry, my problem is in the waveform data, not the waveform graph.
03-28-2022 10:21 AM
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.
03-28-2022 11:13 AM - edited 03-28-2022 11:23 AM
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. 😄
To get the 2.63e-5 offset (t0), add that after the multiplications. Is it meaningful?
03-28-2022 11:48 AM - edited 03-28-2022 11:48 AM
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?
03-28-2022 12:28 PM
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.