Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver/Rhode Schwartz rs rto1000 series oscilloscope #679

Merged
merged 44 commits into from
Oct 16, 2017

Conversation

MalaySingh
Copy link
Contributor

Following are the features:

  1. Acquire waveform data from any channel of the oscilloscope.
  2. Get/Set methods for start and stop time of acquisition, Voltage range, Voltage scale,
    Acquisition rate, averages.
  3. The waveform data is output as a numpy array.

Following are the features which will be included in further versions:
More instructions could be added.

Tested features:

  1. Acquired traces
  2. Configured succesfully all listed parameters (start/stop/voltage range/voltage scale/acq rate/avg).

This is still ongoing, but we could profit a lot from any review by now

@jenshnielsen
Copy link
Collaborator

Thanks for the contribution. I don't have a lot of time time right now but here are a few small things that I noticed.

  • To be able to measure a waveform using the qcodes the waveform should be implemented as an ArrayParameter. I suggest looking at the TPS2012 scope driver. https://github.com/QCoDeS/Qcodes/blob/master/qcodes/instrument_drivers/tektronix/TPS2012.py
  • If you plan to extend to more than one channel you may want to use the Channels class to organise channel specific parameters, The TPS2012 driver has an example of this too
  • This includes changes to other r and s drivers which should probably be omitted or done in another pull request.

@MalaySingh
Copy link
Contributor Author

MalaySingh commented Jul 21, 2017 via email

@WilliamHPNielsen
Copy link
Contributor

Hi @MalaySingh! It looks like development of this driver slowed down. I'll be happy to help you get it back on track. I can push some changes to your branch. Let me know if it's still relevant.

@MalaySingh
Copy link
Contributor Author

Yes the progress on the driver slowed down, I will get back to it soon. Please feel free to push the changes, that will be helpful.

@Dominik-Vogel Dominik-Vogel self-assigned this Sep 12, 2017
@WilliamHPNielsen
Copy link
Contributor

Maybe the drivers should be named RTO1000, since it's compatible with the other in the same serie

That's not a bad idea. Even better is to write specific drivers for each instrument in the series, each of them subclassing the "mother" RTO1000 driver. The specific driver can be as short as a call to super().__init__ with correct variables (stuff like no. of channels, bitdepth, and so on).

@Dominik-Vogel Dominik-Vogel changed the title Driver for oscilloscope rs rto1024 driver/Rhode Schwartz rs rto1024 oscilloscope Oct 3, 2017
@Dominik-Vogel Dominik-Vogel changed the title driver/Rhode Schwartz rs rto1024 oscilloscope driver/Rhode Schwartz rs rto1000 series oscilloscope Oct 3, 2017
@Dominik-Vogel
Copy link
Contributor

Hi @MalaySingh!
Great that you are contributing to the driver collection! I am compiling a list of the status of drivers. I was wondering how you were getting along with it. Is it in a state where it can be merged? If there is any further assistance you need with the development just let us know.

@MalaySingh
Copy link
Contributor Author

The driver has following short comings.

  1. Their is a sleep command to ensure that enough time is allocated for data acquisition before fetching the data from the scope. This was a hot-fix because the wait until finished command(OPC?) was not working properly.
  2. The trace has not been cast into an array parameter.

The scope available in the lab is busy, and I will not get time to play with it (and test the latest version of the driver) before the next two weeks.

So by reading the driver, it seems ready to be merged as a beta version.
It should be tested to guarantee that, and I will not have the chance until some weeks.

@jenshnielsen
Copy link
Collaborator

@MalaySingh Great, I think issue 1 is most likely caused by the OPC? command timing out. You can probably solve this by setting the visa timeout before calling OPC? Here is an example https://github.com/QCoDeS/Qcodes/blob/master/qcodes/instrument_drivers/Keysight/Keysight_34465A.py#L60 of that from another instrument

@WilliamHPNielsen
Copy link
Contributor

Okay, I just got my hands on an RTO1044 unit. I am officially taking over this boat! ⛵️

@WilliamHPNielsen
Copy link
Contributor

@YakBizzarro, can you point me to an overview of the differences between different RTO1000 series oscilloscopes, then I'll try to make a driver for all of them.

@jenshnielsen
Copy link
Collaborator

jenshnielsen commented Oct 10, 2017

I think basically 3rd digit is Bandwidth in GHz and 4th digit is number of channels

as in

Base Unit             | Bandwidth   | Channels
R&S®RTO1044           | 4 GHz       | 4
R&S®RTO1024/R&S®RTO1022 | 2GHz        | 4/2
R&S®RTO1014/R&S®RTO1012  | 1 GHz       | 4/2
R&S®RTO1004/R&S®RTO1002 | 600 MHz   | 4/2

https://www.rohde-schwarz.com/us/product/rto1000-productstartpage_63493-191808.html

@WilliamHPNielsen
Copy link
Contributor

Thank you!

@WilliamHPNielsen
Copy link
Contributor

I think this is good to go now.

It is the responsibility of the user to ensure that the scope is ready to deliver when being queried for the trace data. I think it makes sense to do it this way, i.e. split out the actual delivery of data from any potentially long averaging process.

@MalaySingh, once you get time to test this, please let me know what you think.


self.channel._parent.dataformat(dataformat)
# ensure little-endianess
self.channel._parent.write('FORMat:BORder LSBFirst')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we gain any speed from merging these writes into one? and is it even possible

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we probably would. But there is an underlying assumption that this speed-up is small compared to the time scale of everything else. It would only happen once BEFORE a loop, for instance, and thus never really be a true bottleneck.

@jenshnielsen
Copy link
Collaborator

Looks good to me

Copy link
Contributor

@WilliamHPNielsen WilliamHPNielsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jens said "LGTM", so it must be good.

@WilliamHPNielsen WilliamHPNielsen merged commit 7b20f44 into microsoft:master Oct 16, 2017
giulioungaretti pushed a commit that referenced this pull request Oct 16, 2017
Author: Malay Singh <[email protected]>

    driver/Rhode Schwartz rs rto1000 series oscilloscope (#679)
@AdriaanRol AdriaanRol deleted the driver/RS_RTO1024 branch November 5, 2017 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants