SV650.org - SV650 & Gladius 650 Forum



Idle Banter For non SV and non bike related chat (and the odd bit of humour - but if any post isn't suitable it'll get deleted real quick).
There's also a "U" rating so please respect this. Newbies can also say "hello" here too.

Reply
 
Thread Tools
Old 24-02-06, 05:30 PM   #1
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default IT - Printer Escape Comands

The last time i had to worrey about doing printer escape commands was on a nix box about 4 years ago. In that time i have not done it so have forgotten realy how to do it.

Basicly i need to send some custom commands to a ND2700 (dot matrix) printer to do some stuff.

This is the sequence: ESC [ P3 ; P0 SP r

P being just single value like 3 which gets converted to 33 hex etc..

I put it first into HEX, but our finance system only accepts decimal so i converted it to.

HEX: 1B 5B 33 3B 30 20 72
DEC: 027 091 051 059 048 032 114

I put this in a text file then do the folowing command:

COPY nd.txt LPT2 /b

All it does it print out the sequence instead of actualy doing what i want it to do (our printer can automaticly load diffrent types of paper into it).

Any ideas?
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 24-02-06, 06:30 PM   #2
Iansv
Guest
 
Posts: n/a
Default

wha.......


Have you tried turning it off and on again ?
  Reply With Quote
Old 24-02-06, 06:36 PM   #3
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

Quote:
Originally Posted by Iansv
wha.......


Have you tried turning it off and on again ?
Yep, dont try that silly trick with me me.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 24-02-06, 06:40 PM   #4
Sudoxe
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by TSM
Quote:
Originally Posted by Iansv
wha.......


Have you tried turning it off and on again ?
Yep, dont try that silly trick with me me.
IS IT PLUGGED IN?
  Reply With Quote
Old 24-02-06, 06:42 PM   #5
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

Quote:
Originally Posted by Sudoxe
Quote:
Originally Posted by TSM
Quote:
Originally Posted by Iansv
wha.......


Have you tried turning it off and on again ?
Yep, dont try that silly trick with me me.
IS IT PLUGGED IN?
no, i decided it was better to have it unplugged for no reason other than it made me feal better.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 24-02-06, 06:44 PM   #6
rigor
Guest
 
Posts: n/a
Default

try dropping the /b

afaik your trying to send ascii commands to the printer, the /b may just confuse the issue ....

but I'm probably wrong

PM the txt file if you want, two heads better than one and all that
  Reply With Quote
Old 24-02-06, 06:52 PM   #7
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

Quote:
Originally Posted by rigor
try dropping the /b

afaik your trying to send ascii commands to the printer, the /b may just confuse the issue ....

but I'm probably wrong

PM the txt file if you want, two heads better than one and all that
ive think i tried it without the /b

all the text file has is one of these lines (without the DEC/HEX bit):
Code:
HEX: 1B 5B 33 3B 30 20 72
DEC: 027 091 051 059 048 032 114
If its accepted it should not print out anything just change some settings, instead it prints the escape sequence.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 24-02-06, 07:38 PM   #8
rigor
Guest
 
Posts: n/a
Default Re: IT - Printer Escape Comands

Quote:
Originally Posted by TSM
This is the sequence: ESC [ P3 ; P0 SP r

HEX: 1B 5B 33 3B 30 20 72
DEC: 027 091 051 059 048 032 114

Any ideas?
I think you may have dropped a couple of characters in your ASCII > Hex > Dec conversion ..

I get
Hex: 1B 5B 50 33 3B 50 30 53 50 72
Dec: 027 091 080 051 059 080 048 083 080 114

P seems to be missing at the start, and the ends different ... worth a try?
  Reply With Quote
Old 24-02-06, 07:47 PM   #9
Grinch
Guest
 
Posts: n/a
Default

I remember doing this years ago, but I don't have the doc's for it anymore. Though I could have sworn you need to set some jumpers so that it can be updated. Then set them pack for normal printing, I know I wasn't happy when some fool reset the printer and I had to sort the paper types out again.
  Reply With Quote
Old 24-02-06, 10:29 PM   #10
chazzyb
Guest
 
Posts: n/a
Default

Ah, Newbury Data - good printers, or they were 20 years ago when I last fiddled with one. Looking at the control codes you're trying, looks like it's doing Epson emulation, which seems to be an option. There's an Epson ref. manual here. It's a PDF file. Bin control looks like Esc EM - pg C-157. The EM code has a decimal value of 25, so a bin select command is just 3 bytes long. The best thing to use to create the file is [shock, horror], good old EDIT. You can enter a control code by typing a Ctrl-P first. Esc is Ctrl-[, EM is Ctrl-Y. So, at a command line, invoke EDIT with your target file name. Then enter ctrl-P, ctrl-[, ctrl-P, ctrl-Y, n, where 'n' is the ascii bin number.

Your COPY /b is what I'd do too.
  Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Duff printer cartridge? missyburd Idle Banter 10 09-05-09 02:09 PM
anyone need a printer? CoolGirl Soho Massive 3 09-03-09 02:57 PM
printer woe Quiff Wichard Idle Banter 2 14-08-08 11:14 AM
Lucky escape Lozzo Bikes - Talk & Issues 6 30-03-08 08:13 PM
'Puter/Printer help please TT Dee Idle Banter 14 14-10-07 12:24 PM


All times are GMT. The time now is 06:39 AM.


Powered by vBulletin® - Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.