How to use TCPCLIENT into zebra printer in ZBI program

F FirstName LastName 2 years 6 months ago
113 0 0

Hello,
I'm developing a ZBI program to send data from zebra printer (TCPCLIENT) to TCPSERVER. I can create a connection and I can send data from TCPSERVER to TCPCLIENT into Zebra Printer. But I'm not able to send data from TCPCLIENT into Zebra Printer to TCPSERVER. The TCPSERVER never receive data.
Sample:
AUTONUM 1,1
CLOSE ALL
LET TCPClient = CLIENTSOCKET("TCP","192.168.1.47", 2424);
IF (TCPClient > 0) THEN
OPEN #1: NAME "ZPL";
LET MSG$ = "Hello ";
PRINT #TCPClient: MSG$ & "0" & chr$(13) & chr$(10);
INPUT #TCPClient : MENSAJE$;
DO WHILE MENSAJE$ <> "EXIT"
PRINT #TCPClient: MSG$ & "1" & chr$(13) & chr$(10);
PRINT # 1 : "~SD25^XA^FS";
PRINT # 1 : "^LH0,0^FS";
PRINT # 1 : "^FO56,150^A0N,69,58^FDMensaje recibido: " & MENSAJE$ & "^FS";
PRINT # 1 : "^PQ1,0,0,N";
PRINT # 1 : "^XZ"
SLEEP 1
PRINT #TCPClient: MSG$ & "2" & chr$(13) & chr$(10);
INPUT #TCPClient : MENSAJE$;
LOOP
PRINT # 1 : "~SD25^XA^FS";
PRINT # 1 : "^LH0,0^FS";
PRINT # 1 : "^FO56,150^A0N,69,58^FDFIN PROGRAMA^FS";
PRINT # 1 : "^PQ1,0,0,N";
PRINT # 1 : "^XZ"
END IF
CLOSE ALL
END

Thank you in advanced

CONTACT
Can’t find what you’re looking for?