Type | Function block |
Description | The function block checks the status of a specific software license on the controller. The STATUS output indicates the status of the license (valid or invalid) after successful execution of the function block. The license entry to be checked is specified at the FIRM_CODE, PRODUCT_CODE, and FEATURE_CODE inputs.The license entry consists of a unique firm code, a product code, and a feature code. All of them are 32-bit values. The firm code is a unique number which is assigned to the licensor (usually the vendor that provided the license, for example, 60000217 for Phoenix Contact). The product code associated with the license represents the protected and licensed products. Each bit in the feature code represents a product feature.The license check is started with a rising edge at the REQ input. The FIRM_CODE, PRODUCT_CODE, and FEATURE_CODE input parameters are evaluated in the task cycle following the rising edge at the REQ input. The BUSY output is set to TRUE while the service for checking the license is executed. After completion of the license check, the DONE output is set to TRUE and the result of the license check is indicated at the STATUS output. |
Notes | Function blocks of this type have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU. |
Parameters | Inputs
REQ
Data type: | BOOL |
Description: | The function block starts checking the license when a rising edge is detected at the input. After completion of the license check, the function block outputs can be reset with a falling edge at the input, and thus prepared for a new license check. |
FIRM_CODE
Data type: | UDINT |
Description: | Firm code (32-bit value) of the vendor that provided the license. If the input is not connected or the value 0 is applied, the firm code 60000217 of Phoenix Contact is used.The function block evaluates this parameter only in the task cycle following a rising edge at the REQ input. |
PRODUCT_CODE
Data type: | UDINT |
Description: | Product code (32-bit value) of the license to be checked.The function block evaluates this parameter only in the task cycle following a rising edge at the REQ input. |
FEATURE_CODE
Data type: | UDINT |
Description: | Feature code (32-bit value) of the license to be checked.The function block evaluates this parameter only in the task cycle following a rising edge at the REQ input. |
Outputs
DONE
Data type: | BOOL |
Description: | TRUE: License was checked. The information on the license status is indicated at the STATUS output (see below).FALSE: License was not checked. |
BUSY
Data type: | BOOL |
Description: | Set to FALSE if the service for checking the license is not executed or terminated. The output is TRUE as long as the service for checking the license is executed. |
ERROR
Data type: | BOOL |
Description: | Indicates whether an error occurred when executing the function block or service.FALSE: No error occurred.TRUE: Error occurred. The STATUS output indicates the error code. |
STATUS
Data type: | INT |
Description: | The output indicates the result of the license check when the DONE output is TRUE. If ERROR = TRUE, the STATUS output provides an error code. (See below for a description of the STATUS values.) |
|
Error codes
| STATUS values
Value | Meaning |
0 | License not (yet) checked. |
1 | License is valid. |
2 | License is invalid. |
101 | Service timeout. |
102 | Failed to subscribe the Remote Service Call (RSC) service. |
103 | Exception occurred while the service is running. |
|