Global Variable Configuration

Global variable is a type of variable that can be shared among multiple labels. Once it is defined, it is stored outside the current label.

Note

If a global variable is not defined or inaccessible, a warning appears on the top of the dialog window. To create a global variable, click the link inside the warning. Make sure the correct data source is defined in the Options dialog.

General Tab

About group of settings identifies the global variable and sets its definition.

  • Persistent ID: identifier of the global variable. It serves as a unique reference from any connected source. Allowed values are 10000–99999.

  • Name: unique global variable name. This name is used as a user-friendly identifier.

Note

Avoid using non-alphanumeric characters when defining the variable name.

Tip

Enter the name to make the variable easy to find when listed among other variables in the Dynamic Data Explorer.

  • Description: is a field that allows adding additional information and suggestions.

  • Current value: the value that is assigned to a global variable when created. It is defined using one of the following methods:

    • Manually entering a fixed value. Characters from any group of allowed characters are permitted.

    • Using a special character:

      • Special character can be entered manually using the less than/greater than signs, e.g., <CR>, <LF> ...

      • Special character can be selected from the dropdown list.

Tip

Make sure the inserted current value meets the criteria defined with Output Rules for each data type.

Counter group settings allow you to configure global variables that perform the role of a counter.

  • Do not use a counter: prevents the global variable from being used as a label counter.

  • Incremental counter: counter value increases along with the printed labels.

  • Decremental counter: counter variable value decreases along with the printed labels.

    • Step: the amount of units that represent the next state of your counter value.

    • Repetition: number of repetitions for each counter value.

Loftware allows you to simultaneously design and print multiple labels using the same global counter variable. Because the purpose of the global counter variable is to ensure counter value continuity among multiple labels, its value gets locked while the global variable file is in use – i.e. a label is printed. Label preview for all labels displays the last retrieved value from the global variable file (or from Loftware Control Center if used), while the counter values on printed labels obtain and show their actual values.

Example:

Label A: Current value = 1; print quantity = 5. Global counter printed values are 1, 2, 3, 4, 5.

Label B: Current value after Label A print = 6; print quantity = 5. Global counter printed values are 6, 7, 8, 9, 10.

Input Rules Tab

Data defines the counter input criteria.

  • Allowed characters: permitted characters for variable values. Groups of allowed characters for data input filtering are described in section Groups of Allowed Characters.

Example:

Non-numeric characters can also be used as counter values. Alphanumeric sets the sequence with Step = 3 and Initial value = 1 as 1, 4, 7, A, D, G, J, M, P, S, V, Y, b, e, h, ...

  • Limit length: maximum length of a variable value.

    • Length (characters): specifies the exact permitted number of characters.

  • Fixed length: variable must contain the exact given number of characters as defined in the Limit variable length.

Output Rules Tab

Prefix and Suffix are characters that are added to a variable value.

  • Prefix: text placed in front of the variable value.

  • Suffix: text placed behind the variable value.

Pad Character fills empty character position until the maximum variable length for a variable is reached. Pad character is enabled only if the Limit variable length in the Input rules tab is enabled.

  • Padding: defines the mode of padding.

    • Not used: does not use padding.

    • On left: adds pad characters on the left side of the data value.

    • On right: adds pad characters on the right side of the data value.

    • Surrounding value: adds pad characters on both sides of the data value.

  • Character: character used for padding.