Table of Contents

Class Port

Namespace
L5Sharp.Elements
Assembly
L5Sharp.dll

A component of a Module that represents the means for connecting devices on a network or in a chassis.

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

Remarks

A Port is a component that helps define the structure of the IO tree. Each port may contain the slot on the chassis or backplane where the Module resides, or the the network address (IP) of the device. Each port may (or may not) have a BusSize. Each port is identifiable by the Id property.

Constructors

Port()

Creates a new Port with default values.

public Port()

Port(XElement)

Creates a new Port initialized with the provided XElement.

public Port(XElement element)

Parameters

element XElement

The XElement to initialize the type with.

Exceptions

ArgumentNullException

element is null.

Properties

Address

Gets the address of the Port.

public Address Address { get; set; }

Property Value

Address

Remarks

The Address of a port represents the slot or IP address for the port. This value is used in the Module to determine the slot and IP properties. All ports must have an Address.

BusSize

Gets the bus size or rack size of the port.

public byte? BusSize { get; set; }

Property Value

byte?

Remarks

A port's bus represents the chassis or network on which Modules are accessible to the port. Only downstream modules will have a valid Bus.

Id

Gets the Id of the Port.

public int Id { get; set; }

Property Value

int

Remarks

All Modules have at least one port. Each is identified by the Id property. Typically Modules will have one or two ports with Ids '1' and '2', respectively.

Type

Gets the value that represents the Port type.

public string? Type { get; set; }

Property Value

string

Remarks

This value appears to be specific to the product. Ports with IP will have 'Network' for their type. This property is required for importing a Module correctly.

Upstream

Gets the value indicating whether the there are devices upstream of the current Port.

public bool Upstream { get; set; }

Property Value

bool

Remarks

From examining the L5X examples, the upstream flag seems to indicate that the port is one connected to a parent module living 'upstream' of the current device. Non-upstream ports seem to indicate they contain child modules, or connect to devices living 'downstream' of the current Module. This property must be set correctly to be able to import L5X.