Table of Contents

Class ClipXModule

Namespace
Loehnert.Lisrt.Hbm.ClipX
Assembly
Loehnert.Lisrt.Hbm.dll

Represents a module for a ClipX measurement device.

public class ClipXModule : InitializableCompositeModule, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IHasServiceView, IHasDeviceLabel
Inheritance
PropertyChangedBase
ClipXModule
Implements
INotifyPropertyChangedEx
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Examples

This example shows how to set the trigger, await an input and show the records
import clr, time
clr.AddReference("Loehnert.Lisrt.Hbm")
clr.AddReference("Loehnert.Waveforms")

from Loehnert.Lisrt.Hbm.ClipX import RecordMode, RecordTriggerFlag, WaveformValue
from Loehnert.Waveforms import Plotter

ClipX.SetSampleRate(1000)
ClipX.SetTrigger(RecordMode.FillByState, RecordTriggerFlag.DigitalInput1)
 
while(not ClipX.ReadDigitalInput(0)):
    time.sleep(0.001)
    
while(ClipX.ReadDigitalInput(0)):
    time.sleep(0.001)

records = ClipX.ReadWaveforms()
Plotter.Plot(record)

Constructors

ClipXModule(string)

Initializes a new instance of the ClipXModule class.

public ClipXModule(string name)

Parameters

name string

Name of the module.

Properties

DeviceLabel

Gets or sets the label for the device.

[Configuration("")]
public string DeviceLabel { get; set; }

Property Value

string

InstanceID

Gets or sets the ID for this instance.

public int InstanceID { get; set; }

Property Value

int

Methods

ConfigureWaveform(uint, SignalType)

Configures a signalType for the waveformIndex.

public void ConfigureWaveform(uint waveformIndex, SignalType signalType)

Parameters

waveformIndex uint

Index of the waveform (0-5).

signalType SignalType

Value to record.

Exceptions

ArgumentOutOfRangeException

Thrown if waveformIndex is more than 5.

InvalidEnumArgumentException

Thrown if signalType is not a valid SignalType.

NotInitializedException

Thrown when InitializationState is not Initialized or IsInitializing.

Exit()

Exits the module.

public override void Exit()

GetValue(SignalType)

Gets the latest value.

public double GetValue(SignalType signalType = SignalType.Net)

Parameters

signalType SignalType

Value to read.

Returns

double

The latest signalType value.

Exceptions

NotInitializedException

Thrown when InitializationState is not Initialized.

Initialize()

Initializes the module.

public override void Initialize()

ReadDigitalInput(int)

Reads the digital input value.

public bool ReadDigitalInput(int inputIndex)

Parameters

inputIndex int

Index of the digital input (0 or 1).

Returns

bool

True, if the digital input has a high value. Otherwise false.

Exceptions

ArgumentOutOfRangeException

Thrown if inputIndex is not 0(zero) or 1.

NotInitializedException

Thrown when InitializationState is not Initialized.

ReadWaveforms()

Reads the recorded waveforms.

public IReadOnlyList<IWaveform> ReadWaveforms()

Returns

IReadOnlyList<IWaveform>

The recorded waveforms.

Remarks

Reading the waveforms takes about 56ms per 1000 samples in all waveforms.

Exceptions

NotInitializedException

Thrown when InitializationState is not Initialized.

SetSampleRate(float)

Sets the sample rate.

public void SetSampleRate(float samplesPerSecond)

Parameters

samplesPerSecond float

Samples per second.

Exceptions

ArgumentOutOfRangeException

Thrown if samplesPerSecond is not in the range from 0.1 to 1000.0.

NotInitializedException

Thrown when InitializationState is not Initialized.

SetTrigger(RecordingMode, RecordingTriggers)

Sets the record mode and trigger.

public void SetTrigger(RecordingMode recordMode, RecordingTriggers triggers)

Parameters

recordMode RecordingMode

Mode for recording.

triggers RecordingTriggers

Triggers for recording. (Multiple triggers are logical OR combined.)

Exceptions

InvalidEnumArgumentException

Thrown if recordMode is not a valid RecordingMode or triggers is not a valid RecordingTriggers.

NotInitializedException

Thrown when InitializationState is not Initialized.

ShowServiceView()

Shows the service window.

public void ShowServiceView()

Tare()

Tares the value.

public void Tare()

Exceptions

NotInitializedException

Thrown when InitializationState is not Initialized.