INGEAR.NET.Logix

 

TagGroup.ErrorString Property

String description related to the last TagGroup operation

[Visual Basic]
Public ReadOnly Property ErrorString As String
[C#]
public string ErrorString {get;}

Remarks

Returns an description of the last error for the TagGroup operation

When there is a partial failure of a Controller.GroupRead or Controller.GroupWrite operation (i.e one or more Tags in the TagGroup collection are malformed or nonexistent). the .ErrorString property will contain an Enviroment.NewLine delimited list of offending Tag.Names.

 

VB


Imports Logix ' *********************************** ' * initialize the Controller class Dim MyPLC as New Controller() ' *********************************** ' * initialize TagGroup class Dim tagGroup as New TagGroup ' *********************************** ' * initialize tag classes Dim Tag1 as New Tag("MyIntTag") Dim Tag2 as New Tag("BadTagName") Dim Tag3 as New Tag("MyDintTag") '************************************ '* set controller properties MyPLC.IPAdress = "192.168.1.32" '************************************ '* add tags to the group tagGroup.AddTag(Tag1) tagGroup.AddTag(Tag2) tagGroup.AddTag(Tag3) ' *********************************** ' * update the group MyPLC.GroupRead(tagGroup) ' *********************************** ' * Result of GroupRead If tagGroup.ErrorCode <> ResultCode.E_SUCCESS Then  Console.WriteLine(tagGroup.ErrorString) Else  Console.WriteLine("SUCCESS") End If C#
using Logix; /////////////////////////////////////// // initialize the Controller class Controller MyPLC = new Controller(); /////////////////////////////////////// // initialize TagGroup class TagGroup tagGroup = new TagGroup(); /////////////////////////////////////// // initialize tag classes Tag Tag1 = new Tag("MyIntTag"); Tag Tag2 = new Tag("BadTagName"); Tag Tag3 = new Tag("MyDintTag"); /////////////////////////////////////// // set controller properties MyPLC.IPAdress = "192.168.1.32"; /////////////////////////////////////// // add tags to the group tagGroup.AddTag(Tag1); tagGroup.AddTag(Tag2); tagGroup.AddTag(Tag3); /////////////////////////////////////// // update the group MyPLC.GroupRead(tagGroup); ////////////////////////////////////// // TagGroup Results if (tagGroup.ErrorCode != Logix,ResultCode.E_SUCCESS)  Console.WriteLine(tagGroup.ErrorString); else  Console.WriteLine("SUCCESS");

 

See Also

TagGroup Class | Logix Namespace | ResultCode