# devices.danfysik:Danfysik9100


Driver for Danfysik 9100 power supply.


Usage

``` python
devices.danfysik:Danfysik9100(
    interface,
    **kwargs,
)
```


Provides methods to control and monitor Danfysik 9100 power supplies through a VISA interface.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize the Danfysik 9100 power supply. |
| [fetchStatus()](#fetchStatus) | Get the device status. |
| [getCurrent()](#getCurrent) | Get the actual current at the device output. |
| [getCurrentSetting()](#getCurrentSetting) | Get the output current setting value. |
| [getPolarityStatus()](#getPolarityStatus) | Get the current polarity status. |
| [getRampStatus()](#getRampStatus) | Get the current ramping status. |
| [getVoltage()](#getVoltage) | Get the actual voltage at the device output. |
| [getVoltageSetting()](#getVoltageSetting) | Get the output voltage setting value. |
| [id()](#id) | Get the device ID. |
| [resetInterlocks()](#resetInterlocks) | Reset the interlock state. |
| [setCurrent()](#setCurrent) | Set the output current. |
| [setOutput()](#setOutput) | Set the output current on or off. |
| [setPolarity()](#setPolarity) | Set the polarity of the power supply. |
| [setRemote()](#setRemote) | Change to remote control mode. |
| [setVoltage()](#setVoltage) | Set the output voltage in ppm. |

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


### \_\_init\_\_()


Initialize the Danfysik 9100 power supply.


Usage

``` python
__init__(
    interface,
    **kwargs,
)
```


#### Parameters


`interface: str`  
VISA resource name for the device interface

`**kwargs: dict`  
Optional parameters: write_termination : str Character(s) to append to each write command read_termination : str Character(s) that indicate end of read baud_rate : int Serial communication baud rate timeout : float Communication timeout in milliseconds cmdpers : int Commands per second limitation


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


### fetchStatus()


Get the device status.


Usage

``` python
fetchStatus()
```


#### Returns


`dict`  
Dictionary containing status information for various device states. Example output format: "! . ! . ! ! . . . ! . . . . ! . . . . . . . ! ."


#### Notes

Status bits: \#1 . . . . . MAIN POWER OFF (!=OFF .=ON) \#2 . . . . . POLARITY NORMAL (!=Polarity Normal) \#3 . . . . . POLARITY REVERSED (!=Polarity REVERSED) \#4 . . . . . NOT USED \#5 . . . . . CROWBAR ON (!=ON .=OFF) \#6 . . . . . I-MODE (!=I-mode .=V-mode) \#7 . . . . . != % , . = AMPS and VOLTS \#8 . . . . . EXTERNAL INTERLOCK 0 (!=Interlock .=No interlock) \#9 . . . . . NOT USED. \#10 . . . . . SUM - INTERLOCK (!=Sum interlock .=No sum interlock) \#11 . . . . . OVER VOLTAGE (OVP) (!=over voltage .=No over voltage) \#12 . . . . . DC OVER CURRENT (OCP) (!=over current .=No over current) \#13 . . . . . DC UNDERVOLTAGE (!=Fault .=OK) \#14 . . . . . NOT USED \#15 . . . . . PHASE FAILURE (AC LINE OK) (!=Fault .=OK) \#16 . . . . . NOT USED \#17 . . . . . EARTH LEAKAGE (!=Fault .=OK) \#18 . . . . . FAN (!=Fault .=OK) \#19 . . . . . MPS OVERTEMPERATURE (!=Fault .=OK) \#20 . . . . . EXTERNAL INTERLOCK 1 (!=Interlock .=No interlock) \#21 . . . . . EXTERNAL INTERLOCK 2 (!=Interlock .=No interlock) \#22 . . . . . EXTERNAL INTERLOCK 3 (!=Interlock .=No interlock) \#23 . . . . . MPS NOT READY (!=Not ready .=Ready) \#24 . . . . . NOT USED.

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


### getCurrent()


Get the actual current at the device output.


Usage

``` python
getCurrent()
```


#### Returns


`float`  
Output current in Amperes


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


### getCurrentSetting()


Get the output current setting value.


Usage

``` python
getCurrentSetting()
```


#### Returns


`float`  
Current setting in Amperes


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


### getPolarityStatus()


Get the current polarity status.


Usage

``` python
getPolarityStatus()
```


#### Returns


`str`  
"+" for positive polarity, "-" for negative polarity


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


### getRampStatus()


Get the current ramping status.


Usage

``` python
getRampStatus()
```


#### Returns


`bool`  
True if ramping, False if stopped


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


### getVoltage()


Get the actual voltage at the device output.


Usage

``` python
getVoltage()
```


#### Returns


`float`  
Output voltage in Volts


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


### getVoltageSetting()


Get the output voltage setting value.


Usage

``` python
getVoltageSetting()
```


#### Returns


`float`  
Voltage setting in Volts


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


### id()


Get the device ID.


Usage

``` python
id()
```


#### Returns


`str`  
Device identification string


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


### resetInterlocks()


Reset the interlock state.


Usage

``` python
resetInterlocks()
```


This command clears all active interlocks.


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


### setCurrent()


Set the output current.


Usage

``` python
setCurrent(setpoint)
```


#### Parameters


`setpoint: float`  
Current setpoint in Amperes


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


### setOutput()


Set the output current on or off.


Usage

``` python
setOutput(output=None)
```


#### Parameters


`output: bool = None`  
True to turn output on, False to turn output off


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


### setPolarity()


Set the polarity of the power supply.


Usage

``` python
setPolarity(polarity)
```


#### Parameters


`polarity: str`  
"+" for positive polarity, "-" for negative polarity


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


### setRemote()


Change to remote control mode.


Usage

``` python
setRemote()
```


This command switches the device to remote operation.


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


### setVoltage()


Set the output voltage in ppm.


Usage

``` python
setVoltage(setpoint)
```


#### Parameters


`setpoint: int`  
Voltage setpoint in parts per million
