1

我在吃 Argox 标签打印机时遇到问题,仍然无法向她发送任何内容。型号为 Argox OS214 tt、ANPP 并接受 PPLB。

使用通用类连接到串行设备,我用她的几个财务打印机和秤,附上。全部使用 rxtx 库。此类还可以读取设备的响应,因为它已经在秤上使用并且从未出现过问题,也可以在财务打印机上使用。

我观看了手动 PPLA 并或多或少地看到了它是如何工作的,但还不能测试任何东西。我无能为力,也无法阅读您的回复。

这是我的测试:

import javax.swing.JOptionPane;  
public class TestePPLA {  
public static void main(String[] args){  
    String porta="COM1";  
    int velocidade=9600;  
    int databits=8;  
    int stopbits=1;  
    int paridade=0;  
    int timeout=10;  
    try  
    {             
        String comando = "<STX>L<CR>121100001000050THIS LABEL IS MADE BY JIMMY<CR>E<CR>";  
        ComunicacaoSerial comunica = ComunicacaoSerial.getReference ();  
        comunica.conexao (porta,velocidade,databits,stopbits,paridade);  
        comunica.escritaPortaSerial (comando.getBytes());  

        Thread.sleep(timeout);  
        String resposta = new String (comunica.getDados());  

        comunica.fechaConexao();                  

        System.out.println(resposta);  
    }  
    catch(Exception ex)  
    {  
        ex.printStackTrace();  
        JOptionPane.showMessageDialog(null, "Erro de comunica\u00e7\u00e3o com a impressora", "Testador", JOptionPane.ERROR_MESSAGE);  
    }  

}  
}  
4

1 回答 1

2

对于您所说的,问题在于您将 PPLA 代码发送到 PPLB 打印机,当您这样做时,打印机什么也不做。这是一个 PPLB 代码的示例:

N↵
A50,30,0,1,1,1,N,"This is font 1." ↵
A50,70,0,2,1,1,N,"This is font 2." ↵
A50,110,0,3,1,1,N,"This is font 3." ↵
A50,150,0,4,1,1,N,"This is font 4." ↵
A50,200,0,5,1,1,R,"FONT 5"↵
P1↵
于 2012-11-08T20:43:15.267 回答