Table of Contents

Class Rung

Namespace
L5Sharp.Elements
Assembly
L5Sharp.dll

A Logix Rung element containing the properties for a L5X Rung component.

public sealed class Rung : LogixElement, ILogixSerializable
Inheritance
Rung
Implements
Inherited Members

Constructors

Rung()

Creates a new Rung with default values.

public Rung()

Rung(NeutralText, string?)

Creates a new Rung initialized with the provided NeutralText.

public Rung(NeutralText text, string? comment = null)

Parameters

text NeutralText

The NeutralText representing the rung logic.

comment string

The optional string comment of the rung. Default is null (no comment).

Remarks

This will initialize Number to '0' and Type to 'Normal'. When importing, Logix ignores the rung number and imports Rung's in order of the container sequence, meaning, its really only necessary to specify valid text, which is why this constructor is available, allowing concise construction of a Rung object.

Rung(XElement)

Creates a new Rung initialized with the provided XElement.

public Rung(XElement element)

Parameters

element XElement

The XElement to initialize the type with.

Exceptions

ArgumentNullException

element is null.

Properties

Comment

The text comment of the Rung.

public string? Comment { get; set; }

Property Value

string

A string containing the text comment of the Rung.

Number

The zero based number indicating the position of the Rung within the containing routine.

public int Number { get; set; }

Property Value

int

Text

The logic of the Rung as a NeutralText value.

public NeutralText Text { get; set; }

Property Value

NeutralText

Type

The RungType, indicating edit state option of the rung.

public RungType? Type { get; set; }

Property Value

RungType

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.