ControlLogix and Domino printer

Somebody has an sample program?

Thanks again

I believe the socket interface is similar to the socket infrastructure that almost everything on the 'net uses.

One host is the server, which

  • Creates a socket of type inet (inet4?)
  • Binds the socket to a port number by calling the bind(...) routine; the port number is known to clients
  • Calls the accept(...) routine to make that socket on that port available for clients to connect
  • Responds to connection via some dialog, calling send(...) and/or recv(...) routines, according to a pre-defined protocol
  • Disconnects the socket?
In this case, I expect the printer is the server, so that is already done, you only need to know the port and the protocol

The other host is the client, which

  • Creates a socket of type inet
  • Connects to the server port at the server's IP by calling the connect(...) routine
  • Participates in the dialog via the pre-defined protocol via send(...) and/or recv(...) routines.
  • Disconnect the socket via the close(...) routine.
The PLC will be the client, so that is what needs to be configured.

Those are the basic steps, and asking The Google will provide many examples of how it's done in Linux, Windows, etc. Note that each connection is uniquely defined by five network parameters: the network protocol (typically TCP or UDP); the client's IP address; the client's port number*; the server's IP address; the server's port number. So a single port can serve many clients, even multiple clients from the same host because they would use different client port numbers.

The reason I am suggesting that path is that it is more than enough to understand the process, after that, one can look at how it is done in Logix: the jargon may be a little different, it is using instructions instead of C routine calls, but the basic steps will be the same, and understanding the process will make it easier to get working. The other reason is that I have done it many times from the C side of things, but not yet from the PLC side, although I have looked at the Logix instructions and groked how they work.

* The client's port number is typically assigned at random by specifying 0 (-1?) as the port number in the call to connect(...).
 
Check Rockwell knowledge base, it should be a technote on how to use Sockets with printers.
In this manual I don’t see a port number that printer is listening on, so I would try default from the tech note first.

Already I have searched in the knowledge base but without sucess. đź“š

The port number is 9100.
 
Last edited:
I am here again:D

I have searched in google for info and I found that technote AID 33240 can i use.

According with this, it has 2 sample programs.
EWEB_PRINT_SINGLE
EWEB_PRINT_LARGE

I have search for this technote in Rockwell page, but the access is for TechNote Contract that I do not have. :oops:

Could somebody get this info and share to me? (docs and sample programs)

Thanks a lot.
 
Last edited:
I don't have TechConnect or a ControlLogix PLC to test, but I did find this:

https://literature.rockwellautomation.com/idc/groups/literature/documents/at/enet-at002_-en-p.pdf

Zebra printers have been mentioned many times in this forum, and do something similar to what you are trying to do with the Domino. See e.g. here or here; apparently forum member @widelto has an AOI for the Zebra that I suspect could be adapted to the Domino.

Those may be useful, but until you understand how socket communication works, they may not help much.

Often a large number of small, easy steps brings us to the goal faster than a few giant, difficult leaps; along those lines, I suggest the following yak-shaving tasks:

  1. Install WSL - Windows Subsystem for Linux - on your Windows 10 machine (cf. here)
  2. Install Anaconda 3 (Python environment) in WSL (cf. here)
  3. Learn how to run simple python scripts in WSL (e.g. here)
  4. Find a Python client-server example e.g. on Github, or look at and run the attached scripts.
  5. Adapt c.py to print something, e.g. "<<<@asteroide>>>," on the Domino by sending only "@asteroid" to Domino port 9100 using command 41. N.B. the Domino may not send any return data, in which case the sock.recv(...) line of code in c.py is not needed.
Those are all small steps, but if you use them to eventually understand the code in s.py and especially c.py, then you should be able to transfer that knowledge to socket programming in ControlLogix. Socket programming is no different conceptually than a dialogue between two people: once the protocol (language) is agreed upon, the rest is easy. The Domino has a protocol involving command 41; once you get the ControlLogix to abide by that protocol, the Domino will do what you want it to do.

P.S. In an earlier post, I forget the .listen(...) routine on the server side.


xxx.png
 
https://github.com/drbitboy/Domino_test


- Simple printer server emulation and command-line Python client.
- OP will want to translate the half a dozen or so steps in dominoclient.py to the ControlLogix
- The client could be used to send data to the printer to to confirm the printer works as expected from the protocol document.
- The server could be used to diagnose what the eventual ControlLogix program sends to the printer, by sending data to the hostname of the PC running dominoclient.py instead of to the hostname of the printer.
 

Similar Topics

I'm trying to integrate a Beckhoff IPC with a Controllogix PLC. There is some documentation, on the Beckhoff website, on how to do a PLC-PLC comms...
Replies
0
Views
61
Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
87
Hello, I have two 16 point input cards and 1 16 point output card showing module faulted on my IO tree in Logix Designer. The fault code is...
Replies
7
Views
217
Hello, My associate and I are trying to sync up two ControlLogix racks (7-slot chassis) with identical modules. We are able to see the secondary...
Replies
4
Views
199
Trying to setup a message read via Ethernet. I have the path setup as 1, 1, 2, 192.168.66.10 I get an error code 1, ext err 315. I am beating...
Replies
9
Views
237
Back
Top Bottom