Table of Contents

Class DigitalInput

Namespace
Loehnert.Lisrt.IO.Beckhoff.Channels
Assembly
Loehnert.Lisrt.IO.Beckhoff.dll

Represents a digital input of a Beckhoff IO system.

public class DigitalInput : ChannelLisrtModuleBase, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasDeviceLabel, IDigitalInput, IHasKey, IHasDescription, IRecordable
Inheritance
PropertyChangedBase
DigitalInput
Implements
INotifyPropertyChangedEx
Derived
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

DigitalInput(AdsVariable)

Initializes a new instance of the DigitalInput class.

public DigitalInput(AdsVariable adsReadVariable)

Parameters

adsReadVariable AdsVariable

The ads read variable of the channel where the digital input belongs to.

Exceptions

ArgumentNullException

Thrown when any parameter is null.

ArgumentException

Thrown when adsReadVariable has not a size of 1.

Properties

Description

Gets or sets the translatable description.

public ITranslation Description { get; set; }

Property Value

ITranslation

IsRecordable

Gets or sets a value indicating whether the input is recordable. If true, RecordValuesReceived is raised by ADS server for each IO cycle.

[DoNotCheckEquality]
public bool IsRecordable { get; set; }

Property Value

bool

Remarks

Be careful with enabling the IRecordable interface. If true, an ADS notification is registered in the ADS master. More than 500 ADS notification variables slow down the PLC.

TreeItem

Gets the view model for the module tree.

public override ITreeItem TreeItem { get; }

Property Value

ITreeItem

Value

Gets a value indicating whether the input is high or low.

public bool Value { get; }

Property Value

bool

Methods

GetValue()

Gets the value from the registers.

public bool GetValue()

Returns

bool

A value indicating whether the input is high or low.

Events

RecordValuesReceived

Occurs when the ADS server raises a notification for new values and IsRecordable is true.

public event EventHandler<RecordValuesReceivedEventArgs> RecordValuesReceived

Event Type

EventHandler<RecordValuesReceivedEventArgs>