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

Enhancement: Device Driver Rhode Schwarz ZNBx #31

Open
gyger opened this issue Aug 22, 2023 · 1 comment
Open

Enhancement: Device Driver Rhode Schwarz ZNBx #31

gyger opened this issue Aug 22, 2023 · 1 comment

Comments

@gyger
Copy link

gyger commented Aug 22, 2023

Is your feature request related to a problem? Please describe.
I am wondering if you are planning or working on introducing device drivers for Rhode Schwarz instruments like Oscilloscope [1] / VNAs [2] etc.

Describe the solution you'd like
Device driver for ZNB4,6,8,20.

Describe alternatives you've considered
I guess using Qcodes is an alternative.

[1] https://www.rohde-schwarz.com/us/products/test-and-measurement/oscilloscopes_63663.html
[2] https://www.rohde-schwarz.com/us/products/test-and-measurement/network-analyzers/rs-znb-vector-network-analyzer_63493-11648.html

@heevasti
Copy link
Collaborator

Hi,

Thank you for your request! Indeed more instrument drivers in QMI are always welcome. This could be handled in a couple of ways:

  1. Making a more detailed request with a list of functionalities you would like to have (implementing the whole SCPI protocol library from the manual is quite a lot of work, so an initial selection of most needed features is better. More can be added later) and we can then review/refine the ticket further and add it to our backlog. Note that we have also various requests and support duties locally here at QuTech so when we can pick up the ticket from the backlog to do is not easily predicted. Perhaps we speak of a time-span of 1-2 months to get it done.
  2. Check out contribution guidelines and try to get it started yourself (we can also help). Then by making a pull request with your development, we can then review the pull request. Perhaps we can then also take over some further development and e.g. adding unit-tests to it. This would probably be the faster option to get it done. This way you'll also probably first implement the SCPI commands you really need and other useful, but not-so-necessary, functions will then follow in some follow-up ticket.

From a quick look on the manual, QMI can communicate with the ZNB devices with VXI-11 protocol (vxi11 transport in QMI) and also using USB connection (usbtmc transport in QMI).
Examples for VXI-11 and USBTMC transport use in QMI (excluding import statements):

with start_stop(
        qmi, "awg5014_test"
    ), open_close(
        qmi.make_instrument(
            "awg5014", Tektronix_Awg5014, "vxi11:123.45.67.89"
        )  # Note that AWG load/send commands have issues with encoding in TCP protocol -> use GPIB or VXI11
    ) as awg:

    # Start with clearing the buffer
    awg.wait_and_clear()

    # getting idn
    idn = awg.get_idn()
    print("The vendor of the device is %s" % idn.vendor)
    print("The model of the device is %s" % idn.model)
    print("The serial of the device is %s" % idn.serial)
    print("The version of the device is %s" % idn.version)
    qmi.start("rs_smbv100a_test")
    # usb transport string
    usb_transport_str = "usbtmc:vendorid=0x0AAD:productid=0x005f:serialnr=258300"
    try:
        # make instrument
        instr: RohdeSchwarz_SMBV100A = qmi.make_instrument("smbv100a", RohdeSchwarz_SMBV100A, usb_transport_str)
        instr.open()
        # getting idn
        idn = instr.get_idn()
        print("The vendor of the device is %s" % idn.vendor)
        print("The model of the device is %s" % idn.model)
        print("The serial of the device is %s" % idn.serial)
        print("The version of the device is %s" % idn.version)
        instr.close()
    finally:
        qmi.stop()

Vendor and Product ID, and serial nr, should be present in the documentation, or can be found on the instrument itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants