Click or drag to resize

ArrayAttribute Class

Specifies the Array attribute for a tag.
Inheritance Hierarchy
SystemObject
  SystemAttribute
    Demo3D.PLC.Rockwell.Emulator.ModuleEmulatorsArrayAttribute

Namespace:  Demo3D.PLC.Rockwell.Emulator.ModuleEmulators
Assembly:  PLC (in PLC.dll) Version: 18.03.00
Syntax
C#
public sealed class ArrayAttribute : Attribute

The ArrayAttribute type exposes the following members.

Constructors
  NameDescription
Public methodArrayAttribute
Initializes a new instance of the ArrayAttribute class
Top
Properties
  NameDescription
Public propertyDimensions
Array dimensions (or null) as pairs of integers [startIndex, numberOfElements].
Public propertyWidth
Sets the width of a single-dimensional array.
Public propertyWidthParam
Sets the width of a single-dimensional array from the value of a substitution parameter.
Top
Remarks

When used with an array field or property, specifies the array dimensions of the tag.

class ExampleModule {
    class Channel {
        [Auto] bool i_Data;
    }

    [Auto, TagName(ArrayWidth = 4, Name = "Ch{i:00}")]
    Channel[] channels = new Channel[4];
}
would generate the tags
Device:Slot:I.Ch00.Data
Device:Slot:I.Ch01.Data
Device:Slot:I.Ch02.Data
Device:Slot:I.Ch03.Data

See Also