ST_NLinkSettings

TYPE ST_NLinkSettings:
STRUCT
    sSrvNetID         : T_AmsNetID := ''; (* The network address of the TcpIpServer.exe. If empty string=>server runs on local system *)
    eProtocol         : E_NLinkProtocol := eNLinkProtocol_IBH_SX_PP; (* Lan link protocol type *)
    eTransport        : E_NLinkTransport := eNLinkTransport_TCPIP;(* Used transport protocol *)
     sHost            : T_IPv4Addr := '127.0.0.1'; (* Remote (server) address. String containing an (Ipv4) Internet Protocol dotted address. *)
    nPort             : UDINT := 2002; (* Remote (server) Internet Protocol (IP) port. *)
    local_T_selector  : STRING := '00 01';(* local-transport-selector *)
    remote_T_selector : STRING := '00 01';(* remote-transport-selector *)
    bServer           : BOOL := FALSE; (* Reserved: TRUE = server connection, FALSE = client connection *)
    bThrottle         : BOOL := FALSE; (* If set reduces the number of polling socket read requests *)
    debug             : ST_NLinkDebug;
END_STRUCT
END_TYPE

sSrvNetID: TwinCAT network address of the TwinCAT TCP/IP connection server (default = empty string).

eProtocol: the communication protocol to be used is set via this parameter.

eTransport: the transport protocol to be used is set via this parameter.

sHost: string containing the network address (Ipv4) of the communication partner (default = '127.0.0.1').

nPort: Internet Protocol (IP) port (default = 2002).

local_T_selector: local TSAP address (reserved).

remote_T_selector: remote TSAP address (reserved).

bServer: FALSE = client (active) connection. TRUE = server (passive) connection. Currently only client connections are permitted.

bThrottle: if this parameter is set, then the number of polling socket calls is reduced if no or few data are received, i.e. the poll cycle is slowed down and thus the system load is reduced (default = FALSE ).

debug: optional debug output settings.

Background information on configuring the eProtocol and eTransport parameters:

The IBHsoftec S7++ adapter can theoretically communicate with the S7 hardware via more than one communication path (protocol).

The TwinCAT S5/S7 communication library currently supports only the first communication path, because currently only the TCP/IP is supported as transport protocol.
I.e. for the communication with S7 devices please set the following setting:

eProtocol := eNLinkProtocol_MPI;
eTransport := eNLinkTransport_TCPIP;

For the communication with the S5 devices please set the following setting:

eProtocol := eNLinkProtocol_IBH_SX_PP;
eTransport := eNLinkTransport_TCPIP;

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v2.11.0 Build > 1536

PC or CX (x86, ARM)

TcS5S7Comm.Lib