Class DigitalInput
Represents a digital input of a Beckhoff IO system.
Inheritance
Implements
Inherited Members
Namespace: Loehnert.Lisrt.IO.Beckhoff.Channels
Assembly: Loehnert.Lisrt.IO.Beckhoff.dll
Syntax
public class DigitalInput : ChannelLisrtModuleBase, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasDeviceLabel, IDigitalInput, IHasKey, IHasDescription, IRecordable
Constructors
DigitalInput(AdsVariable)
Initializes a new instance of the DigitalInput class.
Declaration
public DigitalInput(AdsVariable adsReadVariable)
Parameters
Type | Name | Description |
---|---|---|
AdsVariable | adsReadVariable | The ads read variable of the channel where the digital input belongs to. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when any parameter is null. |
System.ArgumentException | Thrown when |
Properties
Description
Gets or sets the translatable description.
Declaration
public ITranslation Description { get; set; }
Property Value
Type | Description |
---|---|
Gu.Localization.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.
Declaration
[DoNotCheckEquality]
public bool IsRecordable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
Declaration
public override ITreeItem TreeItem { get; }
Property Value
Type | Description |
---|---|
ITreeItem |
Overrides
Value
Gets a value indicating whether the input is high or low.
Declaration
public bool Value { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetValue()
Gets the value from the registers.
Declaration
public bool GetValue()
Returns
Type | Description |
---|---|
Boolean | 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.
Declaration
public event EventHandler<RecordValuesReceivedEventArgs> RecordValuesReceived
Event Type
Type | Description |
---|---|
System.EventHandler<RecordValuesReceivedEventArgs> |