CopyDocument

CopyDocument 1:

This method copies the contents of the DOM memory into a variable of data type STRING, which can have any length. The method returns the length of the string (including null termination). If the destination buffer is too small, it is emptied by a null termination and returned as length 0.

Syntax

METHOD CopyDocument : UDINT
VAR_INPUT
  nDoc : DINT;
END_VAR
VAR_IN_OUT CONSTANT
  pDoc : STRING;
END_VAR

CopyDocument 2: Return value

Name

Type

CopyDocument

UDINT

CopyDocument 3: Inputs

Name

Type

nDoc

DINT

CopyDocument 4:/CopyDocument 5: Inputs/Outputs

Name

Type

pDoc

STRING

Sample call:

nLen := fbJson.CopyDocument(sJson, SIZEOF(sJson));