Skip to content

LCR Driver Range Not Working #243

Open

Description

@amp-bjorn

The range function in the LCR driver is not working. The issue is that we attempt to perform a fancy string to number to string coversion. The LCR will only take the following in its SCPI commands (tested manually)

📖 SCPI Command Reference

The driver wraps these low-level serial commands into high-level Python methods.

Command Parameter Options Description Example Usage Example Return (Blank means no return value)
*IDN? - Identity check *IDN? Agilent Technologies,U1732C,...
SYST:ERR? - Error queue check SYST:ERR? +0, "No error"
MODE SER, PAL Series vs Parallel MODE SER -
DISP2 D, Q, TH Set secondary parameter DISP2 Q -
FREQ 100, 120, 1k, 10k Test frequency (Hz) FREQ 1k -
FUNC R, C, L, Z, ESR, AI Primary measurement type FUNC C -
RANG See Range Table below Set manual range RANG 20u -
FETC? - Read primary value FETC? +6.856E-07
FETC? ALL - Read all parameters FETC? ALL Rs,+3.809052E-13,Ls,+4.316664E+09,Rp,+6.172276E-14,Lp,+4.316802E+09,Z,+4.316733E+09,TH,+5.774222E-01,F,+1.000000E+03,D,+1.774207E+02,Q,+5.636322E-03

📉 Range Options by Function

Function Available Range Arguments
R / Z 2, 20, 200, 2k, 20k, 200k, 2M, 20M, 200M
L 2000u, 20m, 200m, 2, 20, 200, 2k
C 2000p, 20n, 200n, 2000n, 20u, 200u, 20m

source

Activity

  1. daniel-montanari commented on May 29, 2026

    @daniel-montanari
    Collaborator

    In addition to this there are a few other drivers that use this
    Keysight 33500b - turns fixed strings into numbers
    rigol dg1022 - turns fixed strings into numbers
    agilent u1732c (this driver) - turns arbitrary input into numbers (with bugs)

    I think we should remove unit_scale entirely, fix up any scripts that rely on it, and delegate any sort of api related behaviour to drivers only, and force users to put numbers in, instead of strings with multiple formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions