Connecting a Scale Over TCP

Hey all,

I’m working on connecting a scale to a client’s network with the Ignition TCP Driver. The scale was configured using HyperTerminal by another integrator on a TCP/IP Socket. To my understanding, all I need to do is add the name, IP address, port, etc in a New TCP Device.

Once created, the device shows 1/1 Connected but in the Logs, every second there is a new entry saying that the device has been disconnected. It says it is constantly connected but at the same time is constantly disconnecting. I can ping the device, no problem. I’m wondering if there’s something I missed in the setup or if it’s an issue on the network side and has nothing to do with Ignition.

Any experience or advice you may have would be great! Thanks!

That suggests that the type of connection isn’t what you think. Like, maybe there’s a handshake requirement you must implement. Brand & model? Link to comms doc?

Hi Phil,

Thank you for the response and I apologize for the delay. I was able to get the connection down and it’s no longer faulty the way it was previously.

The next issue is communicating with the device. It’s over a TCP/IP socket, which to my understanding is just an IP and a port set up as a TCP device. The device needs to receive “R1” followed by a carriage return and line feed. I’m not sure how to send that in the ‘writable’ tag in my tag browser. I can’t seem to find info in the docs for this but I would imagine it’s not terribly hard to do.

Thanks in advance!

EDIT: I think what I’m looking for is the carriage return and line feed ‘delimiter’ to go in the ‘Writeback Message Delimiter’ section in the device properties.

EDIT 2: Answered my own question via a Java Stack Overflow question. The solution was \r\n as the Writeback Message Delimiter.

Possible Clue: ( add the h to the URL below so as Not to see just the first post here ) ( Colon would emoji)
ttps://forum.inductiveautomation.com/t/special-characters/16375/10
Post #10 Sanderd17
This one may also help ( more )- Jython is common for Ignition yet based upon Python (docs below)
ttps://docs.python.org/2/howto/unicode.html#unicode-literals-in-python-source-code

Also: ( add h before URL )
ttps://www.eecis.udel.edu/~amer/CISC651/ASCII-Conversion-Chart.pdf
Decimal numbers 13 and 10 ( see other eg. Hex ) are CR and LF in ASCII, delimiters a different story.
Best regards

Thanks everyone for responding to this a few weeks ago. Everything is communicating (Ignition <—> Scale over TCP) which is great.

The scale only allows one connection at a time, and it seems there’s something other than Ignition that’s trying (and successfully) connecting to it because the log just fills with “Connection Lost” errors when the TCP device is enabled. Everything works fine, the message and writeback have no issues, there are just comm errors that don’t seem to actually disrupt anything. Is it possible for me to mute or suppress a certain error? It logs one every second that the device is enabled.