FB_LicFileGetStorageInfo

FB_LicFileGetStorageInfo 1:

The function block reads the StorageInfo of the license dongle and the file directory.

The StorageInfo contains administrative data of the storage medium (such as capacity, number of free bytes, number of files,…) and an array of the individual file entries (name, size, attributes,… of the file).

VAR_INPUT

VAR_INPUT
    sNetId      : T_AmsNetId;
    nPort       : UINT;
    bExecute    : BOOL;
    dwPassCode  : DWORD;
    tTimeout    : TIME       := DEFAULT_ADS_TIMEOUT
END_VAR

sNetId: AmsNetId (AMS network identifier) of the license dongle (type: T_AmsNetId)

nPort: AMS port of the license dongle

bExecute: The function block is activated by a positive edge at this input.

dwPassCode: Passcode for file access (only for specially protected files)

tTimeout: Timeout time that must not be exceeded when the command is executed.

VAR_OUTPUT

VAR_OUTPUT
    bBusy        : BOOL;
    bError       : BOOL;
    nErrorId     : UDINT;
    nFileEntries : UDINT;
END_VAR

bBusy: TRUE, as long as the function block is active.

bError: TRUE if an error occurs during command execution.

nErrorId: Supplies the ADS error number when the bError output is set.

nFileEntries: Number of files on the license dongle

VAR_IN_OUT

VAR_IN_OUT
    stStorageInfo : ST_LicStorageInfo;
END_VAR

stStorageInfo: StorageInfo of the license dongle (type: ST_LicStorageInfo)

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022

PC or CX (x64, x86)

Tc2_Utilties >= 3.3.26.0