Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get information about time of triggering and entire time waveform

I have been trying to capture a certain portion of waveform from Textronix DPO2024 using triggering in Labview. Further, I want to save the the entire triggered waveform (triggered time as one array and triggered signal amplitude as second array)  in .xlxs format.

 

With the present setup (screenshot, and output of program attached). I only get the triggered portion of signal, I get time stamp (that I do not want) but require the time array, instead.

 

I know there are methods to convert the timestamp to time array. I do not want to use this, as I need to capture the data every 10 ms  or even faster, and this slows the acquisition process.

 

Any help will be much appreciated.

 

Thanks

0 Kudos
Message 1 of 12
(6,145 Views)
What's slowing down the acquisition process is the write to measurement file. Getting a time array from the timestamp and dt is extremely fast in comparison. Your current code seems to discard the timestamp. I have no idea how the express VI works and out uses the evil dynamic data.
0 Kudos
Message 2 of 12
(6,126 Views)

Hi Dennis,

 

Thank you for the response.

 

Please find the .vi attached. In the case - without triggered, with the information of dt and length of Y, we can determine the time waveform (as calculated using matlab script on right). But in the presence of triggering, neither  the length of waveform nor the start time of triggering is known, so calculating the time waveform is tricky. In addition, since the waveform is continuously changing, and keeping trigger fixed at a particular level,  the length of waveform is also changing in some of the acquisition. So I wanted  a 'simple' method where I can get the time information about the triggered waveform in each acquisition.

 

More specifically, I wanted help in regard to getting time array of the triggered signal and save it as a column in excel file.

 

Thanks

0 Kudos
Message 3 of 12
(6,108 Views)
I'm posting from my phone so I can't look at the VI but a matlab script is going to be one of the slower methods and the Express VI should not be used. For saving, you only need t0 and dt anyway.

Why aren't you configuring the scope itself for a trigger level?

I also think a rate of 10ms is a bit unrealistic with your instrument.
0 Kudos
Message 4 of 12
(6,097 Views)

Hi Dennis,

 

Thank you for your efforts. Finally found the solution at

http://forums.ni.com/t5/Signal-Conditioning/how-to-get-waveform-time-array/td-p/2910500.

 

I wanted to ask, why do you think acquiring every 10 ms is a problem?  Please elaborate

 

Ajit

0 Kudos
Message 5 of 12
(6,087 Views)
You need to capture and then transfer the waveform to the pc. This is, in general, a fairly slow process. I have no idea what the specs say but it is something to look at. You'll certainly need to move the file write outside of your acquisition loop. Have you tested your code with a small wait and no file saving? A pci or USB digitizer from NI has much higher transfer rates.
0 Kudos
Message 6 of 12
(6,079 Views)

Hi Dennis,

 

I tested with as low as 5 ms wait time and it worked fine. I am first acquirng at these rate and if I am able to master them, then try to go for actual spec which I believe is of hundredths of ms. Under those conditions, I shall be needind high speed DAQ.

 

Thanks for clarifying.

0 Kudos
Message 7 of 12
(6,076 Views)

@ajha wrote:

Under those conditions, I shall be needind high speed DAQ.


Then why are you not using a DAQ now?  Even then, there are analog triggers available for many DAQ devices, making some of your code just not needed.  So by using the trigger, when you read the data T0 will actually be when your trigger happened.  Hey, you have the information you wanted all along!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(6,074 Views)

I do not have DAQ now. Since I am still working on maths on system requirement and DAQ spec, looking forward to buy one when have done them.

0 Kudos
Message 9 of 12
(6,021 Views)

I know this thread is stale by now, but I am having a similar problem.  I'm using a Tek DPO2024B with LV 8.6 (I know, I should upgrade, just can't at my institution), and trying to pull 1 waveform for now using the "fetch" subVI, eventually hoping to pull 4.  At the moment, I am just showing the data on a graph, I might do saving later.

 

It currently takes about 4 seconds to just fetch 1 waveform, which seems much slower than it should be.  I say this for a couple reasons:

 

1.  With a Tek TDS2024B, I was able to fetch 4 waveforms, do some math and analysis, and save the data to a csv file, all in less than 1 second.  True there are fewer points on the TDS (2500) vs. the DPO (100k), however, the TDS is using a slower (and presumable older) USB as compared to the DPO.  Tek confirmed this and said the DPO uses USB 2.0, so speeds should be 10-100 times faster than the TDS.  I confirmed that my PC is USB 2.0 as well.

 

2.  The DPO2024B has a sample rate of 1 GS/s to the TDS's 2 GS/s, so record lengths other than 100k or 1M points should be possible, and the NI driver for the DPO series supports this (1k, 10k, 100k, 1M, 5M, and 10M), but it won't allow me to lower the record length to below 100k.  In truth, 100k is overkill, I'd be fine with 10k, the main reason for needing the DPO over the TDS is the signal resolution, better noise suppression, better math capabilities, etc., so I legitimately need the DPO for this work.

 

So, is there a way to either (1) speed up communication between the DPO and my PC to realistic levels by using lower level commands, or (2) reduce the record length to less than 100k so there is less data to transfer?  Id like to pull 4 waveforms in 1 second as the TDS does, which seems reasonable given the spec communication speed, etc.

 

Thanks!

0 Kudos
Message 10 of 12
(5,796 Views)