FB_Write_IuM_EL6631_0010

FB_Write_IuM_EL6631_0010 1:

The function block FB_Write_IuM_EL6631_0010 writes I&M1, I&M2, I&M3 and I&M4 (Identification & Maintenance) data to the PROFINET device as a string via EtherCAT in accordance with the PROFINET specification.

FB_Write_IuM_EL6631_0010 2: Inputs

VAR_INPUT
  bWrite            : BOOL;
  NETID             : T_AmsNetId;
  PORT              : T_AmsPort;
  byState           : BYTE;
  iNumber           : INT:=0;
  st_IM_TagFunction : STRING;
  st_IM_TagLocation : STRING;
  st_IM_Date        : STRING;
  st_IM_Descriptor  : STRING;
  st_IM_Signature   : STRING;
END_VAR

Name

Type

Description

bWrite

BOOL

A positive edge at this input enables the function block and the I&M data is written to the selected ProfiNET device.

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

byState

BYTE

This byte can be used to select which I&M data is to be written.
Bit 0 -> I&M1
Bit 1 -> I&M2
Bit 2 -> I&M3
Bit 3 -> I&M4

iNumber

INT

Two PROFINET devices can be mapped with one terminal. iNumber ("0" or "1") is used to select the device for which the I&M data is to be written.

st_IM_TagFunction

STRING

Label for the function of the device is written to the device.
I&M1 byState.0=TRUE

st_IM_Taglocation

STRING

Label for the installation location of the device is written to the device.
I&M1 byState.0=TRUE

st_IM_Date

STRING

Date of device installation is written to the device.
I&M2 byState.1=TRUE

st_IM_Descriptor

STRING

Description of the vendor is written to the device.
I&M3 byState.2=TRUE

st_IM_Signature

STRING

The vendor signature is written to the device.
I&M4 byState.3=TRUE

FB_Write_IuM_EL6631_0010 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