Skip to main content

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​
Declaration
public class SimulatedXDrive : IXDrive

Implements:
Meadow.Foundation.VFDs.IXDrive

Methods​

Connect()​

Simulates establishing a connection to the CerusXDrive device.

View Source​
Declaration
public Task Connect()
Returns​

System.Threading.Tasks.Task: A task representing the asynchronous connection operation.

Disconnect()​

Simulates disconnecting from the CerusXDrive device.

View Source​
Declaration
public void Disconnect()

ReadErrorCodes()​

Simulates reading the current error codes from the CerusXDrive.

View Source​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
public void SetOutputFrequency(double frequency)
Parameters​
TypeNameDescription
System.DoublefrequencyThe frequency value in Hertz.

SetErrorCode(ushort)​

Sets the simulated error code.

View Source​
Declaration
public void SetErrorCode(ushort errorCode)
Parameters​
TypeNameDescription
System.UInt16errorCodeThe error code to set.

SetOperationalStatus(OperationalStatus)​

Sets the simulated operational status.

View Source​
Declaration
public void SetOperationalStatus(OperationalStatus status)
Parameters​
TypeNameDescription
Meadow.Foundation.VFDs.OperationalStatusstatusThe operational status to set.

SetDCBusVoltage(double)​

Sets the simulated DC bus voltage.

View Source​
Declaration
public void SetDCBusVoltage(double voltage)
Parameters​
TypeNameDescription
System.DoublevoltageThe voltage value in Volts.

SetAmbientTemperature(double)​

Sets the simulated ambient temperature.

View Source​
Declaration
public void SetAmbientTemperature(double temperature)
Parameters​
TypeNameDescription
System.DoubletemperatureThe temperature value in Celsius.

SetDriveStatus(ushort)​

Sets the simulated drive status.

View Source​
Declaration
public void SetDriveStatus(ushort status)
Parameters​
TypeNameDescription
System.UInt16statusThe drive status code to set.

SetControlMode(ushort)​

Sets the simulated control mode.

View Source​
Declaration
public void SetControlMode(ushort mode)
Parameters​
TypeNameDescription
System.UInt16modeThe control mode code to set.

SetDigitalOutputStatus(ushort)​

Sets the simulated digital output status.

View Source​
Declaration
public void SetDigitalOutputStatus(ushort status)
Parameters​
TypeNameDescription
System.UInt16statusThe digital output status code to set.

SetDigitalInputStatus(ushort)​

Sets the simulated digital input status.

View Source​
Declaration
public void SetDigitalInputStatus(ushort status)
Parameters​
TypeNameDescription
System.UInt16statusThe digital input status code to set.

SimulatePhaseUFault()​

Simulates a phase U fault in the drive.

View Source​
Declaration
public void SimulatePhaseUFault()

SimulatePhaseVFault()​

Simulates a phase V fault in the drive.

View Source​
Declaration
public void SimulatePhaseVFault()

SimulatePhaseWFault()​

Simulates a phase W fault in the drive.

View Source​
Declaration
public void SimulatePhaseWFault()

ClearFaults()​

Clears all simulated faults.

View Source​
Declaration
public void ClearFaults()

SimulateStartWithRamp(double, double)​

Simulates starting the drive with a ramp up to the specified frequency.

View Source​
Declaration
public Task SimulateStartWithRamp(double targetFrequency, double rampTimeSeconds)
Returns​

System.Threading.Tasks.Task: A task representing the asynchronous operation.

Parameters​
TypeNameDescription
System.DoubletargetFrequencyThe target frequency in Hertz.
System.DoublerampTimeSecondsThe time to ramp up in seconds.

SimulateStopWithRamp(double)​

Simulates stopping the drive with a ramp down to zero frequency.

View Source​
Declaration
public Task SimulateStopWithRamp(double rampTimeSeconds)
Returns​

System.Threading.Tasks.Task: A task representing the asynchronous operation.

Parameters​
TypeNameDescription
System.DoublerampTimeSecondsThe time to ramp down in seconds.

Implements​