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

Keithley 2400 driver: source and sense range mixing #6488

Open
panasee opened this issue Oct 5, 2024 · 3 comments
Open

Keithley 2400 driver: source and sense range mixing #6488

panasee opened this issue Oct 5, 2024 · 3 comments

Comments

@panasee
Copy link

panasee commented Oct 5, 2024

Hello, I found a confusing range setting in Keithley 2400 driver:

        self.add_parameter(
            "rangev",
            get_cmd="SENS:VOLT:RANG?",
            get_parser=float,
            set_cmd="SOUR:VOLT:RANG {:f}",
            label="Voltage range",
        )

Above is the range parameter for Keithley 2400. Here the get_cmd retrieves the sense range while the set_cmd tries to set the source range. From the manual of Keithley 2400, there can be two different ranges for sense and source. Are there special considerations for that?

@jenshnielsen
Copy link
Collaborator

I don't have much context for this but the same is done for the current limit so I would guess it's probably intentional and an attempt to enable it to be used in both modes. That being said I don't think this is correct and I suggest that we add a parameter for both the sense and the set limit independently. @panasee would you be willing to open a pr to do that?

@panasee
Copy link
Author

panasee commented Oct 8, 2024

I've further tested this with a 2401 meter. It seems the sense range is bound to the source range for the sourcing property. When I tried to set the sense range for the sourcing property, an error appeared at the meter's front panel (no error message from communication): "Invalid with source read-back on" (+823 error in the manual). This may be the reason for the original code writing.

I didn't find more details about the "source read-back" in the manual so I can't guarantee that it's a common feature for all 2400-series meters.

I think the range parameters can be left as is for now although it can be confusing.

The code I used is attached here:

meter.mode("CURR")
meter.curr(1E-6)
meter.output(True)
meter.write("SENS:CURR:RANG 0.01")
meter.write("SOUR:CURR:RANG 0.001")
print(f"final source curr range: {meter.ask("SENS:CURR:RANG?")}")
print(f"final sense curr range: {meter.ask("SOUR:CURR:RANG?")}")
meter.output(False)

print("="*20)

meter.mode("VOLT")
meter.volt(1.5)
meter.output(True)
meter.write("SOUR:VOLT:RANG 10")
meter.write("SENS:VOLT:RANG 1")
print(f"final source volt range: {meter.ask("SENS:VOLT:RANG?")}")
print(f"final sense volt range: {meter.ask("SOUR:VOLT:RANG?")}")
meter.output(False)

The output is:

final source curr range: 1.050000E-03
final sense curr range: 1.050000E-03
====================
final source volt range: 21.00
final sense volt range: 21.00

Apparently, the "SENS:CURR(VOLT):RANG" caused no effect here.

@panasee
Copy link
Author

panasee commented Oct 8, 2024

Sometimes, the meter will give some error messages that only show up on its front panel. Is there a way to capture them in python? This could be very useful for debugging.

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