Class AnalogControlledPowerSupplyModule
- Namespace
 - Loehnert.Lisrt.PowerSupply
 
- Assembly
 - Loehnert.Lisrt.PowerSupply.dll
 
Represents an analog controlled power supply.
public class AnalogControlledPowerSupplyModule : PowerSupplyModuleBase, IHasDeviceLabel, IHasServiceView, IPowerSupply, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged
  - Inheritance
 - 
      
      PropertyChangedBaseAnalogControlledPowerSupplyModule
 
- Implements
 - 
      
      
      
      
      
      
      INotifyPropertyChangedEx
 
- Derived
 
- Inherited Members
 - 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
 
Examples
This example creates an analog controlled power supply, that supports only voltage control.
var voltageControlOutput = ...;
var powerSupply = new AnalogControlledPowerSupplyModule(
    name: "PowerSupply",
    analogVoltageOutput: voltageControlOutput,
    analogCurrentOutput: null);
// When the voltageControlOutput implements ILisrtModule, you should add it to the SubModules,
// for example to access the adjustment via the service view.
powerSupply.SubModules.Add(voltageControlOutput);
  Remarks
The adjustment is made via the analog outputs, Adjustment.
Constructors
AnalogControlledPowerSupplyModule(string, IAnalogOutput, IAnalogOutput)
Initializes a new instance of the AnalogControlledPowerSupplyModule class.
public AnalogControlledPowerSupplyModule(string name, IAnalogOutput analogVoltageOutput, IAnalogOutput analogCurrentOutput)
  Parameters
namestringName of the module.
analogVoltageOutputIAnalogOutputOptional analog output, which is connected to the power supply to control the voltage.
analogCurrentOutputIAnalogOutputOptional analog output, which is connected to the power supply to control the current.
Exceptions
- ArgumentNullException
 Thrown when
nameis null.
Properties
CurrentScalingFactor
Gets or sets the factor with which the current input is scaled.
[Configuration(1, Description = "The factor with which the current input is scaled.")]
public virtual double CurrentScalingFactor { get; set; }
  Property Value
Examples
Power supply output current is 5A at 10V input voltage, the factor is 0.5.
InitializationState
Gets or sets the initialization state.
public InitializationState InitializationState { get; protected set; }
  Property Value
SubModules
Gets the sub modules.
public ILisrtModuleCollection SubModules { get; }
  Property Value
VoltageScalingFactor
Gets or sets the factor with which the voltage input is scaled.
[Configuration(1, Description = "The factor with which the voltage input is scaled.")]
public virtual double VoltageScalingFactor { get; set; }
  Property Value
Examples
Power supply output voltage is 24V at 10V input voltage, the factor is 2.4.
Methods
Exit()
De initializes the module.
public virtual void Exit()
  Initialize()
Initializes the module.
public virtual void Initialize()
  Exceptions
- InvalidOperationException
 Thrown when any IInitializable analog output is not Initialized.
SetCurrent(double)
Sets the current.
public override void SetCurrent(double current)
  Parameters
currentdoubleCurrent in Ampere to regulate.
Exceptions
- NotInitializedException
 Thrown when the module is not initialized.
- ArgumentOutOfRangeException
 Thrown when
currentis greater than MaximumCurrent.- NotSupportedException
 Thrown when no IAnalogOutput for current is set.
SetOutput(bool)
Enables or disables the output.
public override void SetOutput(bool isEnabled)
  Parameters
isEnabledboolState for the output.
Exceptions
- NotInitializedException
 Thrown when the module is not initialized.
SetVoltage(double)
Sets the voltage.
public override void SetVoltage(double voltage)
  Parameters
voltagedoubleVoltage in Volt to regulate.
Exceptions
- NotInitializedException
 Thrown when the module is not initialized.
- ArgumentOutOfRangeException
 Thrown when
voltageis greater than MaximumVoltage.- NotSupportedException
 Thrown when no IAnalogOutput for voltage is set.
SetVoltageAndCurrent(double, double)
Sets the voltage, current and enables the output.
public override void SetVoltageAndCurrent(double voltage, double current)
  Parameters
Exceptions
- NotSupportedException
 Thrown when no IAnalogOutput for voltage or current is set.
- NotInitializedException
 Thrown when the module is not initialized.
- ArgumentOutOfRangeException
 Thrown when
voltageis greater than MaximumVoltage orcurrentis greater than MaximumCurrent.