Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 8 of 17

UBI EasyCoder 91 Instruction Book: PROGRAMMING, pages 52 to 61

Pages 52 to 61 of 142, from UBI EasyCoder 91 Instruction Book

The original document is the PDF (1.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the UBI EasyCoder 91

Page 52

UBI EasyCoder 91 – Programming EDITING IN THE FORM EDIT MODE, cont'd. Example, cont'd.

Define Variables The first variable (V00) has a maximum of 15 characters. The second variable (V01) has 10 characters and prints in reverse. The third variable (V02) has maximum 8 characters. Command V00,15,N,"Enter Product name:" ↵ V01,10,L,"Enter Model number:" ↵ V02,8,N,"Checked by:" ↵

Explanation Define first variable Define second variable Define third variable

The text within quotes are prompts, which will be sent from the printer to the host when the label form is retrieved (serial communication only). Define a Counter The counter has maximum 6 digits. Command C0,6,L,+1,"Enter Serial Number:"↵

Explanation Define counter

Note: The variables (V00, V01, V02) and counter (C0), are defined within this label form named TEST. The next label form containing variables and counters, will again start with V00 and C0. If variable data is being sent from an external data base, omit the text between the quotes and replace with a space character, e.g. V00,15,N," ". Draw a Box and two Lines Start to draw the surrounding box using the X command and then draw the two lines using the LO command. Command X0,0,4,752,584↵ LO0,144,752,4↵ LO440,232,4,160↵

Explanation Draw a box Draw a black line Draw a black line

Continued! 52

Page 53

UBI EasyCoder 91 – Programming EDITING IN THE FORM EDIT MODE, cont'd. Example, cont'd.

Place a Text Line with Fixed Data Enter a text line containing the fixed data "UBI", in text size 5 (the largest size). The quotation marks enclosing the fixed data will not be printed. Write a 90 degree text line with the text "Made in Sweden". The text size (1) is the smallest resident font in the printer. Command Explanation A456,48,0,5,1,1,N,"UBI"↵ Write a text line, fixed data A40,400,1,1,1,1,N,"Made in Sweden"↵ 90 deg. text line, fixed data

Place a Variable Text The next line is a text line, using text size 5 in reverse and prints the variable V00. The data printed in this field must be sent to the printer at the time of form retrieval. Command A24,160,0,5,1,1,R,V00 ↵

Explanation Write a text line, 1:st variable

Place a Combination of Fixed Data and a Variable The following two command lines consist of a combination of fixed data enclosed in quotation marks and variable data. Command Explanation A24,250,0,4,1,1,N,"MODEL: "V01↵ Text line, fixed data + 2:nd variable A472,312,0,4,1,1,N,"Checked by: "V02↵ Text line, fixed data + 3:rd variable

Place a Combination of Fixed Data and a Counter The next command line is a text line containing fixed data and the counter (C0). The first time this label form is retrieved for printing, the start value for this counter must be sent to the printer. The printer will store the value of the counter for this form and automatically continue to print the next value the next time this form is retrieved. Reset or set to another value by sending a new start value. Note: The value of the counter will be kept in the memory even if another form is retrieved or the printer is switched off. Command A24,312,0,4,1,1,N,"SERIAL#: "C0↵

Explanation Text line, fixed data + 1:st counter

Continued! 53

Page 54

UBI EasyCoder 91 – Programming EDITING IN THE FORM EDIT MODE, cont'd. Example, cont'd.

Place a Bar Code with Fixed Data and a Counter Below Bar Code Command line is entering a Code 128 bar code, containing the fixed data "S" in combination with the actual counter value. It is also set for printing the human readable text below the bar code. Note: The narrow to wide ratio is not relevant for Code 128. The printer will use the value for the narrow bar to define the bar code. (Value 3 for wide bar definition is ignored). Command B280,440,0,1,2,3,96,B,"S"C0↵

Explanation Bar code, fixed data + 1:st counter

Place Graphics The next line writes a graphic named "UBI"1 from graphics memory and positions it on the form. Command GG24,12,"UBI"↵

Explanation Write graphic from graphics memory

End Programming of this Form The closing command that flags the end of form, see the full program listing later in this chapter. Command FE

Explanation Closing command to store form

On next page you will find a complete list of this example.

1

/. The graphic “UBI” is not available in your printer and has only been included in the example to illustrate the method of using graphics in a form. Substitute this graphic with your own logotype or some other graphic of approximately the same size, or omit the GG command line.

Continued! 54

Page 55

UBI EasyCoder 91 – Programming EDITING IN THE FORM EDIT MODE, cont'd. Example, cont'd.

PROGRAM LISTING Command

Explanation

↵

CR/LF to start command structure

FK"TEST"↵

Delete current form named TEST

FS"TEST"↵

Start store form named TEST

V00,15,N,"Enter Product name:"↵

Define 1:st variable

V01,10,L,"Enter Model number:"↵

Define 2:nd variable

V02,8,N,"Checked by:"↵

Define 3:rd variable

C0,6,L,+1,"Enter Serial Number:"↵

Define counter

X0,0,4,752,584↵

Draw a box

LO0,144,752,4↵

Draw a line

LO440,232,4,160↵

Draw a line

A456,48,0,5,1,1,N, "UBI"↵

Write a text line of fixed data

A40,400,1,1,1,1,N,"Made in Sweden"↵ Write a 90˚ text line of fixed data A24,160,0,5,1,1,R,V00↵

Write 1:st variable text field

A24,250,0,4,1,1,N,"MODEL: "V01↵

Write text line, fixed data + 2:nd variable

A472,312,0,4,1,1,N,"Checked by: "V02↵ Write text, fixed data + 3:rd variable A24,312,0,4,1,1,N,"SERIAL#: "C0↵

Write text line, fixed data + 1:st counter

B280,440,0,1,2,3,96,B,"S"C0↵

Write barcode, fixed data + 1:st counter

GG24,12,"UBI"↵

Write graphic from graphics memory

FE↵

Closing command to store form

Continued! 55

Page 56

UBI EasyCoder 91 – Programming RETRIEVING AND PRINTING A FORM Example

Retrieve and Print Form The form “TEST”, edited in the previos chapter, can be retrieved and printed from any ASCII sending device using this sequence: Command ↵ FR"TEST"↵ ?↵ EASYCODER↵ 501SA↵ Dan↵ 100000↵ P1,2

Explanation CR/LF to start command structure Retrieve form Call for variables Substitute variable V00 Substitute variable V01 Substitute variable V02 Counter start value C0 Print 2 copies of a single label

In this example we have manually substituted variables for testing purposes. Note: It is critical to the syntax to send exactly the same number of variable lines as defined for this label form. Provided you use the serial interface for communication between printer and host1, you can make the printer return prompts that appear on the screen, requesting the operator to enter input data, by sending a UI command after each power-up. Printer Sends

1

/. Some host computers and terminal programs cannot handle prompts. In such cases, no UI command must be issued! Prompts cannot be used in connection with parallel communication. 2

/. A start value will only be displayed if the form already has been retrieved at least once. You can accept the displayed value or enter another value.

Command ↵ UI

Explanation CR/LF to start command structure Enable prompts command (optional) UI80,001 Printer returns codepage status FR"TEST"↵ Retrieve form ?↵ Call for variables Enter Product name: EASYCODER↵ Substitute variable V00 (The selected font allows uppercase characters only) Enter Model number: 501SA↵ Substitute variable V01 Checked by: Dan↵ Substitute variable V02 Enter SERIAL#: 100001 100000↵ Reset ,accept or enter2 counter start value C0 Number of labels sets Prompt P1 Ignore P1↵ Enter P + Quantity of labels Copies of each label Prompt 1 2↵ Enter Quantity of copies + ↵

Continued! 56

Page 57

UBI EasyCoder 91 – Programming RETRIEVING AND PRINTING A FORM, cont'd. Example, cont'd.

The example below demonstrates that it is not necessary to set the counter start value again. The counter internally keeps track of the last number issued and is updated according to instructions in the form. Command ↵ FR"TEST"↵ ?↵ EASYCODER↵ 501SA↵ Dan↵ ↵ P1,2↵

Explanation CR/LF to start command structure Retrieve form Call for variables Substitute variable V00 Substitute variable V01 Substitute variable V02 CR/LF to use existing counter value Print 2 copies of 1 label

Once a form has been retrieved, it can be used over and over again until another form is retrieved. All variable input data and counter values are stored in memory. If prompts are enabled, existing data and counter values will be displayed on the screen after the related prompt. Any input data can be overwritten at will. Command ?↵ ↵ ↵ Sam↵ 200000↵ P1,1↵

Explanation Call for variables in same form CR/LF to use existing data in V00 CR/LF to use existing data in V01 Substitute data in variable V02 Substitute counter start value Print 1 copy of 1 label

IMPORTANT! Note that the question mark (?) following the FR command is essential for the printing of certain fields edited in the Form Edit Mode, i.e. fields containing variables, counters, time and/or date. Variables and counter start values must be entered or accepted as described above, whereas time and date will be read from the optional real-time clock circuit. If no question mark is transmitted, all fields containing variable input, i.e. variables, counters, time and date, will be completely omitted from the printout.

57

Page 58

UBI EasyCoder 91 – Programming A COMMAND – PRINT TEXT Description

This command is used to print an ASCII text string.

Syntax

Ap1,p2,p3,p4,p5,p6,p7,"DATA"

Parameters p1 p2 p3 p4 p5 p6 p7 "DATA"

Horizontal start position (X) in dots Vertical start position (Y) in dots1 0 No Rotation 1 90 degrees rotation clockwise 2 180 degrees rotation clockwise 3 270 degrees rotation clockwise Font selection2: 1 20.3 cpi, 6 points, (8 x 12 dots) 2 16.9 cpi, 7 points, (10 x 16 dots) 3 14.5 cpi, 10 points, (12 x 20 dots) 4 12.7 cpi, 12 points, (14 x 24 dots) 5 5.6 cpi, 24 points, (32 x 48 dots) Horizontal multiplier 1, 2, 3, 4, 6, 8. (Magnifies the text horizontally) Vertical multiplier 1, 2, 3, 4, 5, 6, 7, 8, 9. (Magnifies the text vertically) N Normal image R Reverse image Represents a fixed data field.

1

/. When using reverse image, space must be provided for the black background. Thus, vertical start position ≥ 2 dots must be used. 2 /. Fonts 1 - 5 are fixed pitch. For character availability maps, see Appendix 3 “Fonts, Code Pages and Character Sets”.

Continued! 58

Page 59

UBI EasyCoder 91 – Programming A COMMAND – PRINT TEXT, cont'd. Examples

↵ N ↵ A50,0,0,1,1,1,N,"Example 1" ↵ A50,50,0,2,1,1,N,"Example 2" ↵ A50,100,0,3,1,1,N,"Example 3" ↵ A50,150,0,4,1,1,N,"Example 4" ↵ A50,200,0,5,1,1,N,"EXAMPLE 5" ↵ A50,300,0,3,2,2,R,"Example 6" ↵ P1 ↵

Note: Font size 5 only supports uppercase characters, as illustrated by example 5 above. Remarks

The "DATA" field can be replaced by or combined with below commands: Variable: Vnn Prints the contents of variable “nn” at this position, where nn is a 2 digit number from 00 – 99. Consecutive Number Counter: Cn Prints the contents of counter “n” at this position, where n is a 1 digit number from 0 – 9. Cn±x Prints the contents of counter “n” at this position while setting the counter's start value to “x”. n and x are 1 digit numbers from 0 – 9 Enter + to increment or - to decrement.

Continued! 59

Page 60

UBI EasyCoder 91 – Programming A COMMAND – PRINT TEXT, cont'd. Remarks, cont'd.

Example: When labels with consecutive numbers are printed next to each other across the web, it is done by using a single counter in a single form. The command Cn±x in our example will be used twice and count up the single counter by one (1) in each position (last two A-command lines). Set the Form Step Value p4 to +3 for the counter Cn used in our example (see the C-command line). Also refer to “C Command – Counter”. ↵ FK"TEST2" ↵ FS"TEST2" ↵ C0,5,L,+3,"Counter 0" ↵ A180,50,0,3,1,1,N,C0 ↵ A380,50,0,3,1,1,N,C0+1 ↵ A580,50,0,3,1,1,N,C0+2 ↵ FE ↵

00001

00002

00003

Time: TT

Prints the current time at this position in the predefined format. See the TT command for format selection. This command is only available if a Memory Cartridge with a Real Time Clock is installed. TT+nnn Prints “sell by” time. Adds nnn number of minutes (must be three digits) to the current time and places it on the form using time layout defined. TD Prints the current date at this position in the predefined format. See the TD command for format selection. This command is only available if a Memory Cartridge with a Real Time Clock is installed. TD+nn Prints “sell by” date. Adds nn number of days (must be two digits) to the current date and places it on the form using date layout defined.

Continued! 60

Page 61

UBI EasyCoder 91 – Programming A COMMAND – PRINT TEXT, cont'd. Remarks, cont'd.

This example illustrates how fixed text, variable text, counters, time and date can be used in text fields in the Form Edit Mode: ↵ FK"TEST1" ↵ FS"TEST1" ↵ V00,25,l,"Product name" ↵ C0,4,L,+1,"Start serial No" A50,50,0,4,1,1,N,"COMPANY NAME" ↵ A50,100,0,3,1,1,N,"Product: "V00 ↵ A50,150,0,3,1,1,N,"Serial No: "C0 ↵ A50,200,0,3,1,1,N,"Expiry date: "TD+05 ↵ A50,250,0,3,1,1,N,"Packed :"TD"_"TT ↵ FE ↵ After retrieving and printing the form, the label may e.g. look like this:

Combination of several options can also be used in a single text field: A50,300,0,3,2,2,R,"Deluxe"V01C1"Combo"TDV01TT ↵ :Writes the text “Deluxe” + the contents of variable 01 + the contents of counter 2 + the text “Combo” + the current date + the contents of variable 01 + by the current time

61