打码机的编程问题(100分)

  • 主题发起人 主题发起人 haha191cn
  • 开始时间 开始时间
H

haha191cn

Unregistered / Unconfirmed
GUEST, unregistred user!
关于打码机的问题,我一点都不懂。请大家帮忙啦,打码机的型号是 DATAMAX I CLASS
接口是 LPT ,最好举个例子。
 
mL
D11
Kf0080
Q0001
1X1100003900014L494004
191100703800016HTS
191100303400020Species:
191100302900020BundleNo:
191100302400020L: W: PCS:
191100301900020sqm2:
191100303400190ch
191100302900190-01-15
191100302400060195
19110030240022016
19110030240042024
1911003019001207.49
1E22110002000700&D5121401507960115
E
怎样把这个文件传给打码机 LPT
 
谁能帮忙解释一下这个文件?
 
procedure TForm1.Button1Click(Sender: TObject);
var
port, prnfile : File;
buffer: array [1..128] of Char;
read: Integer;
begin
// Specify a file to print
AssignFile(prnfile,'filetoprint');
Reset(prnfile,1);
// specify printer port
AssignFile(port,'LPT1');
Rewrite(port,1);
repeat
BlockRead(prnfile,buffer,SizeOf(buffer),read);
BlockWrite(port,buffer,read);
// Application.ProcessMessages;
until eof(prnfile) or (read <> SizeOf(buffer));
CloseFile(prnfile);
CloseFile(port);
end;
 
接受答案了.
 
后退
顶部