Today is...
Wednesday, June 20, 2018
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
Featured Video
A demonstration of EtherCAT control of linear motors using the CTC EtherCAT master.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
ControlLogix TCP/IP Socket Communications Issue
I'm having trouble making Socket communications work between a ControlLogix PLC and a Win 7 PC for job change control.

Over the years I've written many interfaces between ControlLogix PLC's and TCP/IP devices like printers and lasers to manage jobs on packaging lines, but this latest task is driving me to drink (more).

Setup: My test rig is a 1756-L61 and an 1756-EN3TR. The device I am trying to communicate with is a Marksman Matrix industrial PC assembled by a company called Foxjet. The PC drives an ink jet printer for putting codes on corrugate boxes. The PC runs Windows 7 embedded.

I'm trying to send a job change request to the PC. The job change is formatted as follows: {Database start task, LINE0001, 123456}

"123456" is the name of the job I want to start, the brackets are mandatory.

The PC accepts socket connections on port 2202. I can set up a telnet session from my computer and send commands to the PC all day long but when I try to send the command via the PLC / EN3TR, there is a whole lot of silence on the PC. As an aside, there is a Data Port viewing window on the PC provided by the printer vendor - it shows the data coming into the PC from outside; this is how I know things aren't working right. My PLC code is pretty standard and more or less the same code I have used for years. I delete all existing sockets, open a new socket, open the printer connection, concatenate my job change string and write the string to the printer. Everything seems to work fine up to the write. If I disconnect the printer and try to run the code, the socket open fails. If I open the socket, then disconnect the printer, the open connection fails. I've never seen the write data echoed on the PC screen.

In previous jobs, I've been used to sending start of message / end of message control characters but this machine doesn't seem to require them.

It also doesn't seem to echo until it receives a <CR> from the terminal. Without prejudicing my case, I'm wondering if that is the issue and if so, how would I go about sending one as part of a socket message - I haven't seen anything in the Rockwell documentation that seems to help me.

I know this doesn't directly help your situation, but of all the printers and PC based software to control them that we've had in the plant over the years, Foxjet is far and away the buggiest and most unstable platform we've ever seen. You could do the same 5 troubleshooting steps twice in a row and get 3 different outcomes. There was just no rhyme or reason to it. Granted we pulled them out 10 years, so they weren't the current version, but just be aware that normal thinking doesn't always apply there.