Class SimulatedXDrive
Represents a simulated Franklin Electric CerusXDrive Variable Frequency Drive controller. Provides methods to simulate the behavior of an CerusXDrive device without requiring actual hardware.
Assembly: CerusXDrive.dll
View Source
public class SimulatedXDrive : IXDrive
Implements:
Meadow.Foundation.VFDs.IXDrive
Methods
Connect()
Simulates establishing a connection to the CerusXDrive device.
View Source
public Task Connect()
Returns
System.Threading.Tasks.Task: A task representing the asynchronous connection operation.
Disconnect()
Simulates disconnecting from the CerusXDrive device.
View Source
public void Disconnect()
ReadErrorCodes()
Simulates reading the current error codes from the CerusXDrive.
View Source
public Task<ushort> ReadErrorCodes()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the error code.
ReadOperationalStatus()
Simulates reading the current operational status of the CerusXDrive.
View Source
public Task<ushort> ReadOperationalStatus()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the operational status code.
ReadOutputFrequency()
Simulates reading the current output frequency of the CerusXDrive.
View Source
public Task<Frequency> ReadOutputFrequency()
Returns
System.Threading.Tasks.Task<Meadow.Units.Frequency>: A task that represents the asynchronous operation. The value is the output frequency in Hertz.
ReadOutputCurrent()
Simulates reading the current output current of the CerusXDrive.
View Source
public Task<Current> ReadOutputCurrent()
Returns
System.Threading.Tasks.Task<Meadow.Units.Current>: A task that represents the asynchronous operation. The value is the output current in Amps.
ReadDCBusVoltage()
Simulates reading the current DC bus voltage of the CerusXDrive.
View Source
public Task<Voltage> ReadDCBusVoltage()
Returns
System.Threading.Tasks.Task<Meadow.Units.Voltage>: A task that represents the asynchronous operation. The value is the DC bus voltage in Volts.
ReadOutputVoltage()
Simulates reading the current output voltage of the CerusXDrive.
View Source
public Task<Voltage> ReadOutputVoltage()
Returns
System.Threading.Tasks.Task<Meadow.Units.Voltage>: A task that represents the asynchronous operation. The value is the output voltage in Volts.
ReadIGBTTemperature()
Simulates reading the current IGBT (Insulated Gate Bipolar Transistor) temperature of the CerusXDrive.
View Source
public Task<Temperature> ReadIGBTTemperature()
Returns
System.Threading.Tasks.Task<Meadow.Units.Temperature>: A task that represents the asynchronous operation. The value is the IGBT temperature in Celsius.
ReadAmbientTemperature()
Simulates reading the current ambient temperature around the CerusXDrive.
View Source
public Task<Temperature> ReadAmbientTemperature()
Returns
System.Threading.Tasks.Task<Meadow.Units.Temperature>: A task that represents the asynchronous operation. The value is the ambient temperature in Celsius.
ReadDriveStatus()
Simulates reading the current drive status of the CerusXDrive.
View Source
public Task<ushort> ReadDriveStatus()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the drive status code.
ReadControlMode()
Simulates reading the current control mode of the CerusXDrive.
View Source
public Task<ushort> ReadControlMode()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the control mode code.
ReadDigitalOutputStatus()
Simulates reading the current digital output status of the CerusXDrive.
View Source
public Task<ushort> ReadDigitalOutputStatus()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the digital output status code.
ReadDigitalInputStatus()
Simulates reading the current digital input status of the CerusXDrive.
View Source
public Task<ushort> ReadDigitalInputStatus()
Returns
System.Threading.Tasks.Task<System.UInt16>: A task that represents the asynchronous operation. The value is the digital input status code.
SetOutputFrequency(double)
Sets the simulated output frequency value.
View Source
public void SetOutputFrequency(double frequency)
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | frequency | The frequency value in Hertz. |
SetErrorCode(ushort)
Sets the simulated error code.
View Source
public void SetErrorCode(ushort errorCode)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt16 | errorCode | The error code to set. |
SetOperationalStatus(OperationalStatus)
Sets the simulated operational status.
View Source
public void SetOperationalStatus(OperationalStatus status)
Parameters
| Type | Name | Description |
|---|---|---|
| Meadow.Foundation.VFDs.OperationalStatus | status | The operational status to set. |
SetDCBusVoltage(double)
Sets the simulated DC bus voltage.
View Source
public void SetDCBusVoltage(double voltage)
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | voltage | The voltage value in Volts. |
SetAmbientTemperature(double)
Sets the simulated ambient temperature.
View Source
public void SetAmbientTemperature(double temperature)
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | temperature | The temperature value in Celsius. |
SetDriveStatus(ushort)
Sets the simulated drive status.
View Source
public void SetDriveStatus(ushort status)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt16 | status | The drive status code to set. |
SetControlMode(ushort)
Sets the simulated control mode.
View Source
public void SetControlMode(ushort mode)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt16 | mode | The control mode code to set. |
SetDigitalOutputStatus(ushort)
Sets the simulated digital output status.
View Source
public void SetDigitalOutputStatus(ushort status)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt16 | status | The digital output status code to set. |
SetDigitalInputStatus(ushort)
Sets the simulated digital input status.
View Source
public void SetDigitalInputStatus(ushort status)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt16 | status | The digital input status code to set. |
SimulatePhaseUFault()
Simulates a phase U fault in the drive.
View Source
public void SimulatePhaseUFault()
SimulatePhaseVFault()
Simulates a phase V fault in the drive.
View Source
public void SimulatePhaseVFault()
SimulatePhaseWFault()
Simulates a phase W fault in the drive.
View Source
public void SimulatePhaseWFault()
ClearFaults()
Clears all simulated faults.
View Source
public void ClearFaults()
SimulateStartWithRamp(double, double)
Simulates starting the drive with a ramp up to the specified frequency.
View Source
public Task SimulateStartWithRamp(double targetFrequency, double rampTimeSeconds)
Returns
System.Threading.Tasks.Task: A task representing the asynchronous operation.
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | targetFrequency | The target frequency in Hertz. |
System.Double | rampTimeSeconds | The time to ramp up in seconds. |
SimulateStopWithRamp(double)
Simulates stopping the drive with a ramp down to zero frequency.
View Source
public Task SimulateStopWithRamp(double rampTimeSeconds)
Returns
System.Threading.Tasks.Task: A task representing the asynchronous operation.
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | rampTimeSeconds | The time to ramp down in seconds. |