我用的是OS-214标签打印机自带的PPLA编程语言,但是在运行其自带的VB测试程序打开打印机端口时,却收到提示:Cann‘t open printer port ! 连用上位机控制打印机端口都无法进行。问题在于,既然函数能够调用执行,那么这个函数的调用语法应该是没有问题的,而且串口线也没有问题,但就是连接不上。不知道有没有用这种标签打印机编程的战友,这个问题应该如何解决?谢谢!
函数说明如下:
A_CreatePrn()
A_CreateUSBPort()
PURPOSE Start printer opreation.
SYNTAX
VC:
int A_CreatePrn(int selection, LPCTSTR filename);
int A_CreateUSBPort(int nPort);
VB:
DECLEARFunction A_CreatePrn(ByVal selection As Long, ByVal filename
As String) As Long
DECLEARFunction A_CreateUSBPort(ByVal nPort As Long) As Long
PARAMETER
selection; To SELECT the printer port.
0 -> print to file.
1 -> lpt1, 2 -> lpt2, 3 -> lpt3
4 -> com1, 5 -> com2, 6 -> com3
10 -> net
filename; If selection is 0 , print to file.
If selection is 10,filename is the path.
The "file name" can be under current
directory or full directory path or NULL.
nPort; USB port
RETURN 0 -> OK.
Reference AW-Error.txt file.
EXAMPLE
VC:
A_CreatePrn(1,NULL); or A_CreatePrn(0,"C:\TEMP\out.prn");
A_CreatePrn(10,"\\allen\Label"); or A_CreateUSBPort(1);
VB:
Call A_CreatePrn(1, null) or Call A_CreatePrn(0, "a22") or
Call A_CreatePrn(10, "\\allen\Label") or Call A_CreateUSBPort(1)
REMARK The A_CreatePrn() and A_CreateUSBPort() function will activate a valid
printer port or "print to file" path. This function must be performed
before all commands.
A_CreatePrn(), A_CreateUSBPort() and A_CreatePort() must use one of it
at once.
大家帮忙看看吧,多谢了!