Using the EPL2 Variable Command (Define Variable)

 

Description: Use this command to define variable data for the text and bar code data fields in stored forms. Variable data can be combined with fixed data or other data types (counter, date, etc..) in text or bar code data fields.
Syntax: Vp1,p2,p3,"[-]PROMPT"
Parameters: P1 = Variable Number.
Range: 00 to 99
Variable (reference) numbers are sequential and must be input into a form in ascending order.
P2= Maximum number of characters
Range: 1 to 99
This is the maximum number or characters allowed in the variable filed
P3= Field Justification
L=Left
R=Right
C=Center
N=No Justification *
Note: Right and center justification does not apply to soft fonts.
"PROMPT"= An ASCII text field that will be transmitted  the host (via the serial interface) each time this command is executed. Use the prompt to ask for a value to be entered fro the variable.
KDU Options [-]= Having the first character of the prompt a single minus sign will cause the prompt to display only once after form retrieval.
KDU Character Number Limit The KDU allows a maximum of 40 characters for entry into a variable data field and display.

KDU range (p2): 1 to 40, but not to exceed a total of 1500 bytes for all varables.

* If the Variable "V" is used in a barcode, insure Justification is set to N or the field will pad the barcode with spaces to equal the value in p2. See below for examples.

Example 1:

FK"EX1"
FS"EX1"
V00,15,N,"Text"
V01,15,N,"Barcode"
A20,20,0,4,1,1,N,V00
B20,100,0,1,2,2,50,B,V01
FE


The above example should produce a standard Code 128 barcode with up to 15 characters without padding the barcode.

Example 2:

FK"EX2"
FS"EX2"
V00,20,L,"Text"
V01,20,L,"Barcode"
A20,20,0,4,1,1,N,V00
B20,100,0,1,2,2,50,B,V01
FE

The above example should produce a standard Code 128 barcode with 20 characters. If less than 20 characters are sent, the form will pad the barcode with spaces to include a total of 20 characters after the original data.