# devices.caenels:CAENelsEasyDriver


Interface class for CAEN ELS EasyDriver power supply.


Usage

``` python
devices.caenels:CAENelsEasyDriver(
    interface,
    **kwargs,
)
```


Provides methods to control and monitor CAEN ELS EasyDriver power supplies through a VISA interface.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize the CAEN ELS EasyDriver. |
| [fetchStatus()](#fetchStatus) | Get the device status. |
| [getCurrent()](#getCurrent) | Get the current output current value. |
| [getCurrentSetpoint()](#getCurrentSetpoint) | Get the current setpoint. |
| [getDCVoltage()](#getDCVoltage) | Get the bulk DC voltage. |
| [getFault()](#getFault) | Check if the module is in fault mode (short circuit). |
| [getID()](#getID) | Get the module ID. |
| [getOutputState()](#getOutputState) | Check if the output is on or off. |
| [getRampSlewRate()](#getRampSlewRate) | Get the configured ramp slew rate. |
| [getVoltage()](#getVoltage) | Get the output voltage. |
| [resetModule()](#resetModule) | Reset the module after a fault (short circuit). |
| [setCurrent()](#setCurrent) | Set the output current abruptly (no ramp). |
| [setOff()](#setOff) | Turn the output off. |
| [setOn()](#setOn) | Turn the output on. |
| [setOutput()](#setOutput) | Set the output current on or off. |
| [setRampCurrent()](#setRampCurrent) | Set the output current with a linear ramp to setpoint. |
| [setRampSlewRate()](#setRampSlewRate) | Set the ramp slew rate. |

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


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


Initialize the CAEN ELS EasyDriver.


Usage

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


#### Parameters


`interface: str`  
VISA resource name of the device

`**kwargs: dict`  
Additional arguments passed to VisaDevice


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


### fetchStatus()


Get the device status.


Usage

``` python
fetchStatus()
```


#### Returns


`tuple`  
A tuple containing: - str: 8-bit binary number as a string where: - bit 0: ouput (1=on, 0=off) - bit 1: fault (1=yes, 0=no) - bit 2: DC link undervoltage - bit 3: mosfet temperature - bit 4: shunt temperature - bit 5: external interlock flag - bit 6: reserved - bit 7: reserved - float: output current


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


### getCurrent()


Get the current output current value.


Usage

``` python
getCurrent()
```


#### Returns


`float`  
The output current in amps


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


### getCurrentSetpoint()


Get the current setpoint.


Usage

``` python
getCurrentSetpoint()
```


#### Returns


`float`  
The current setpoint in amps


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


### getDCVoltage()


Get the bulk DC voltage.


Usage

``` python
getDCVoltage()
```


#### Returns


`float`  
The bulk DC voltage in volts


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


### getFault()


Check if the module is in fault mode (short circuit).


Usage

``` python
getFault()
```


#### Returns


`bool`  
True if fault detected, False otherwise


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


### getID()


Get the module ID.


Usage

``` python
getID()
```


#### Returns


`str`  
The module identification string


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


### getOutputState()


Check if the output is on or off.


Usage

``` python
getOutputState()
```


#### Returns


`bool`  
True if output is on, False if output is off


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


### getRampSlewRate()


Get the configured ramp slew rate.


Usage

``` python
getRampSlewRate()
```


#### Returns


`float`  
The ramp slew rate


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


### getVoltage()


Get the output voltage.


Usage

``` python
getVoltage()
```


#### Returns


`float`  
The output voltage in volts


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


### resetModule()


Reset the module after a fault (short circuit).


Usage

``` python
resetModule()
```


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


### setCurrent()


Set the output current abruptly (no ramp).


Usage

``` python
setCurrent(current)
```


#### Parameters


`current: float`  
The current value to set in amps


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


### setOff()


Turn the output off.


Usage

``` python
setOff()
```


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


### setOn()


Turn the output on.


Usage

``` python
setOn()
```


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


### 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 it off


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


### setRampCurrent()


Set the output current with a linear ramp to setpoint.


Usage

``` python
setRampCurrent(current)
```


#### Parameters


`current: float`  
The target current value in amps


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


### setRampSlewRate()


Set the ramp slew rate.


Usage

``` python
setRampSlewRate(slewrate)
```


#### Parameters


`slewrate: float`  
The slew rate value to set
