GenerateQRCode
(Engine-Level Function)
| Description: | Returns a 2D array which represents a QR code for a given string. |
| Returns: | Array |
Usage: ![]() |
Script or steady state. |
| Function Groups: | Array |
| Related to: | | DrawQRCode | |
Format: ![]() |
GenerateQRCode(Input[, ECL]) |
| Parameters: |
| Input |
| Buffer for which to generate the QR code |
| ECL |
| Error Correction Level, 0 to 3. Default = 0 |
| Comments: |
GenerateQRCode will encode any string, so long as that string is shorter than the maximum length for its type. The maximums will be lower if a non-zero error correction level is selected. With an ECL of 0, the maximums are:
A higher ECL will allow more of the QR code to be obscured while still correctly scanning. The level must be an integer, 0 to 3 inclusive. This function will return metadata even if the returned array is invalid. |
Examples:
Steady-state example
Main [
Code = System.GenerateQRCode("https://www.vtscada.com/" { Input }, 2 { Error correction level });
System.DrawQRCode(Code, 300, 300, Size, Color, Space);
]
Script example
Init [
If 1 Main;
[
Code = System.GenerateQRCode("https://www.vtscada.com/" { Input }, 2 { Error correction level });
]
]
Main [
System.DrawQRCode(Code, 300, 300, Size, Color, Space);
]
