FB_FileProperties
This function block outputs the file properties of a selected file.
Inputs
VAR_INPUT
sNetID : T_AmsNetID;
sPathName : T_MaxString;
bExecute : BOOL;
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR
Name | Type | Description |
---|---|---|
sNetID | T_AmsNetID | A string with the network address of the TwinCAT computer on which a directory search is to be executed can be specified here. For the local computer an empty string may be specified. |
sPathName | T_MaxString | A valid directory name or directory with file name as string. The string can contain (* and ? ) as wildcards. If the path ends with a wildcard, dot or the directory name, the user must have access rights to this path and its subdirectories. |
bExecute | BOOL | The function block is enabled by a positive edge at this input. |
tTimeout | TIME | States the length of the timeout that may not be exceeded by execution of the ADS command. |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrId : UDINT;
stProperties : ST_FindFileEntry;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | When the function block is enabled, this output is set and remains set until a feedback is received. |
bError | BOOL | If an error occurs during the transmission of the command, this output is set after the bBusy output is reset. |
nErrId | UDINT | Returns the ADS error number when the bError output is set. |
stProperties | If successful this structure variable returns information about the file that was found. |
Requirements
Development environment | Target platform | PLC libraries to be integrated (category group) |
---|---|---|
TwinCAT v3.1.0 | PC or CX (WES7/Win7/Win10: TC RT x86/x64, WEC6/7: TC RT x86, WEC7: TC CE7 ARMV7, TC/BSD: TC RT x64, TC OS ARMT2) | Tc2_Utilities (System) |