INGEAR.NET.ABLink

SC Class

SC Class (SEQUENTIAL FUNCTION CHART) A class that represents the entire Allen-Bradley PLC-5 SFC structure from a type 'SC' data table.

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

System.Object
   ABLink.SC

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

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

' ***********************
' * create a SC class
Dim MySC As ABLink.SC

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

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

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

Requirements

Namespace: ABLink

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

See Also

SC Members | ABLink Namespace