Home > Enterprise >  python: <bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 1428
python: <bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 1428

Time:04-18

I'm trying to read some values from an instrument (keithly 2460) using ivi driver (ke2450_64.dll).

Here is the code:

import comtypes
from comtypes import client
KeithleyInstruments = client.GetModule('ke2450_64.dll') # load dll
SMU = client.CreateObject("Keithley2450.Keithley2450")
SMU.Initialize("USB0::0x05E6::0x2460::04455358::INSTR",False,False,'simulate = true')
SMU.Identity.InstrumentModel # identify the instrument model
SMU.Measurement.Trace.GetAverageReading

Everything works fine, but running the last line, i.e. SMU.Measurement.Trace.GetAverageReading, I get the response:

<bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 14280b4c448>

Honestly, I do not understand what this means. How can I read the average reading from the instrument using the command SMU.Measurement.Trace.GetAverageReading? I know there are some ways using scpi commands, but the intention is to only use the ivi driver to perform this task.

CodePudding user response:

I assume you are trying to access an optional property.

Try calling it like so SMU.Measurement.Trace.GetAverageReading().

Alternatively you can try str(SMU.Measurement.Trace.GetAverageReading) to check whether it has a valid string representation attached.

  • Related