FC_GetObjNameByLogAddr - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Determine the symbolic name of an object (for example, LXM62DxS, logical encoder, virtual encoder) from its logical address.

Description

The name of the object with the logical address i_stLogAdr is determined. It is transferred in the iq_sName variable. i_diMaxSize specifies the maximum string size.

Interface

Input

Data type

Description

i_stLogAdr

ST_LogicalAddress

Logical address of the object

i_diMaxSize

DINT

Maximum string size

Input/Output

Data type

Description

iq_sName

STRING[80]

Name of the object

Return Value

Data type

Description

DINT

0: OK

-2: The string size is insufficient

-99: Object not found

Examples

VAR 
   pszMyObjectName: STRING[80]; 
   lMyMaxSize: DINT := 80; 
   lMyLogAdr: DINT; 
   lResult: DINT; 
END_VAR 
lResult := FC_GetObjNameByLogAddr(lMyLogAdr, lMyMaxSize, pszMyObjectName);