F_CreateAmsNetId

F_CreateAmsNetId 1:

The F_CreateAmsNetId function returns formatted AmsNetId string (e.g.: '127.16.17.3.1.1' ).

FUNCTION F_CreateAmsNetId : T_AmsNetId

T_AmsNetId

VAR_INPUT
    nIds    : T_AmsNetIdArr;
END_VAR

nIds : Byte array. Every byte is equivalent to one number of the network adress. The address bytes are represented in network byte order.

 

Example in structured text:

PROGRAM MAIN
VAR
    ids     : T_AmsNetIdArr := [127, 16, 17, 3, 1, 1];
    sNetID  : T_AmsNetID := '';
END_VAR
sNetID := F_CreateAmsNetId( ids );(* Result: '127.16.17.3.1.1' *)

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.8.0

PC or CX (x86)

TcSystem.Lib

TwinCAT v2.10.0 Build >= 1301

CX (ARM)

TcSystem.Lib