INGEAR.NET.ABLink

PD Class

PD Class (PID BLOCK) A class that represents the entire Allen-Bradley PLC-5 PID BLOCK structure from a type 'PD' data table.

For a list of all members of this type, see PD Members.

System.Object
   ABLink.PD

[Visual Basic]
Public Class PD
[C#]
public class PD

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

To read/write a PD element (e.g "PD13:0.Ki") specify the element name in the Tag.Name (e.g Tag.Name = "PD13:0.Ki") For a detailed description of the PD structure please refer to the appropriate Allen-Bradley programmable logic controller instruction manual.

Example

VB
' ************************
' * initialize controller and tag
Dim MyPLC as New ABLink.Controller("192.168.1.32")
Dim MyTag as New ABLink.Tag("PD13:0")

' ***********************
' * create a PD class
Dim MyPD As ABLink.PD

TRY
  ' ***********************
  ' * read the tag
  MyPLC.ReadTag(MyTag)

  If ResultCode.QUAL_GOOD = MyTag.QualityCode Then
  
    ' **********************
    ' * assign value to PD class
    MyPD = MyTag.Value
    Console.WriteLine(MyPD.Ki.ToString())
    Console.WriteLine(MyPD.Kp.ToString())
  End If
    
Catch ex As System.Exception
  Console.WriteLine(ex.Message)
End Try    

C#
///////////////////////////////////
// initialize controller and tag class
ABLink.Controller MyPLC = new Controller("192.168.1.32");
ABLink.Tag MyTag = new ABLink.Tag("PD13:0");

try
{
   /////////////////////////////////
   // read the tag
   MyPLC.ReadTag(MyTag);
   
   if (ABLink.ResultCode.QUAL_GOOD == MyTag.QualityCode)
   {
     // assign .Value to PD class
     ABLink.PD MyPD = (ABLink.PD)MyTag.Value;
     Console.WriteLine(MyPD.Ki.ToString());
     Console.WriteLine(MyPD.Kp.ToString());
   }
}
catch(System.Exception ex)
{
   Console.WriteLine(ex.Message);
}        
     

Requirements

Namespace: ABLink

Assembly: INGEAR.NET.ABLink (in INGEAR.NET.ABLink.dll)

See Also

PD Members | ABLink Namespace