Compactlogix TCP Socket OpenConnection to Zebra Printer

radamson

Member
Join Date
Feb 2021
Location
Michigan
Posts
2
Hi,
I am trying to connect a L24ER Compactlogix PLC to a GK420d Zebra printer. All my manual reading and forum searches has lead me to believe that I can use TCP socket connections to send ASCII ZPL code to print labels from the PLC to the printer over Ethernet.
Using the Rockwell Knowledgebase article QA16120 leaves me stuck when I try to use the OpenConnection MSG command.
I get a General Error 16#00ff with Extended Error Code 16#0000_0046
There are three reasons for the is error
1) Connect Service message:
Server IP exists, but port does not
Server IP and port exists, but it does not accept connection on this port
Service timeout value in UDT set to 0 or very low value
2) Read/Write Service message: Read and write executed at the same time
3) Firewall

Based on my code I don't believe it is reason #2 or #3.

I think that I am missing something simple to setup the printer to receive this connection. But I set the printer IP address (and can ping it) and default port number is 9100.

Has anyone else got the OpenConnection MSG to work successfully to print to a Zebra printer?
 
Welcome to the forum!

The first thing I would try is to use TCPing to try and ping that specific TCP port. That will at least make sure the port is definitely open.
 
Thank you for the suggestion as it allowed me to know if/when the port was open.

I did get it working this morning.

After a series of cycling power and then changing the IP address, the OpenConnection message completed, and I was able to send the ZPL ASCII and print a label.

Somehow I must have locked up the connection during the setup.
 
I have found this document from Zebra very useful in the past when trying to establish comms between an AB controller and a Zebra printer. You can use their EDS AOP for the generic "Link-OS printers" profile. It may save you time on all the socket connections malarkey?

Zebra Network Connect for Automation - Developer Guide

Also see here for info and access to the AOP -

https://www.zebra.com/us/en/product...link-os/network-connect-printer-software.html

Note, though, the specific list of Link-OS printers supported. I have primarily used the ZT420 and ZT620 industrial printers.

Regards,
George
 

Similar Topics

I have a device that is currently connected to a UR 10 robot through a UR Cap and I would like to connect the device to an Allen Bradley...
Replies
3
Views
332
I have a device that is currently connected to a UR 10 robot through a UR Cap and I would like to connect the device to an Allen Bradley...
Replies
0
Views
119
Hello, I have a project where I need to use a CLX to communicate with a 3rd party device that exchanges data via XML formatted commands and HTTP...
Replies
4
Views
1,690
Hi Folks, I'm trying to make a AB Compactlogix L30ER get some currents/voltages etc. from a Siemens PAC3220 power meter. I'm currently using an...
Replies
3
Views
1,406
Hi, I'm having issues with a TCP/IP connection set up between a Siemens S7-1500 and CompactLogix PLC. It was set up using the example below from...
Replies
0
Views
1,512
Back
Top Bottom