ST_MMS_ProtocolPara

MMS communication parameters.

TYPE ST_MMS_ProtocolPara:
STRUCT
    sSrvNetID           : T_AmsNetID := ''; (* TwinCAT TCP/IP Connection Server network address (default = empty string) *)
    bClient             : BOOL := FALSE;(* TRUE => act as client, FALSE => act as server (reserved for future use) *)
    sHost               : T_IPv4Addr := '127.0.0.1'; (* If client => remote address, if server => local address. String containing an (Ipv4) internet protocol dotted address. *)
    nPort               : UDINT := 102; (* If client => remote internet protocol (IP) port, if server => local listener port (default 102) *)
    nMode               : DWORD := 16#80000001;(* Additional (optional) parameters e.g. bit 31 = CONNECT_MODE_ENABLEDBG, bit 0 = LISTEN_MODE_CLOSEALL *)
    eAccept     : E_SocketAcceptMode := eACCEPT_ALL; (* Connection accept flags (server only) *)
    local_AP_title      : STRING := '1.1.1.999.1';
    local_AE_qualifier      : UDINT := 12;
    local_T_selector    : STRING := '00 01';(* local-transport-selector *)
    local_S_selector    : STRING := '00 01';(* local-session-selector *)
    local_P_selector    : STRING := '00 00 00 01';(* local-presentation-selector *)

    remote_AP_title     : STRING := '1.1.1.999';
    remote_AE_qualifier : UDINT := 12;
    remote_T_selector   : STRING := '00 01';(* remote-transport-selector *)
    remote_S_selector   : STRING := '00 01';(* remote-session-selector *)
 remote_P_selector      : STRING := '00 00 00 01';(* remote-presentation-selector *)


    eTPDUsize           : E_COTP_DUsize := eCOTP_DUsize_1024;

    debug               : ST_MMS_DebugPara;
END_STRUCT
END_TYPE

sSrvNetID: The network address of TwinCAT TCP/IP Connection Server (default = empty string);

bClient: Reserved and not used. If set, then the device acts as client. If not set than as server (default = FALSE);

sHost: Local IPv4 server host address as string (default = '127.0.0.1' = loopback address);

nPort: Local server port address (default = 102);

nMode: Additional (optional) parameters (default = CONNECT_MODE_ENABLEDBG OR LISTEN_MODE_CLOSEALL):

eAccept: Reserved and not used. Server only: connection accept flags (default = eACCEPT_ALL = accept all incoming connections);

local_AP_title: ACSE AP-Title of this device as string (default = '1,1,1,999.1' );

local_AE_qualifier: ACSE AE-Qualifier of this device (default = 12);

local_T_selector: Local TSAP-Address as string (TSAP = Transport Service Access Point, default = '00 01');

local_S_selector: Local SSAP-Address as string (SSAP = Session Service Access Point, default = '00 01');

local_P_selector: Local PSAP-Address as string (PSAP = Presentation Service Access Point, default = '00 00 00 01');

remote_AP_title: ACSE AP-Title of remote device as string (default = '1,1,1,999');

remote_AE_qualifier: ACSE AE-Qualifier of remote device (default = 12);

remote_T_selector: Remote TSAP-Address as string (TSAP = Transport Service Access Point, default = '00 01');

remote_S_selector: Remote SSAP-Address as string (SSAP = Session Service Access Point, default = '00 01');

remote_P_selector: Remote PSAP-Address as string (PSAP = Presentation Service Access Point, default = '00 00 00 01');

eTPDUSize: Max. byte length of the transport layer data segment ( default = eCOTP_DUsize_1024 = 1024 byte );

debug: This structure configures the behavior of debug messages. The member variables are enabling/disabling logging of debug messages to the TwinCAT System Manager Logview.

Requirements

Development environment

Target system

PLC libraries to include

TwinCAT v2.10.0 Build >= 1340

PC or CX (x86, ARM)

TcMMS.Lib