Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to continuously aquire data with an agilent 54621a oscilloscope

I have a frequency modulated (FM) signal which I would like to capture with the PC. I am using an Agilent  54621a Oscilloscope for data acquisition via a PCI GPIB card. Having downloaded the VI drivers for the oscilloscope I managed to obtain a static screenshot of the waveform and save it into a file. However, the resolution is limited to 2000 points and since I need to obtain many periods the resolution would not be sufficient. Thus I am wondering what the best way is to obtain let's say 100 periods each with a resolution of 2000 points. Alternatively, is there a way of recoding the waveform continuously as I am interested in acquiring the change in waveform over time?


Thanks,

sven

0 Kudos
Message 1 of 6
(4,768 Views)

Hi Sven,

When I try to open your code I am missing several VIs, it would make it easier for me to help you if you could post these missing Vis for me so I can better explore your code.

I have taken a screen shot of the VIs that I am missing displaying their names.

(I rearranged your code slightly to fit it on the page.)

Could you also clarify why you have a "for loop" running 5 iterations?

Thanks

Emma R

NIUK & Ireland

0 Kudos
Message 2 of 6
(4,732 Views)

The loop was just for experimenting purposes. I used it because I could not read data from the oscilloscope continuously. So I figured I would read 2000 points over a certain time interval and then with the next iteration of the loop move the start point to the previous end point.

However, I’d rather have the oscilloscope throughput that data on a continuous basis.

The oscilloscope’s internal buffer is only 2Mb. Furthermore it can only throughput 20ksamples/second per channel. I could time-interleave the two channels to obtain 40ksamples/second but that is beyond me.


I attached the VI's that I am using. BTW, I downloaded these from the NI website.

Cheers,
Sven

0 Kudos
Message 3 of 6
(4,727 Views)
Hi Sven,
 
I can't run the program as I don't have the oscilloscope but I think you were on the right track.
I set the constant wired into the "for loop" to the 100  periods you wanted to write to file.
I have also added a boolean that whilst set to true will mean that the file apends new data rather than writing over the previous data set.
 
Give it a run and let me know whether it works or not.
 
Bear in mind for the test run you may want to write a smaller number of periods to file than 100, so you'll have to change the constant wired into the "for loop" accordingly.
 
Emma R
NIUK & Ireland
0 Kudos
Message 4 of 6
(4,720 Views)

Thanks for the response. Yes, I can run the program, but how can I change the start time with each loop iteration? In the "configure acquisition record" vi I can choose the length of each acquisition interval and the start time. I would like to have the Time Per Record to be always 100E-9 and the start time N*100.1E-9 where N is the integer for each loop iteration. So with each loop iteration I am looking at a new set of data.


Cheers,
Sven
0 Kudos
Message 5 of 6
(4,712 Views)
Hi Sven,
 
The following is a list of the modifications I have made your code and why:
Firstly I changed the constant wired into your "for loop" to a control called "NumberOfRecords".
This was just for ease of usability, so that you can set the number of periods you want to record without having to go into the block diagram.
 
I then ensured that the data range and default value for your "TimePerRecord" control were set to the correct values.
The method for changing the data range, default value and setting the accuracy of controls is to right click the control on the front panel>select "Data Range.." from the drop down menu> then edit the values within the Data Range and Format and Precision tabs> once edited them click OK to apply changes.
To set the control to default value configured in Data Range tab; right click the control on the front panel> select "Data Operations"> "Reinitialise to Default Value".
Remember to save VI to save settings.
 
I have deleted the "StartTime" control and wired into the StartTime terminal for the waveform the period of the waveform multiplied by the waveform iteration, so that with each loop iteration a new set of data is being recorded.
 
I hope this helps,
 
Emma Rogulska
NIUK & Ireland
0 Kudos
Message 6 of 6
(4,642 Views)