Need to send a command directly to printer (Eltron Card Printer) 
Author Message
 Need to send a command directly to printer (Eltron Card Printer)

Hi
I am working on an app that sends commands to an Eltron P300 Card Printer to
encode magnetic swipe cards.
The progamming manual offers a full range of the commands and parameters
required, but I am having problems with certain required characters (esc,
space and return).
The manual suggests sending the commands directly using DOS (e.g COPY
filename LPT1)

I have tried in VB6 using FileCopy "c:\CommandTest.txt", LPT2 which seems to
be received by the printer (as the led's on the front panel of the printer
light up), but nothing else is happening.

an example of the code being sent is:

(esc)&B(space)2(space)123456(return)
(esc)&E*(return)

the above command basically writes "123456" to track 2 of the magnetic strip
of a card.

The thing I am stuck on is the correct characters to use for esc, space, and
return.

Any suggestions would be greatly appreciated

TIA - Peter



Wed, 07 May 2003 09:32:30 GMT  
 Need to send a command directly to printer (Eltron Card Printer)

Escape = 27
Space = 32
Return = 13

By the way, have you tried writing driectly to the printer port from Visual
Basic:

Open Printer.Port for Output as #1
Print #1, "whatever";
etc

Mike


Quote:
> Hi
> I am working on an app that sends commands to an Eltron P300 Card Printer to
> encode magnetic swipe cards.
> The progamming manual offers a full range of the commands and parameters
> required, but I am having problems with certain required characters (esc,
> space and return).
> The manual suggests sending the commands directly using DOS (e.g COPY
> filename LPT1)

> I have tried in VB6 using FileCopy "c:\CommandTest.txt", LPT2 which seems to
> be received by the printer (as the led's on the front panel of the printer
> light up), but nothing else is happening.

> an example of the code being sent is:

> (esc)&B(space)2(space)123456(return)
> (esc)&E*(return)

> the above command basically writes "123456" to track 2 of the magnetic strip
> of a card.

> The thing I am stuck on is the correct characters to use for esc, space, and
> return.

> Any suggestions would be greatly appreciated

> TIA - Peter



Wed, 07 May 2003 13:40:13 GMT  
 Need to send a command directly to printer (Eltron Card Printer)
Thanks for the reply Michael,

Unfortunately the code still isn't working - if you're keen I can mail you
some more info from the manual?  : )

Regards

Pete



Fri, 09 May 2003 12:30:10 GMT  
 Need to send a command directly to printer (Eltron Card Printer)

Channel = FreeFile
Open Fle$ For Output as Channel

Print# Channel Chr$(27); "&B" ; Chr$(32) ; "2";
Print# Channel,  Chr$(32); "123456" ; Chr$(13);
Print# Channel, Chr$(27); "&E*"; Chr$(13);

Close# Channel

Note: each line ends with ';'

On Sat, 18 Nov 2000 14:32:30 +1300, "Peter Marquet"

Quote:

>Hi
>I am working on an app that sends commands to an Eltron P300 Card Printer to
>encode magnetic swipe cards.
>The progamming manual offers a full range of the commands and parameters
>required, but I am having problems with certain required characters (esc,
>space and return).
>The manual suggests sending the commands directly using DOS (e.g COPY
>filename LPT1)

>I have tried in VB6 using FileCopy "c:\CommandTest.txt", LPT2 which seems to
>be received by the printer (as the led's on the front panel of the printer
>light up), but nothing else is happening.

>an example of the code being sent is:

>(esc)&B(space)2(space)123456(return)
>(esc)&E*(return)

>the above command basically writes "123456" to track 2 of the magnetic strip
>of a card.

>The thing I am stuck on is the correct characters to use for esc, space, and
>return.

>Any suggestions would be greatly appreciated

>TIA - Peter



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help, How to send printer command to printer bypassing printer driver in vb

2. Printer Commands directly to the Printer

3. how to send printer commands to a printer

4. Sending Printer Commands to Printer using QBASIC

5. Send text directly to printer port?

6. Sending a .prn file directly to a networked printer

7. Send text to printer directly

8. Sending characters directly to Win95 printer?

9. Send chars directly to line printer?

10. Sending files directly to the printer port, under NT Server

11. Sending Printer control Codes to printer

12. bug sending text to printer via printer object

 

 
Powered by phpBB® Forum Software