FB_CheckOemLicense
![]()  | If you use OEM licenses make sure you encrypt your boot project! Remember that the license ID queried via FB_CheckOemLicense in the binary code can easily be found and (with a little effort) manipulated with a hex editor. Therefore, be sure to encrypt your boot project (safest), or at least disguise the queried license ID in the source code as best as possible.  | 

The function block FB_CheckOemLicense determines the TwinCAT 3 license status for a given license ID and a given OEM ID.
 Inputs
VAR_INPUT
    bExecute     : BOOL;
    tTimeout     : TIME := DEFAULT_ADS_TIMEOUT;
    sNetId       : T_AmsNetId;
    stOemId      : GUID;
    stLicenseId  : GUID;
END_VARName  | 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.  | 
stOemId  | GIUD  | OEM ID  | 
stLicenseId  | License ID  | 
 Outputs
VAR_OUTPUT
    bBusy          : BOOL;
    bError         : BOOL;
    nErrId         : UDINT
    stCheckLicense : ST_CheckLicense;
END_VARName  | 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.  | 
stCheckLicense  | Structure with license data  | 
Requirements
Development environment  | Target platform  | PLC libraries to be integrated (category group)  | 
|---|---|---|
TwinCAT v3.1.4022  | PC or CX (x86, x64, Arm®)  | Tc2_Utilities (System) >=3.3.35.0  | 
