FB_PROFINET_READ_NAME

FB_PROFINET_READ_NAME 1:

The function block FB_PROFINET_READ_NAME returns the PROFINET name of the respective PROFINET device and the information whether the PROFINET name can be changed by the PROFINET controller.

FB_PROFINET_READ_NAME 2: Inputs

VAR_INPUT
  bStart  : BOOL;
  NETID   : T_AmsNetId;
  PORT    : T_AmsPort;
END_VAR

Name

Type

Description

bStart

BOOL

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

NETID

T_AmsNetId

AMS NET ID of the PROFINET device

PORT

T_AmsPort

ADS port number of the PROFINET device; default = 0xFFFF

FB_PROFINET_READ_NAME 3: Outputs

VAR_OUTPUT
  bBusy                   : BOOL;
  bError                  : BOOL;
  nErrorID                : UDINT;
  sProfinetName           : STRING(240);
  bNotChangeable          : BOOL;
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.

nErrorId

UDINT

Returns an ADS error number if bError output is set.

sProfinetName

STRING(240)

PROFINET device name. Max. 240 characters and the following characters permitted "a..z", "0..9", ".", "-"

bNotChangeable

BOOL

If "TRUE", the PROFINET controller cannot change the PROFINET name of the device.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.55

PC or CX (x64, x86, ARM)

Tc2_ProfinetDiag (>= v1.5.1.0)