F_CreateAmsNetId
The function generates a formatted NetID string (type: T_AmsNetID) and returns it as return parameter (e.g. '127.16.17.3.1.1').
FUNCTION F_CreateAmsNetId : T_AmsNetId
Inputs
VAR_INPUT
nIds : T_AmsNetIdArr;
END_VAR
Name | Type | Description |
---|---|---|
nIds | T_AmsNetIdArr | Byte array (type: T_AmsNetIdArr). Each byte corresponds to a number of the network address. The address bytes have a network byte order. |
Example of a call in ST:
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 (Category group) |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86, x64, ARM) |
Tc2_System (System) |