Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pid_logic.PIDLogic Class Reference

Control a process via software PID. More...

Inheritance diagram for pid_logic.PIDLogic:
Inheritance graph
[legend]
Collaboration diagram for pid_logic.PIDLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 
def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Perform required deactivation. More...
 
def getBufferLength (self)
 Get the current data buffer length.
 
def startLoop (self)
 Start the data recording loop.
 
def stopLoop (self)
 Stop the data recording loop.
 
def loop (self)
 Execute step in the data recording loop: save one of each control and process values.
 
def getSavingState (self)
 Return whether we are saving data. More...
 
def startSaving (self)
 Start saving data. More...
 
def saveData (self)
 Stop saving data and write data to file. More...
 
def setBufferLength (self, newBufferLength)
 Change buffer length to new value. More...
 
def get_kp (self)
 Return the proportional constant. More...
 
def set_kp (self, kp)
 Set the proportional constant of the PID controller. More...
 
def get_ki (self)
 Get the integration constant of the PID controller. More...
 
def set_ki (self, ki)
 Set the integration constant of the PID controller. More...
 
def get_kd (self)
 Get the derivative constant of the PID controller. More...
 
def set_kd (self, kd)
 Set the derivative constant of the PID controller. More...
 
def get_setpoint (self)
 Get the current setpoint of the PID controller. More...
 
def set_setpoint (self, setpoint)
 Set the current setpoint of the PID controller. More...
 
def get_manual_value (self)
 Return the control value for manual mode. More...
 
def set_manual_value (self, manualvalue)
 Set the control value for manual mode. More...
 
def get_enabled (self)
 See if the PID controller is controlling a process. More...
 
def set_enabled (self, enabled)
 Set the state of the PID controller. More...
 
def get_control_limits (self)
 Get the minimum and maximum value of the control actuator. More...
 
def set_control_limits (self, limits)
 Set the minimum and maximum value of the control actuator. More...
 
def get_pv (self)
 Get current process input value. More...
 
def get_cv (self)
 Get current control output value. More...
 

Public Attributes

 NumberOfSecondsLog
 
 threadlock
 
 history
 
 savingState
 
 enabled
 
 timer
 

Static Public Attributes

 controller = Connector(interface='PIDControllerInterface')
 declare connectors
 
 savelogic = Connector(interface='SaveLogic')
 
 bufferLength = StatusVar('bufferlength', 1000)
 
 timestep = StatusVar(default=100)
 
 sigUpdateDisplay = QtCore.Signal()
 

Detailed Description

Control a process via software PID.

Member Function Documentation

◆ get_control_limits()

def pid_logic.PIDLogic.get_control_limits (   self)

Get the minimum and maximum value of the control actuator.

Returns
list(float): (minimum, maximum) values of the control actuator

◆ get_cv()

def pid_logic.PIDLogic.get_cv (   self)

Get current control output value.

Returns
float: control output value

◆ get_enabled()

def pid_logic.PIDLogic.get_enabled (   self)

See if the PID controller is controlling a process.

Returns
bool: whether the PID controller is preparing to or conreolling a process

◆ get_kd()

def pid_logic.PIDLogic.get_kd (   self)

Get the derivative constant of the PID controller.

Returns
float: the derivative constant of the PID controller

◆ get_ki()

def pid_logic.PIDLogic.get_ki (   self)

Get the integration constant of the PID controller.

Returns
float: integration constant of the PID controller

◆ get_kp()

def pid_logic.PIDLogic.get_kp (   self)

Return the proportional constant.

Returns
float: proportional constant of PID controller

◆ get_manual_value()

def pid_logic.PIDLogic.get_manual_value (   self)

Return the control value for manual mode.

Returns
float: control value for manual mode

◆ get_pv()

def pid_logic.PIDLogic.get_pv (   self)

Get current process input value.

Returns
float: current process input value

◆ get_setpoint()

def pid_logic.PIDLogic.get_setpoint (   self)

Get the current setpoint of the PID controller.

Returns
float: current set point of the PID controller

◆ getSavingState()

def pid_logic.PIDLogic.getSavingState (   self)

Return whether we are saving data.

Returns
bool: whether we are saving data right now

◆ on_deactivate()

def pid_logic.PIDLogic.on_deactivate (   self)

Perform required deactivation.

◆ saveData()

def pid_logic.PIDLogic.saveData (   self)

Stop saving data and write data to file.

Function does nothing right now.

◆ set_control_limits()

def pid_logic.PIDLogic.set_control_limits (   self,
  limits 
)

Set the minimum and maximum value of the control actuator.

Parameters
list(float)limits: (minimum, maximum) values of the control actuator

This function does nothing, control limits are handled by the control module

◆ set_enabled()

def pid_logic.PIDLogic.set_enabled (   self,
  enabled 
)

Set the state of the PID controller.

Parameters
boolenabled: desired state of PID controller

◆ set_kd()

def pid_logic.PIDLogic.set_kd (   self,
  kd 
)

Set the derivative constant of the PID controller.

Parameters
floatkd: the derivative constant of the PID controller

◆ set_ki()

def pid_logic.PIDLogic.set_ki (   self,
  ki 
)

Set the integration constant of the PID controller.

Parameters
floatki: integration constant of the PID controller

◆ set_kp()

def pid_logic.PIDLogic.set_kp (   self,
  kp 
)

Set the proportional constant of the PID controller.

float kp: proportional constant of PID controller

◆ set_manual_value()

def pid_logic.PIDLogic.set_manual_value (   self,
  manualvalue 
)

Set the control value for manual mode.

Parameters
floatmanualvalue: control value for manual mode of controller

◆ set_setpoint()

def pid_logic.PIDLogic.set_setpoint (   self,
  setpoint 
)

Set the current setpoint of the PID controller.

Parameters
floatsetpoint: new set point of the PID controller

◆ setBufferLength()

def pid_logic.PIDLogic.setBufferLength (   self,
  newBufferLength 
)

Change buffer length to new value.

Parameters
intnewBufferLength: new buffer length

◆ startSaving()

def pid_logic.PIDLogic.startSaving (   self)

Start saving data.

Function does nothing right now.


The documentation for this class was generated from the following file: