FB_GetLicensesEx
The function block FB_GetLicensesEx determines the status of all TwinCAT 3 licenses and OEM licenses.
Inputs
VAR_INPUT
bExecute : BOOL;
tTimeout : TIME;
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. |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
nValidLicenses : UDINT
aValidLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
nPendingLicenses : UDINT
aPendingLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
nDemoLicenses : UDINT
aDemoLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
nOemLicenses : UDINT
aOemLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
nFailedLicenses : UDINT
aFailedLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
nInvalidLicenses : UDINT
aInvalidLicenses : ARRAY[1..nMaxLicenses} OF ST_TcOnlineLicenseInfoDataEx
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 licenses. |
aValidLicenses | ARRAY OF ST_TcOnlineLicenseInfoDataEx | Returns a list of valid licenses. |
nPendingLicenses | UDINT | Number of open licenses |
aPendingLicenses | ARRAY OF ST_TcOnlineLicenseInfoDataEx | Information on outstanding licenses |
nDemoLicenses | UDINT | Number of valid demo licenses |
aDemoLicensese | ARRAY OF ST_TcOnlineLicenseInfoDataEx | Information on valid demo licenses |
nOemLicenses | UDINT | Number of valid OEM licenses |
aOemLicenses | ARRAY OF ST_TcOnlineLicenseInfoDataEx | Information on valid OEM licenses |
nFailedLicenses | UDINT | Number of failed licenses |
aFailedLicenses | ARRAY OF ST_TcOnlineLicenseInfoDataEx | Information on valid licenses |
nInvalidLicenses | UDINT | Returns the number of invalid TwinCAT licenses. |
aInvalidLicenses | ARRAY OF ST_TcOnlineLicenseInfodata | Returns a list of invalid TwinCAT licenses. |
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 include |
---|---|---|
TwinCAT v3.1.4022 | PC or CX (x64, x86) | Tc2_Utilties >= 3.3.24.0 |