Does Ignition support Communication over TCP/IP with Ignition being the host?

I need to establish bi directional communication between a PC and Ignition over a network. Looking at the DOCs I see a tcpip connection device that is the client. Is there any capability to have Ignition act as the TCPIP host?

Tell us more about what you want to get from the Ignition gateway.

What software/communications protocols are being used by the other PC? Is it raw TCP/IP data? Since the other PC is the client, will it be initiating the connection to Ignition?

Yes, raw TCPIP data.
Yes initiating the connection.

I want to monitor ascii data received from a tester, Evaluate the data, create a response and send the response.
Or Create a string, send the string to the tester and then wait for the response.

The native TCP driver in Ignition can act as a server, but does not work well with binary data, nor will more than a message per second or so.

If you are willing maintain some jython, and take special care with thread lifetimes, a long-lived thread can establish a listening socket and perform complex, high-speed handling of whatever traffic you like.

2 Likes

Thanks for the quick response.

No, it's client only. It initiates the connection and then just receives data.

There is a third party TCP driver that acts as a server floating around somewhere, originally done by @chi years ago.

Huh. T-I-L. (I obviously never use it. :man_shrugging: )

1 Like

I've not used one of these specifically, but RTA has some good products.

Coming Soon! Automation Professionals TCP Server Driver!
(For those unaware, I'm joking....unless @pturmel wants to really do this)

I think the real reason Phil won't do it is that the tag/driver system isn't a great model for a stateful, long-lived raw socket. It really needs a strong protocol established over top. Arbitrary socket work basically demands actual scripting.

Though, maybe event streams could be used to paper over some of the complexities of lifecycle and allow you to focus on the event handling.

2 Likes

Is this the big reason the TCP/UDP driver doesn't support listening connections on TCP? (Yet supposedly supports a listening connection on UDP).

No, but I have helped clients create this sort of thing with long-lived jython threads. It isn't easily generalized to make a module practical.

1 Like

UDP is a connection-less protocol. Both sides are fundamentally senders, receivers, or both.

I've been requested by a customer to do something exactly like this as well.

They want Ignition to be the TCP "Listening Server" on a particular IP/port.

I'm not sure how reliable handling this in long running gateway scripts would be.

Some challenges:

  1. How to handle multiple messages coming in quickly
    We don't want the OPC-UA tag to just get overwritten so fast that there's no time to have an event driven script react to the incoming message.
    They need to be queued and processed 1 at a time.

  2. Need to handshake and send ACKs/writebacks back to the "Client/talker".

I discovered this custom driver by @chi-Ignition after seeing some post about it on the forums.

I've come to discover how it works this week and reading the provided documentation.

It seems to be successfully working, and meets my challenges above, but not sure about reliability yet.

Also unsure about long term support of this driver.

I really wish Ignition had a built in TCP Listening Server driver.