FB_READ_PROFINET_NAME

FB_READ_PROFINET_NAME 1:

The function block FB_READ_PROFINET_NAME reads the PROFINET name of an EL6631-0010 and, if configured, of a virtual EL6631-0010.

FB_READ_PROFINET_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 controller

PORT

T_AmsPort

Port via which the controller communicates with the device (port = Device ID + 1000hex).

FB_READ_PROFINET_NAME 3: Outputs

VAR_OUTPUT
  bBusy                 : BOOL;
  bError                : BOOL;
  nCntEL6631_Slave      : BYTE
  arPROFINET_NAME       : ARRAY [1..2] OF STRING(240)
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.

nCntEL6631_Slave

BYTE

Provides information on how the EL6631-0010 is displayed. "0" = EL6631-0010 and "1" = virtual EL6631-0010.

arPROFINET_NAME

ARRAY OF STRING

Contains the PROFINET names of the EL6631-0010 and, if configured, the virtual EL6631-0010.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4018

PC or CX (x64, x86, ARM)

Tc2_ProfinetDiag