Chapter
5
Patterns / Variables
To see pattern details, i.e., name and definition, hover the pointer over the
character in the Input field to display a screen tip. See Figure 144.
NOTE: For some Modes, you cannot insert patterns into the Output field.
Pattern Recognition Example
Normally, the CST only allows you to do an absolute match on a character. It
has not been possible to check if a character is within a given range of
characters (unless you write a very complicated CST).
Pattern recognition allows the user to specify either a range of characters or a
specific pattern with a unique name that can be used to test the input data
against.
Example
The following command sets the label size for thermal printer 1:
<ESC>Daaaa,bbbb,cccc<LF><NULL>
where aaaa is the length of the label, bbbb is the effective print width and cccc
is the effective print length.
NOTE: aaaa, bbbb, and cccc are always fixed at 4 digits with a value range
Convert this command (assuming the units are the same) into the PGL
PAPER command for thermal printer 2.
Start with a CST that will translate the <ESC>D into PAPER. Skip the value of
aaaa since thermal printer 2 can detect the forms length using the
CALIBRATE function. The value of bbbb will be used in combination with the
WIDTH function, and the value of cccc in combination with the LENGTH
function. This results in the following translation:
Thermal printer 1: <ESC>Daaaa,bbbb,cccc<LF><NULL>
Thermal printer 2: PAPER;CALIBRATE;LENGTH cccc;WIDTH
bbbb<CR><LF>
To be able to copy the value of bbbb into the WIDTH function and the value of
cccc into the LENGTH function, label these values and specify their ranges to
be from 0000 to 9999.
To do this, use the Object Definition capability of the datastream adapter.
168
Figure 144. Pattern Screen Tip
of 0000 to 9999.
Need help?
Do you have a question about the T5000 and is the answer not in the manual?
Questions and answers