Skip to content

Python Toolkit API PID Advisor Module

zhinst.toolkit.driver.modules.pid_advisor_module.PIDAdvisorModule(pid_advisor_module, session)

Bases: BaseModule

PID Advisor Module.

The PID Advisor Module provides the functionality available in the Advisor, Tuner and Display sub-tabs of the LabOne User Interface’s PID / PLL tab. The PID Advisor is a mathematical model of the instrument’s PID and can be used to calculate PID controller parameters for optimal feedback loop performance. The controller gains calculated by the module can be easily transferred to the device via the API and the results of the Advisor’s modeling are available as Bode and step response plot data.

For a complete documentation see the LabOne user manual

Parameters:

Name Type Description Default
pid_advisor_module PidAdvisorModule

Instance of the core PID advisor module.

required
session Session

Session to the Data Server.

required

wait_done(*, timeout=20.0, sleep_time=2)

Waits until the pid advisor is finished.

Parameters:

Name Type Description Default
timeout float

The maximum waiting time in seconds for the measurement (default: 20).

20.0
sleep_time int

Time in seconds to wait between requesting sweeper state. (default: 0.5)

2

Raises:

Type Description
TimeoutError

The measurement is not completed before timeout.

zhinst.toolkit.driver.modules.pid_advisor_module.PIDMode

Bases: IntFlag

PID Advisor mode.

Attributes:

Name Type Description
P_Gain int

Optimize/Tune P gain.

I_Gain int

Optimize/Tune I gain.

D_Gain int

Optimize/Tune D gain.

D_Filter_Limit int

Optimize/Tune D filter limit.

D_Filter_Limit: int = 8 class-attribute instance-attribute

D_Gain: int = 4 class-attribute instance-attribute

I_Gain: int = 2 class-attribute instance-attribute

NONE: int = 0 class-attribute instance-attribute

P_Gain: int = 1 class-attribute instance-attribute