FB_PROFINET_READ_PRM

FB_PROFINET_READ_PRM 1:

The function block FB_PROFINET_READ_PRM scans the PROFINET network and returns the number and a list with information on the PROFINET devices found.

FB_PROFINET_READ_PRM 2: Inputs

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

Name

Type

Description

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).

bStart

BOOL

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

FB_PROFINET_READ_PRM 3: Outputs

VAR_OUTPUT
  str_Diag_PN_Settings    : str_Diag_PN_Settings;
  bBusy                   : BOOL;
  bError                  : BOOL;
  nErrorID                : UDINT;
END_VAR

Name

Type

Description

str_Diag_PN_Settings

str_Diag_PN_Settings

PROFINET/IP settings

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.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4018

PC or CX (x64, x86, ARM)

Tc2_ProfinetDiag