GetSymbolNameByAddress

GetSymbolNameByAddress 1:

This method returns the complete (ADS) symbol name of a transferred symbol.

The maximum size of the string returned by the method is 255 characters. With longer strings, the method will return a null string. In this case the method CopySymbolNameByAddress() must be used.

Syntax

METHOD GetSymbolNameByAddress : STRING(255)
VAR_INPUT
  nData       : UDINT;
  pData       : PVOID;
END_VAR
VAR_OUTPUT
  hrErrorCode : HRESULT;
END_VAR

GetSymbolNameByAddress 2: Return value

Name

Type

GetSymbolNameByAddress

STRING(255)

GetSymbolNameByAddress 3: Inputs

Name

Type

nData

UDINT

pData

PVOID

GetSymbolNameByAddress 4: Outputs

Name

Type

hrErrorCode

HRESULT

Sample call:

sBuffer := fbJsonDataType.GetSymbolNameByAddress(SIZEOF(stValues), ADR(stValues));