Class MeasureMuxModule
- Namespace
- Loehnert.Lisrt.CircuitBoard.L15B63
- Assembly
- Loehnert.Lisrt.CircuitBoard.L15B63.dll
Represents a measure multiplexer board L15B63 and L2109016. Depends on project L15B63, L2001047.
public class MeasureMuxModule : LisrtModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IHasDeviceLabel, IHasServiceView
- Inheritance
-
PropertyChangedBaseMeasureMuxModule
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Constructors
MeasureMuxModule(string, ICanCommunication2)
Initializes a new instance of the MeasureMuxModule class.
public MeasureMuxModule(string name, ICanCommunication2 canCommunication)
Parameters
name
stringName for the module.
canCommunication
ICanCommunication2Can communication.
Exceptions
- ArgumentNullException
Thrown
name
is null or empty orcanCommunication
is null.
Properties
CardAddress
Gets or sets the card address.
[Configuration(0)]
public uint CardAddress { get; set; }
Property Value
DeviceLabel
Gets or sets the device label.
[Configuration("")]
public string DeviceLabel { get; set; }
Property Value
Icon
Gets the icon which is representative for the module.
public override Uri Icon { get; }
Property Value
InitializationState
Gets the current initialization state.
public InitializationState InitializationState { get; }
Property Value
InstanceID
Gets or sets the ID for the instance.
[Configuration(0)]
public int InstanceID { get; set; }
Property Value
SelfTestType
Gets or sets the self test type.
[Configuration(SelfTestType.ExcludingHighPowerPath)]
public SelfTestType SelfTestType { get; set; }
Property Value
Methods
AcknowledgeErrors()
Acknowledges the device errors.
public State AcknowledgeErrors()
Returns
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
DoFunction(byte, IEnumerable<byte>)
Executes a function.
protected IEnumerable<byte> DoFunction(byte functionCode, IEnumerable<byte> data = null)
Parameters
functionCode
byteFunction code.
data
IEnumerable<byte>Data for the function or default.
Returns
- IEnumerable<byte>
The answer data of the function.
Exit()
De initializes the object.
public void Exit()
GetAnalogInput(string)
Gets a analog input value [V] by its device labels.
public virtual double GetAnalogInput(string deviceLabel)
Parameters
deviceLabel
stringDevice label of the analog input. AN02 to AN05.
Returns
- double
The analog input voltage in volts.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
GetAnalogOutput()
Gets the analog output value [V].
public double GetAnalogOutput()
Returns
- double
The analog output voltage in volts.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
GetDigitalInputsDeviceLabels()
Gets the device labels of active digital inputs and the plugged jumpers.
public IEnumerable<string> GetDigitalInputsDeviceLabels()
Returns
- IEnumerable<string>
Device labels of the active digital inputs. Some of: AN09, AN10, RG12 to RG15, RC1, RC2, JP1_1, JP1_2 and JP1_3.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
GetDigitalOutputDeviceLabels()
Gets the device labels of the set digital outputs.
public IEnumerable<string> GetDigitalOutputDeviceLabels()
Returns
- IEnumerable<string>
Device labels of the set digital outputs. Some of: RD_9, RD_10.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
GetFirmwareVersion()
Gets the firmware version.
public Version GetFirmwareVersion()
Returns
- Version
The firmware version.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
GetRelayCounter(byte)
Gets the cycle count of the relay.
public uint GetRelayCounter(byte relayNumber)
Parameters
relayNumber
byteRelay number from 1 to 72.
Returns
- uint
Cycle count of the relay.
GetRelayCounter(string)
Gets the cycle count of the relay.
public uint GetRelayCounter(string deviceLabel)
Parameters
deviceLabel
stringRelay device label.
Returns
- uint
Cycle count of the relay.
Remarks
The device label can be one of: K_A1 to K_A24, K_E1 to K_E24, K_B1 to K_B4, K_B5_6 to K_B23_24 and K_AP1_A, K_AP1_B, K_AP2_A, K_AP2_B, K_EP1_A, K_EP1_B and K_F10, K_S10, A_RES_1, A_RES_2.
GetRelayDeviceLabels()
Gets the device labels of the set relays.
public IEnumerable<string> GetRelayDeviceLabels()
Returns
- IEnumerable<string>
Device labels of the set relays.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
Initialize()
Initializes the module.
public void Initialize()
RunSelftest(CancellationToken)
Runs the self test.
public virtual SelftestResult RunSelftest(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to cancel the self test.
Returns
- SelftestResult
The result of the self test.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
- OperationCanceledException
Thrown when cancellation requested.
SetAnalogOutput(double)
Sets the analog output value [V].
public void SetAnalogOutput(double value)
Parameters
value
doubleThe voltage in volts for the analog output.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
- ArgumentOutOfRangeException
Thrown when
value
is out of range.
SetDigitalOutputs(IEnumerable<string>)
Sets the digital outputs by its device labels ("RD9" and "RD10" are supported).
public void SetDigitalOutputs(IEnumerable<string> deviceLabels)
Parameters
deviceLabels
IEnumerable<string>Device labels of the digital outputs to set. Must be "RD9" or "RD10".
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
- ArgumentException
Thrown when
deviceLabels
contains a not known device label.
SetRelays(IEnumerable<string>)
Sets the relays by its device labels. K_A1 to K_A24, K_E1 to K_E24, K_B1 to K_B4, K_B5_6 to K_B23_24 and K_AP1_A, K_AP1_B, K_AP2_A, K_AP2_B, K_EP1_A, K_EP1_B and K_F10, K_S10, A_RES_1, A_RES_2.
public void SetRelays(IEnumerable<string> deviceLabels)
Parameters
deviceLabels
IEnumerable<string>Device labels of the relays to set.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized or IsInitializing.
ShowServiceView()
Shows the service window.
public void ShowServiceView()