Table of Contents

Class DigitalOutput

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

Represents a digital output of a Beckhoff IO system.

public class DigitalOutput : ChannelLisrtModuleBase, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasDeviceLabel, IDigitalOutput, IHasKey, IHasDescription, IHasServiceView
Inheritance
PropertyChangedBase
DigitalOutput
Implements
INotifyPropertyChangedEx
Derived
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

DigitalOutput(AdsVariable)

Initializes a new instance of the DigitalOutput class.

public DigitalOutput(AdsVariable adsWriteVariable)

Parameters

adsWriteVariable AdsVariable

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

Exceptions

ArgumentNullException

Thrown when any parameter is null.

ArgumentException

Thrown when adsWriteVariable has not a size of 1.

Properties

Description

Gets or sets the translatable description.

public ITranslation Description { get; set; }

Property Value

ITranslation

DoNotWriteOnInitialize

Gets or sets a value indicating whether the output should be written on initialization. The output is read from the terminals when writing is disabled.

public bool DoNotWriteOnInitialize { get; set; }

Property Value

bool

IsReadOnly

Gets or sets a value indicating whether the output is read only.

public bool IsReadOnly { get; set; }

Property Value

bool

Remarks

A readonly output can not be written by the SetValue(bool) method or the Value property. But the output can be written by the PLC. Changes written by the PLC are notified and the Value property is getting updated.

TreeItem

Gets the view model for the module tree.

public override ITreeItem TreeItem { get; }

Property Value

ITreeItem

Value

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

public bool Value { get; set; }

Property Value

bool

Exceptions

InvalidOperationException

Thrown when you set the value, and the output is read only (see IsReadOnly).

Methods

GetValue()

Gets the value.

public bool GetValue()

Returns

bool

A value indicating whether the input is high or low.

SetValue(bool)

Sets the value by setting the coil and the ads variable.

public void SetValue(bool value)

Parameters

value bool

The new value.

Exceptions

InvalidOperationException

Thrown when the output is read only (see IsReadOnly).

ShowServiceView()

Shows the service window.

public void ShowServiceView()