# devices.cryogenics:CryogenicPS


Control interface for Cryogenic Power Supply.


Usage

``` python
devices.cryogenics:CryogenicPS(
    interface,
    gpib_addr=4,
    cmds_pers=5,
    field_limit=5,
    **kwargs,
)
```


Provides methods to control and monitor a Cryogenic Power Supply using VISA communication.


## Parameters


`interface: str`  
VISA resource name for the device

`gpib_addr: int = ``4`  
GPIB address, default is 4

`cmds_pers: int = ``5`  
Commands per second, default is 5

`field_limit: float = ``5`  
Maximum field limit in Tesla, default is 5

`**kwargs`  
Additional parameters passed to VisaDevice


## Attributes


`gpib_addr: int`  
GPIB address of the device

`field_limit: float`  
Maximum field limit in Tesla

`tpa: float`  
Tesla per Ampere conversion factor


## Methods

| Name | Description |
|----|----|
| [getOutput()](#getOutput) | Get the current output field and voltage. |
| [getRate()](#getRate) | Get the current ramp rate. |
| [getStatus()](#getStatus) | Return field, rate, voltage, and ramp-status. |
| [getUpdate()](#getUpdate) | Get an update of the device status. |
| [get_ramp_status()](#get_ramp_status) | Get the current ramping status and target field. |
| [id()](#id) | Get the device identifier. |
| [query()](#query) | Send a query command to the device and get the response. |
| [setMax()](#setMax) | Set the maximum field limit. |
| [setMid()](#setMid) | Set the MID field value. |
| [setOutput()](#setOutput) | Set the output field using MID value as setpoint. |
| [setPause()](#setPause) | Pause the ramping operation. |
| [setRate()](#setRate) | Set the output ramp rate in Tesla per minute. |
| [setZero()](#setZero) | Set the field to zero. |

------------------------------------------------------------------------


### getOutput()


Get the current output field and voltage.


Usage

``` python
getOutput(depth=0)
```


#### Parameters


`depth: int = ``0`  
Retry depth for error handling, default is 0


#### Returns


`tuple`  
(field, voltage) - current field in Tesla and voltage or (math.nan, math.nan) if failed


------------------------------------------------------------------------


### getRate()


Get the current ramp rate.


Usage

``` python
getRate()
```


#### Returns


`float`  
Current ramp rate in Tesla per minute


------------------------------------------------------------------------


### getStatus()


Return field, rate, voltage, and ramp-status.


Usage

``` python
getStatus(depth=0)
```


#### Parameters


`depth: int = ``0`  
Retry depth for error handling, default is 0


#### Returns


`tuple`  
(field, setpoint, rate, voltage, status) where status is either 'HOLDING' or 'RAMPING'


------------------------------------------------------------------------


### getUpdate()


Get an update of the device status.


Usage

``` python
getUpdate()
```


#### Returns


`str`  
Status information from the device


------------------------------------------------------------------------


### get_ramp_status()


Get the current ramping status and target field.


Usage

``` python
get_ramp_status(depth=0)
```


#### Parameters


`depth: int = ``0`  
Retry depth for error handling, default is 0


#### Returns


`tuple`  
(status, field) where status is one of: 'HOLDING', 'RAMPING', or 'unknown'


------------------------------------------------------------------------


### id()


Get the device identifier.


Usage

``` python
id()
```


#### Returns


`str`  
The device identifier string


------------------------------------------------------------------------


### query()


Send a query command to the device and get the response.


Usage

``` python
query(command)
```


#### Parameters


`command: str`  
Command string to send to the device


#### Returns


`str`  
The response from the device


------------------------------------------------------------------------


### setMax()


Set the maximum field limit.


Usage

``` python
setMax(value)
```


#### Parameters


`value: float`  
Maximum field limit in Tesla


------------------------------------------------------------------------


### setMid()


Set the MID field value.


Usage

``` python
setMid(value)
```


#### Parameters


`value: float`  
Mid field value in Tesla


------------------------------------------------------------------------


### setOutput()


Set the output field using MID value as setpoint.


Usage

``` python
setOutput(value)
```


#### Parameters


`value: float`  
Target field in Tesla


------------------------------------------------------------------------


### setPause()


Pause the ramping operation.


Usage

``` python
setPause()
```


Note: Currently not implemented.


------------------------------------------------------------------------


### setRate()


Set the output ramp rate in Tesla per minute.


Usage

``` python
setRate(value)
```


#### Parameters


`value: float`  
Desired ramp rate in Tesla per minute


#### Returns


`float`  
Actual ramp rate that was set


------------------------------------------------------------------------


### setZero()


Set the field to zero.


Usage

``` python
setZero()
```
