Search Results for

    Show / Hide Table of Contents

    Class S7Connector

    Inheritance
    System.Object
    S7Connector
    Implements
    IPlcConnectable
    IConnectable
    Namespace: TeleScope.Connectors.Plc.Siemens
    Assembly: TeleScope.Connectors.Plc.Siemens.dll
    Syntax
    public class S7Connector : object, IPlcConnectable, IConnectable

    Constructors

    | Improve this Doc View Source

    S7Connector(S7Setup)

    The default empty constructor instanciates the internal S7 client.

    Declaration
    public S7Connector(S7Setup s7Setup)
    Parameters
    Type Name Description
    S7Setup s7Setup

    Properties

    | Improve this Doc View Source

    IsConnected

    Gets the information if the client is instanciated and connected or not.

    Declaration
    public bool IsConnected { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Result

    Gets the last received result as a string representation from the connected PLC. Attention: Async or concurrent calls may override the value.

    Declaration
    public string Result { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ResultCode

    Gets the last received result code from the connected PLC. Attention: Async or concurrent calls may override the value.

    Declaration
    public int ResultCode { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Connect()

    Opens the connection to the PLC.

    Declaration
    public IConnectable Connect()
    Returns
    Type Description
    IConnectable

    The calling instance.

    | Improve this Doc View Source

    Disconnect()

    Closes the connection from the PLC.

    Declaration
    public IConnectable Disconnect()
    Returns
    Type Description
    IConnectable

    The calling instance.

    | Improve this Doc View Source

    Read<T>()

    A generic read method that covers most common types.

    Declaration
    public T Read<T>()
    Returns
    Type Description
    T

    The result value of type T.

    Type Parameters
    Name Description
    T

    The return type of the method.

    | Improve this Doc View Source

    Select(Object)

    Stores the select parameters in the internal structure Sharp7Parameter and validates the input. Supported types are S7Selector, strings with proper structure and integer arrays, representing the datablock [0], the bit offset [1] and count [2] for bit offsets or character counts.

    Declaration
    public IPlcConnectable Select(object parameter)
    Parameters
    Type Name Description
    System.Object parameter

    The generic object may contain the select parameters in different forms.

    Returns
    Type Description
    IPlcConnectable

    The calling instance.

    | Improve this Doc View Source

    Select(Object[])

    Stores the select parameters in the internal structure Sharp7Parameter and validates the array beforehand. The parameter array must contain three integers repesenting the datablock [0], the bit offset [1] and the count [2] for bit offsets or character counts.

    Declaration
    public IPlcConnectable Select(object[] parameters)
    Parameters
    Type Name Description
    System.Object[] parameters

    The array of S7 parameters to select and read lateron the data.

    Returns
    Type Description
    IPlcConnectable

    The calling instance.

    | Improve this Doc View Source

    Select(S7Selector)

    Stores the select parameters to read or write to the PLC lateron.

    Declaration
    public IPlcConnectable Select(S7Selector parameter)
    Parameters
    Type Name Description
    S7Selector parameter

    The S7 specific parameters.

    Returns
    Type Description
    IPlcConnectable

    The calling instance.

    | Improve this Doc View Source

    Write<T>(T)

    Declaration
    public void Write<T>(T data)
    Parameters
    Type Name Description
    T data
    Type Parameters
    Name Description
    T

    Events

    | Improve this Doc View Source

    Completed

    Declaration
    public event ConnectorCompletedEventHandler Completed
    Event Type
    Type Description
    ConnectorCompletedEventHandler
    | Improve this Doc View Source

    Connected

    Declaration
    public event ConnectorEventHandler Connected
    Event Type
    Type Description
    ConnectorEventHandler
    | Improve this Doc View Source

    Disconnected

    Declaration
    public event ConnectorEventHandler Disconnected
    Event Type
    Type Description
    ConnectorEventHandler
    | Improve this Doc View Source

    Failed

    Declaration
    public event ConnectorFailedEventHandler Failed
    Event Type
    Type Description
    ConnectorFailedEventHandler

    Implements

    IPlcConnectable
    IConnectable
    • GITHUB
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Copyright 2020-2022 TeleScope-dotnet. Generated by DocFX.
    ☀
    ☾