FB_SET_PN_NAME

FB_SET_PN_NAME 1:

The function block FB_SET_PN_NAME assigns a name to the respective PROFINET device. When assigning, ensure that only PROFINET-compliant characters are used.

FB_SET_PN_NAME 2: Inputs

VAR_INPUT
  bExecute        : BOOL;
  NETID           : T_AmsNetId;
  PROFINET_NAME   : STRING(51);
  MAC_ID          : ARRAY [0..5] OF BYTE;
END_VAR

Name

Type

Description

bExecute

BOOL

The function block is enabled by a positive edge at this input.

NETID

T_AmsNetId

AMS Net ID of the controller

PROFINET_NAME

STRING

Name to be assigned to the PROFINET device. Max. 240 characters and the following characters permitted "a..z", "0..9", ".", "-"

MAC_ID

ARRAY OF BYTE

MAC ID of the controller

FB_SET_PN_NAME 3: Outputs

VAR_OUTPUT
  bBusy                   : BOOL;
  bError                  : BOOL;
  iErrorID                : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

When the function block is enabled, this output is set and remains set until a feedback is received. While Busy = TRUE, no new command will be accepted at the inputs.

bError

BOOL

If an error occurs during the transmission of the command, this output is set after the bBusy output is reset.

iErrorID

UDINT

Returns an ADS error number if bError output is set.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4018

PC or CX (x64, x86, ARM)

Tc2_ProfinetDiag