شما کافی کد اسکی کاراکتررا به تابع ارسال کنی و اتصالات را درست برقرار کنی و برای تنظیمات از ارسال Command استفاده کنید
مثلا کد زیر مد deraft را برای پرینت کردن انتخاب میکند:
Print(27);
Print(120);
Print(48);
برای ارسال Command هم از تابع Print استفاده شد و همه Command ها با کاراکترهای کنترلی شرو ع می شوند .
لیست Command ها
Epson FX Printer Codes
Printer Operation:
Decimal ASCII Description
7 BEL Beeper
17 DC1 Select printer
19 DC3 Deselect printer
27 25 48 Esc EM 0 Turn cut sheet feeder control off
27 25 52 Esc EM 4 Turn cut sheet feeder control on
27 56 Esc 8 Disable paper out sensor
27 57 Esc 9 Enable paper out sensor
27 60 Esc < Select unidirectional mode for one line
27 64 Esc @ Initialize printer
27 85 48 Esc U 0 Cancel unidirectional mode
27 85 49 Esc U 1 Select unidirectional mode
27 115 48 Esc s 0 Turn half speed mode off
27 115 49 Esc s 1 Turn half speed mode on
Vertical/Horizontal Motion:
Decimal ASCII Description
8 BS Backspace
9 HT Horizontal tab
10 LF Line Feed
11 VT Vertical Tab
12 FF Form Feed
27 47 c ESC / c Select vertical tab channel (c=0..7)
27 48 ESC 0 Select 8 lines per inch
27 49 ESC 1 Select 7/72 inch line spacing
27 50 ESC 2 Select 6 lines per inch
27 51 n ESC 3 n Select n/216 inch line spacing (n=0..255)
27 65 n ESC A n Select n/72 inch line spacing (n=0..85)
27 66 0 ESC B NUL Clear Vertical tabs
27 66 tabs ESC B tabs Select up to 16 vertical tabs where tabs are ascending values from 1..255 ending with NUL
27 67 n ESC C n Select page length in lines (n=1..127)
27 67 48 n ESC C 0 n Select page length in inches (n=1..22)
27 68 0 ESC D NUL Clears all horizontal tables
27 68 tabs 0 ESC D tabs NUL Sets up to 32 horizontal tabs with ascending values 1-137. NUL or a value less than previous tab ends command.
27 74 n ESC J n Immediate n/216 inch line feed (n=0..255)
27 78 n ESC N n Select skip over perforation (n=1..127)
27 79 ESC O Cancel skip over perforation
27 81 n ESC Q n Set right margin (n=column)
27 98 b c 0 ESC b c NUL Clear vertical tabs in channel (c=0..7)
27 98 c tabs ESC b c tabs Select up to 16 vertical tabs in channels (c=0..7) where tabs are ascending values from 1..255 ending with NUL
27 101 48 s ESC e 0 s Set horizontal tab to increments of 's'
27 101 49 s ESC e 1 s Set vertical tab to increments of 's'
27 102 48 s ESC f 0 s Set horizontal skip to increments of 's'
27 102 49 s ESC f 1 s Set vertical skip to increments of 's'
27 106 n ESC j n Reverse linefeed (n/216 inch after buffer)
27 108 n ESC l n Set left margin (n=column)
Printing Style:
Decimal ASCII Description
27 33 n ESC ! n Master select where n is a combination of:
27 82 n ESC R n Select International character set where numeric 'n' is:
0 USA
1 France
2 Germany
3 United Kingdom
4 Denmark I
5 Sweden
6 Italy
7 Spain
8 Japan
9 Norway
10 Denmark II
11 Spain II
12 Latin America
27 116 0 ESC t NUL Select italic character set
27 116 1 ESC t SOH Select Epson character set
User Defined Characters:
Decimal ASCII Description
27 37 0 ESC % NUL Selects normal character set
27 37 1 ESC % SOH Selects user defined set
27 38 0 ESC & NUL ? Select user defined chars (see manual)
27 58 0 0 0 ESC : NUL NUL NUL Copy ROM into RAM
Graphics Character Sets:
Decimal ASCII Description
27 42 0 n1 n2 ESC * NUL n1 n2 Select single density graphics
27 42 1 n1 n2 ESC * SOH n1 n2 Select double density graphics
27 63 s n ESC ? s n Reassign graphics mode
's'=(K,L,Y or Z) to mode 'n'=(0..6)
27 75 n1 n2 ESC K n1 n2 Single density graphics (60 dpi)
27 76 n1 n2 ESC L n1 n2 Double density graphics (120 dpi)
27 89 n1 n2 ESC Y n1 n2 Hi-speed double den graphics (120 dpi)
27 90 n1 n2 ESC Z n1 n2 Quad density graphics (240 dpi)
27 94 m n1 n2 ESC ^ m n1 n2 Select 9 pin graphics mode
number of columns = n1 + (n2 * 256)
Other:
Decimal ASCII Description
13 CR Carriage Return
24 CAN Cancel text in line (but not control codes)
127 DEL Delete character (but not control codes)
27 32 n ESC SP n Space in n/72 inch following each NLQ char
دوست عزیز برای پرینت فارسی :
1: شما باید توسط Command هایی که گذاشتم پرینتر را در مد گرافیکی تنظیم کنید
2: باید فونتها را خودتون طراحی کنید
3: تئسط Command مربوطه اطلاعات مربوط به هر پیکسل را ارسال کن البته اینجا به ازای هر پیکسل شما یک بایت ارسال می کنید و این یک بایت شدت رنگ پیکسل را تعیین می کند
برای اینکار بهتره از ماژولهای پرینتر حرارتی دستگاههای پزشکی استفاده کنی که در اصطلاح
recorder گفته می شه.
تا اوجایی که می دونم اغلب با RS232 اینترفیس می شن. ساده ترین و دانشجویی ترین کار اینه که
از یک مانیتورینگ پزشکی مستعمل باز کنی ( از شرکتهای مهندسی پزشکی بخری oo: )
دو سالی میشه که توی این فیلد نیستم ، ولی اگر نتونستی پیدا کنی شاید بشه یه کارهایی کرد
... ضمنا در ایران یه تولید کننده و طراح مانیتورینگ هم داریم که پیر بچه های خوبی هستند :agree: شاید
بشه کمک گرفت. البته قولی نمیدم ، شاید نشه چون خیلی وقته در ارتباط نیستم
قربون شما
رضا
It's not the Strongest that Survive, Nor the Most Intelligence, But the ones Most Responsive to Change
گونه هایی که شانس بقا دارند ، نه قویترین هستند و نه باهوشترین بلکه آنهایی هستند که بیشترین آمادگی تغییرات را دارند !
چارلز داروین - بنیانگذار نظریه تکامل
دیدگاه