LoadDocumentFromFile
This method loads a JSON document from a file.
A rising edge on the input parameter bExec triggers the loading procedure. The asynchronous process is terminated as soon as the reference bExec is set back to FALSE from the method. When the process ends, the return value of the method indicates for one call whether the loading of the file was successful (TRUE) or failed (FALSE).
Syntax
METHOD LoadDocumentFromFile : BOOL
VAR_IN_OUT CONSTANT
sFile : STRING;
END_VAR
VAR_INPUT
bExec : REFERENCE TO BOOL;
END_VAR
VAR_OUTPUT
hrErrorCode: HRESULT;
END_VAR
Return value
Name | Type |
---|---|
LoadDocumentFromFile | BOOL |
Inputs
Name | Type |
---|---|
bExec | REFERENCE TO BOOL |
/ Inputs/Outputs
Name | Type |
---|---|
sFile | STRING |
Outputs
Name | Type |
---|---|
hrErrorCode | HRESULT |
Sample call:
IF bLoad THEN
bLoaded := fbJson.LoadDocumentFromFile(sFile, bLoad);
END_IF