PDA

View Full Version : ESC sequences and Dataflex



Glyn astill
26-Apr-2005, 07:15 AM
Hi Peeps,

Has anybody used dataflex to output ESC sequences before?

I'm trying to send esc sequences to an epson printer in order to output
a bar code.

Regards
Glyn

Glyn astill
26-Apr-2005, 07:34 AM
Sorry forgot to mention, using an epson epl 6200 lazer

Glyn astill wrote:

> Hi Peeps,
>
> Has anybody used dataflex to output ESC sequences before?
>
> I'm trying to send esc sequences to an epson printer in order to output
> a bar code.
>
> Regards
> Glyn

Paul Cooling
26-Apr-2005, 07:36 AM
Glyn:
Just use the Write and Writlen commands and send whatever codes you
need. This is an example for a SATO 8400 printer

//
// Print the UPC Product Code and Human readable text below
// NOTE: It is necessary to calculate the checksum with SATO 8400
//
Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots high
Write "0620027" seq_046 real_chksum // UPC Code
Write "H050V150M6H360M" real_chksum // ASCII text on either side
Write "H100V150M20027H240M" seq_046 // ASCII text below UPC bar code


Glyn astill wrote:
> Hi Peeps,
>
> Has anybody used dataflex to output ESC sequences before?
>
> I'm trying to send esc sequences to an epson printer in order to output
> a bar code.
>
> Regards
> Glyn

Glyn astill
26-Apr-2005, 08:24 AM
Hi Paul,

The thing that I do not understand is how to write what I want to write
to the file. I'm told our printer needs to be sent ANSI text but
dataflex is ASCII.

Also I have docs for printing barcodes on dot matrix epson printers but
cant find anything for laser printers, let alone our specific model of
printer.

Regards
Glyn

Paul Cooling wrote:

> Glyn:
> Just use the Write and Writlen commands and send whatever codes you
> need. This is an example for a SATO 8400 printer
>
> //
> // Print the UPC Product Code and Human readable text below
> // NOTE: It is necessary to calculate the checksum with SATO 8400
> //
> Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots high
> Write "0620027" seq_046 real_chksum // UPC Code
> Write "H050V150M6H360M" real_chksum // ASCII text on either side
> Write "H100V150M20027H240M" seq_046 // ASCII text below UPC bar code
>
>
> Glyn astill wrote:
>
>> Hi Peeps,
>>
>> Has anybody used dataflex to output ESC sequences before?
>>
>> I'm trying to send esc sequences to an epson printer in order to
>> output a bar code.
>>
>> Regards
>> Glyn

Glyn astill
26-Apr-2005, 08:30 AM
also has anyone used esc sequences to print out barcodes before on an epson?

Glyn astill wrote:

> Hi Paul,
>
> The thing that I do not understand is how to write what I want to write
> to the file. I'm told our printer needs to be sent ANSI text but
> dataflex is ASCII.
>
> Also I have docs for printing barcodes on dot matrix epson printers but
> cant find anything for laser printers, let alone our specific model of
> printer.
>
> Regards
> Glyn
>
> Paul Cooling wrote:
>
>> Glyn:
>> Just use the Write and Writlen commands and send whatever codes you
>> need. This is an example for a SATO 8400 printer
>>
>> //
>> // Print the UPC Product Code and Human readable text below
>> // NOTE: It is necessary to calculate the checksum with SATO 8400
>> //
>> Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots high
>> Write "0620027" seq_046 real_chksum // UPC Code
>> Write "H050V150M6H360M" real_chksum // ASCII text on either side
>> Write "H100V150M20027H240M" seq_046 // ASCII text below UPC bar code
>>
>>
>> Glyn astill wrote:
>>
>>> Hi Peeps,
>>>
>>> Has anybody used dataflex to output ESC sequences before?
>>>
>>> I'm trying to send esc sequences to an epson printer in order to
>>> output a bar code.
>>>
>>> Regards
>>> Glyn

Paul Cooling
26-Apr-2005, 11:01 AM
ANSI is a standard.
All characters are ASCII, such as what I am typing now or is sent to a
printer, unless you are talking about Unicode which I am sure your Epson
printer does not support.

Glyn astill wrote:
> Hi Paul,
>
> The thing that I do not understand is how to write what I want to write
> to the file. I'm told our printer needs to be sent ANSI text but
> dataflex is ASCII.
>
> Also I have docs for printing barcodes on dot matrix epson printers but
> cant find anything for laser printers, let alone our specific model of
> printer.
>
> Regards
> Glyn
>
> Paul Cooling wrote:
>
>> Glyn:
>> Just use the Write and Writlen commands and send whatever codes you
>> need. This is an example for a SATO 8400 printer
>>
>> //
>> // Print the UPC Product Code and Human readable text below
>> // NOTE: It is necessary to calculate the checksum with SATO 8400
>> //
>> Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots high
>> Write "0620027" seq_046 real_chksum // UPC Code
>> Write "H050V150M6H360M" real_chksum // ASCII text on either side
>> Write "H100V150M20027H240M" seq_046 // ASCII text below UPC bar code
>>
>>
>> Glyn astill wrote:
>>
>>> Hi Peeps,
>>>
>>> Has anybody used dataflex to output ESC sequences before?
>>>
>>> I'm trying to send esc sequences to an epson printer in order to
>>> output a bar code.
>>>
>>> Regards
>>> Glyn

Bernhard Mandl
26-Apr-2005, 11:32 AM
> ANSI is a standard.

Not in this context. ANSI is somtimes used as a synonym for windows
codepages 12xx, as opposed to OEM codpages that are used by console mode
programs.

In any case this has nothing to do with printing of barcodes. Both ANSI and
OEM codepages use single bytes to represent a character.

If you send the correct sequence of bytes to the printer you should bet a
barcode.

Larry Heiges
26-Apr-2005, 12:17 PM
Glyn,

string sEsc sInit
move (character(27)) to sEsc

Write sEsc "@" //init printer

or

move (sEsc+"@") to sInit
Write sInit


Larry Heiges
App-2-Win Systems, Inc.
LookFeel for Windows
http://app-2-win.com
LFW7sp3
LFW10
LFW11

Joerg Thuemmler
28-Apr-2005, 12:50 AM
Glyn,

the real question is: what emulation (printer program) your printer
understands. As far as I know there is no epson laser printer
langage. If it's not one of the f****** so called "windows" printers
(which means it doesn't understand any real printer language at all
but a special windows graphic data format which is sent to the
printer by windows printer spooler, therefore you would have bad
luck) it will understand pcl (hp laserjet language), maybe
postscript (adobe) and - beeing an epson printer - an epson language
(fx or called escP) and often ibmproprinter too, these both are
using the typical esc-codes. As for pcl there are barcode programs,

I have code of a module "hpcode" which makes a pcl barcode which was
posted on this newsgroup some time ago, sorry for not remembering
the author and the barcode type. There are others in the wide wide web.
As not for pcl or ps (there will be code pieces in the www too) you
with some luck will find a special barcode command in your docu
which is printer specific and typically looks as what Paul wrote.

If you have a plain epson, pcl or ps emulation on your printer there
is another way using external programs. There's a C-Program package
"barcode" at freshmeat.net (open source website), customized for
linux but there are linux type c compilers and environments for
windows too where all this stuff works on windows boxes. This
package compiles to a command line executable which called with a
customized "runprogram" gives back barcode sequences for epson fx,
pcl or ps printer languages. I may give some help in this case if
needed. But first look into your doku which printer language are
supported, remebering well it will be postscript.

hth

joerg




Glyn astill wrote:
> also has anyone used esc sequences to print out barcodes before on an
> epson?
>
> Glyn astill wrote:
>
>> Hi Paul,
>>
>> The thing that I do not understand is how to write what I want to
>> write to the file. I'm told our printer needs to be sent ANSI text but
>> dataflex is ASCII.
>>
>> Also I have docs for printing barcodes on dot matrix epson printers
>> but cant find anything for laser printers, let alone our specific
>> model of printer.
>>
>> Regards
>> Glyn
>>
>> Paul Cooling wrote:
>>
>>> Glyn:
>>> Just use the Write and Writlen commands and send whatever codes you
>>> need. This is an example for a SATO 8400 printer
>>>
>>> //
>>> // Print the UPC Product Code and Human readable text below
>>> // NOTE: It is necessary to calculate the checksum with SATO 8400
>>> //
>>> Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots high
>>> Write "0620027" seq_046 real_chksum // UPC Code
>>> Write "H050V150M6H360M" real_chksum // ASCII text on either side
>>> Write "H100V150M20027H240M" seq_046 // ASCII text below UPC bar
>>> code
>>>
>>>
>>> Glyn astill wrote:
>>>
>>>> Hi Peeps,
>>>>
>>>> Has anybody used dataflex to output ESC sequences before?
>>>>
>>>> I'm trying to send esc sequences to an epson printer in order to
>>>> output a bar code.
>>>>
>>>> Regards
>>>> Glyn

Glyn astill
13-Jun-2005, 12:47 PM
Hi Joerg,

The printer in question is an epl6200 (not the L version) aparently it
supports esc/2 and pcl5e codes.

I moved on to using a Microplex f24 printer, and got it working in about

5 minutes.

Cheers to everyone for the help
Glyn

Joerg Thuemmler wrote:
> Glyn,
>
> the real question is: what emulation (printer program) your printer
> understands. As far as I know there is no epson laser printer langage.

> If it's not one of the f****** so called "windows" printers (which
means
> it doesn't understand any real printer language at all but a special
> windows graphic data format which is sent to the printer by windows
> printer spooler, therefore you would have bad luck) it will understand

> pcl (hp laserjet language), maybe postscript (adobe) and - beeing an
> epson printer - an epson language (fx or called escP) and often
> ibmproprinter too, these both are using the typical esc-codes. As for
> pcl there are barcode programs,
>
> I have code of a module "hpcode" which makes a pcl barcode which was
> posted on this newsgroup some time ago, sorry for not remembering the
> author and the barcode type. There are others in the wide wide web.
> As not for pcl or ps (there will be code pieces in the www too) you
with
> some luck will find a special barcode command in your docu which is
> printer specific and typically looks as what Paul wrote.
>
> If you have a plain epson, pcl or ps emulation on your printer there
is
> another way using external programs. There's a C-Program package
> "barcode" at freshmeat.net (open source website), customized for linux

> but there are linux type c compilers and environments for windows too
> where all this stuff works on windows boxes. This package compiles to
a
> command line executable which called with a customized "runprogram"
> gives back barcode sequences for epson fx, pcl or ps printer
languages.
> I may give some help in this case if needed. But first look into your
> doku which printer language are supported, remebering well it will be
> postscript.
>
> hth
>
> joerg
>
>
>
>
> Glyn astill wrote:
>
>> also has anyone used esc sequences to print out barcodes before on an

>> epson?
>>
>> Glyn astill wrote:
>>
>>> Hi Paul,
>>>
>>> The thing that I do not understand is how to write what I want to
>>> write to the file. I'm told our printer needs to be sent ANSI text
>>> but dataflex is ASCII.
>>>
>>> Also I have docs for printing barcodes on dot matrix epson printers
>>> but cant find anything for laser printers, let alone our specific
>>> model of printer.
>>>
>>> Regards
>>> Glyn
>>>
>>> Paul Cooling wrote:
>>>
>>>> Glyn:
>>>> Just use the Write and Writlen commands and send whatever codes you

>>>> need. This is an example for a SATO 8400 printer
>>>>
>>>> //
>>>> // Print the UPC Product Code and Human readable text below
>>>> // NOTE: It is necessary to calculate the checksum with SATO 8400
>>>> //
>>>> Write "H070V030D303120" 2 UPC-A, 3 dots for narrow, 120 dots
high
>>>> Write "0620027" seq_046 real_chksum // UPC Code
>>>> Write "H050V150M6H360M" real_chksum // ASCII text on either
side
>>>> Write "H100V150M20027H240M" seq_046 // ASCII text below UPC
bar
>>>> code
>>>>
>>>>
>>>> Glyn astill wrote:
>>>>
>>>>> Hi Peeps,
>>>>>
>>>>> Has anybody used dataflex to output ESC sequences before?
>>>>>
>>>>> I'm trying to send esc sequences to an epson printer in order to
>>>>> output a bar code.
>>>>>
>>>>> Regards
>>>>> Glyn

J.Povedano
14-Jun-2005, 10:33 AM
Glyn: We did it.

But.. Epson sometimes uses different ESC/P sequences between models. We
made this to a EPL-2050+ that is a lasser too. This may be run well in
the 6200.

The best way to understand all is to contact with Epson Support. They
send you mannuals. The bar codes are a very strong work.

Our CODE:

Insert this routine in your code, and pass the code ( number and letters
) you want to print in the BARRCOD variable. The sequence is to print
using the type 128.

Good luck.

Javier Povedano

string barrax barra1 barra2 barra11 barra22 barras barras2 barrn1 barrn2 barrk barrm barrs barrv1 barrv2 barrc1 barrc2 barrcod

GOTO CONTBARR


CODBARRAS:

// CODIGO DE BARRAS
// barrn1 = 7 + digit number of code
// barrn2 = 0 ( rest of barrn1 )
// barrk = bar code type 128
// barrm = width ( 2 to 5 )
// barrs = inches adjust ( -3 to +3 )
// barrv1 = height
// barrv2 = height rest
// barrc1 = barrc2 rest ?
// barrc1 = code print mode


move "" to barras
move control to barras
CHARACTER 40 TO barrax
append barras barrax
CHARACTER 66 TO barrax
append barras barrax

character (7+(length(trim(barrcod)))) to barrn1
character 0 to barrn2

character 6 to barrk
character 0 to barrm // 2
character -3 to barrs
character 46 to barrv1 // 125
character 0 to barrv2 //
character 2 to barrc1
character 66 to barrc2 // Tipo fuente A B o C

append barras barrn1 barrn2 barrk barrm barrs barrv1 barrv2 barrc1 barrc2 (trim(barrcod))
RETURN



CONTBARR:

J.Povedano
14-Jun-2005, 10:37 AM
>
> move "" to barras
> move control to barras
> CHARACTER 40 TO barrax
> append barras barrax
> CHARACTER 66 TO barrax
> append barras barrax
>

Sorry, pass a character 27 to the CONTROL variable.

Javier Povedano