Class Rung
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
NeutralTextThe NeutralText representing the rung logic.
comment
stringThe 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)
public Rung(XElement element)
Parameters
Exceptions
- ArgumentNullException
element
is null.
Properties
Comment
The text comment of the Rung.
public string? Comment { get; set; }
Property Value
Number
The zero based number indicating the position of the Rung within the containing routine.
public int Number { get; set; }
Property Value
Text
The logic of the Rung as a NeutralText value.
public NeutralText Text { get; set; }
Property Value
Type
The RungType, indicating edit state option of the rung.
public RungType? Type { get; set; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.