GetDataTypeNameByAddress

GetDataTypeNameByAddress 1:

This method returns the data type name of a transferred symbol.

GetDataTypeNameByAddress 2:

Structures with a single variable

If structures with a single variable are used, the data type cannot be read correctly using this method. The size and address information cannot be used to distinguish between the structure itself and the individual variables.

Syntax

METHOD GetDataTypeNameByAddress : STRING
VAR_INPUT
  nData       : UDINT;
  pData       : PVOID;
END_VAR
VAR_OUTPUT
  hrErrorCode : HRESULT;
END_VAR

GetDataTypeNameByAddress 3: Return value

Name

Type

GetDataTypeNameByAddress

STRING

GetDataTypeNameByAddress 4: Inputs

Name

Type

nData

UDINT

pData

PVOID

GetDataTypeNameByAddress 5: Outputs

Name

Type

hrErrorCode

HRESULT

Sample call:

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