ST_NLinkSettings
TYPE ST_NLinkSettings :
STRUCT
sSrvNetID : T_AmsNetID := '';
eProtocol : E_NLinkProtocol := eNLinkProtocol_IBH_SX_PP;
eTransport : E_NLinkTransport := eNLinkTransport_TCPIP;
sHost : T_IPv4Addr := '127.0.0.1';
nPort : UDINT := 2002;
local_T_selector : STRING := '00 01';
remote_T_selector : STRING := '00 01';
bServer : BOOL := FALSE;
bThrottle : BOOL := FALSE;
debug : ST_NLinkDebug;
END_STRUCT
END_TYPE
sSrvNetID: TwinCAT network address of the TwinCAT TCP/IP connection server (default = empty string, type: T_AmsNetId).
eProtocol: The communication protocol to be used is set via this parameter (type: E_NLinkProtocol).
eTransport: The transport protocol to be used is set via this parameter (type: E_NLinkTransport).
sHost: String containing the network address (Ipv4) of the communication partner (default = ‘127.0.0.1’, type: T_IPv4Addr).
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, the number of polling socket calls is reduced if no or few data are received, i.e. the poll cycle is slowed down, thereby reducing the system load (default = FALSE).
debug: Optional debug output settings(type:ST_NLinkDebug).
Hint!
Background information about the configuration of eProtocol- and eTransport parameter:
The IBHsoftec S7++ adapter is supporting more than one communication protocol (channel) to S7 controller.
- Using the Hilscher MPI-Protokoll + TCP/IP as transport protocol.
- Using the IBHsoftec S5++/S7++ protocol + RFC1006 as transport protocol.
The TwinCAT S5/S7 communication library is supporting only the first communication channel (using TCP/IP transport protocol).
If you want to communicate with S7 controller then use this settings:
eProtocol := eNLinkProtocol_MPI;
eTransport := eNLinkTransport_TCPIP;
If you want to communicate with S5 controller then use this settings:
eProtocol := eNLinkProtocol_IBH_SX_PP;
eTransport := eNLinkTransport_TCPIP;
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4016 or higher | PC oder CX (x86, x64, ARM) | Tc2_S5S7Com (Communication->TcpIp) |