INGEAR.NET.ABLink

BT Class

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

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

System.Object
   ABLink.BT

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

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 BT element (e.g "BT13:0.PRE") specify the element name in the Tag.Name (e.g Tag.Name = "BT13:0.PRE") For a detailed description of the BT 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("BT13:0")

' ***********************
' * create a BT class
Dim MyBT As ABLink.BT

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

  If ResultCode.QUAL_GOOD = MyTag.QualityCode Then
  
    ' **********************
    ' * assign value to CTL class
    MyBT = MyTag.Value
    Console.WriteLine(MyBT.EN.ToString())
    Console.WriteLine(MyBT.DN.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("BT13:0");

try
{
   /////////////////////////////////
   // read the tag
   MyPLC.ReadTag(MyTag);
   
   if (ABLink.ResultCode.QUAL_GOOD == MyTag.QualityCode)
   {
     // assign .Value to BT class
     ABLink.BT MyBT = (ABLink.CTL)MyTag.Value;
     Console.WriteLine(MyBT.EN.ToString());
     Console.WriteLine(MyBT.LEN.ToString());
   }
}
catch(System.Exception ex)
{
   Console.WriteLine(ex.Message);
}        
     

Requirements

Namespace: ABLink

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

See Also

BT Members | ABLink Namespace