UDP driver setup

I’m trying to set up a UDP listener on port 29298 to watch for messages from AutomationDirect DoMore PLCs. You can set up the PLCs to send a broadcast UDP message with whatever payload you want. It can be useful for debugging programs, etc.

They have a logger called DMLogger that listens for packets from any PLC in the broadcast domain. I’m trying to replicate the functionality in Ignition. Their program runs on windows and my server is running on linux. I may try to stuff these messages into a database table for later review.

I thought I’d start by trying to set up a UDP driver to listen for messages. It’s possible that I’ll need to switch to a script based solution for higher performance (I have multiple PLCs on this network, and any one of them could send messages at any time. It’s also possible that some might send messages rapidly.)

My driver is setup with the IP address of the ignition server, and the port set to 29298. The message delimiter type is set to PacketBased. I was assuming that this was all that was needed, however, I’m not getting any messages. I did verify that I am getting UDP packets at the server. Here’s an example:

Any ideas on what to try next? I’m wondering if the broadcast address is giving me problems. Is the driver able to read broadcast messages?

Thanks,
Brian

The driver isn’t listening for broadcast, it’s expecting a direct unicast message.

You can maybe try using 0.0.0.0 as the host address instead and see if you receive the broadcast messages that way.

If the messages come extra fast, even a java socket with dedicated listening thread could miss packets that come in during java garbage collection. With a linux server, consider crafting a python3 service managed by systemd. If nothing else, it could buffer and encapsulate into a localhost TCPconnection from Ignition that wouldn’t be vulnerable to GC skips.

Using 0.0.0.0 works to receive the broadcast messages! Thanks for the tip!

I’m not really sure how fast the messages would come, it’s a capability of the PLCs that we are running that I haven’t really used much yet. Right now, I’d have to have my laptop connected to the machine network to listen for the messages. It’s typically connected to the office network. So, I’d have to be proactively looking for something at the time. With Ignition already sitting on the machine network, if I can get it to scoop up and record any and all messages, I’ll probably use this function of the PLCs a lot more often.

I have a few ideas in mind, but I only started thinking about it a couple days ago. Some might generate packets quickly, but quickly can be a relative thing. I guess I’m just looking to implement something that’s relatively solid, because as soon as I go the easy route that has a chance at missing a message (during GC or whatever), I’ll always have a doubt in my mind when looking through the logs of, well what if it missed it. I tend to have that kind of luck :confused:

I’m wondering if the easiest thing to do would be to have a python3 service listen for these packets and then stuff them directly into the database. I can use Ignition to search the logs, parse the info, etc. I’m guessing it would be relatively easy to get that running. Looks like I have some googling to do. I don’t have any experience with python directly, yet. :slight_smile: