FB_GetLicenses

FB_GetLicenses 1:

The function block reads the valid and invalid TwinCAT licenses.

FB_GetLicenses 2: Inputs

VAR_INPUT
    bExecute  : BOOL;
    tTimeout  : TIME := DEFAULT_ADS_TIMEOUT;
    sNetId    : T_AmsNetId;
END_VAR

Name

Type

Description

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.

sNetId

T_AmsNetID

AmsNetId (AMS network identifier) of the TwinCAT computer whose license status is to be read. For the local computer an empty string may be specified.

FB_GetLicenses 3: Outputs

VAR_OUTPUT
    bBusy           : BOOL;
    bError          : BOOL;
    nErrorId        : UDINT;
    nValidLicenses  : UDINT;
    aValidLicenses  : ARRAY [1..nMaxLicenses] OF ST_TcOnlineLicenseInfoData;
    nInvalidLicenses : UDINT;
    aInvalidLicenses : ARRAY [1..nMaxLicenses] OF ST_TcOnlineLicenseInfoData;
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.

nErrorId

UDINT

Returns the ADS error number when the bError output is set.

nValidLicenses

UDINT

Returns the number of valid TwinCAT licenses.

aValidLicenses

ARRAY OF ST_TcOnlineLicenseInfodata

Returns a list of valid TwinCAT licenses.

nInvalidLicenses

UDINT

Returns the number of invalid TwinCAT licenses.

aInvalidLicenses

ARRAY OF ST_TcOnlineLicenseInfodata

Returns a list of invalid TwinCAT licenses.

FB_GetLicenses 4:

By default, the maximum number of license list entries is 50. This limit can be changed in the parameter list of the library via nMaxLicenses.

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.4018

PC or CX (x86, x64, ARM)

Tc2_Utilities (system) v3.3.9.0 or higher