extLicenseApply (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.80.00


The extLicenseApply function is used to apply a license key for an extension module.

Instead of using this function, the license key can also be applied via the Apply upgrade key dialog.

 

Input:

key : STRING

The license key that contains the license to apply.

The license key is a text containing at least 358 characters.

Because of this, Large String Support  must be enabled to use the function.

 

Returns: INT

1

- The license key is applied

0

- The function is not available.

-1

- Invalid license key.

-2

- Failed to apply.

-3

- Generic error.

 

Declaration:

FUNCTION extLicenseApply : INT;
VAR_INPUT
  key : STRING;
END_VAR;

 

 

Example:

 

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  key : STRING;
END_VAR;
 
  // Get the license key
  key := "@0ARQBkRm6q2V4YW1wbGUubGljZW5zZQCi/rdpCtubIgas0VW0VgpvuR1AJYfWeqWNX3O5wv6rwIKd4EGGJRB0wjgZGj2wjhH/FnH85DVhZ8hcJicZzTckl5iZz811aooAwis4/ulhrJvMiMDMHIJoYMQFrawrgRAs7fWsdT0jjV/Y80+m6n6mncok0BYicXIninpdZDqDW9DplYMHqZftbyjJX3d7XIEKOkA++7cGOJzTqwSMRaPwqiZqUKDiZtsU3rzpGUnJtnyX4X2pwSz3kA0MmWoy70l3XqYGhJudI2AuiSwht4LFPGj0h8otXkZsDhjY1YzlX+9PHQptHBvsTCKr1GHKllMDdjThA3YEU+DibijGrYhV";
 
  // Apply the license key
  extLicenseApply(key := key);
 
 
END_PROGRAM