SOCKETADDR_TO_STRING

SOCKETADDR_TO_STRING 1:

The function converts a variable of type ST_SockAddr to a string (e.g. for debug outputs).

The returned string has the following format: "a[aa].b[bb].c[cc].d[dd]:port"

Example: "172.16.6.195:80"

FUNCTION SOCKETADDR_TO_STRING : STRING
VAR_INPUT
    stSockAddr : ST_SockAddr;
END_VAR

SOCKETADDR_TO_STRING 2: Return value

Name

Type

Description

SOCKETADDR_TO_STRING

STRING

Contains the STRING representation of the socket address.

SOCKETADDR_TO_STRING 3: Inputs

Name

Type

Description

stSockeAddr

ST_SockAddr

The variable to be converted.

See ST_SockAddr

Requirements

Development environment

Target system type

PLC libraries to include (category group)

TwinCAT v3.1.0

PC, or CX (x86, X64, Arm®)

Tc2_TcpIp (communication)