Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I would like to have separate PLCIO applications listen for messages from separate Allen-Bradley PLCs. How can I do that on the same server?

0
Posted

I would like to have separate PLCIO applications listen for messages from separate Allen-Bradley PLCs. How can I do that on the same server?

0

Only one process can listen on the same TCP/IP port per server. Given that, there are two ways to work around this restriction: First, you can write a separate PLCIO application that listens for all incoming PLC messages. Based on the message contents or source IP Address, you can then forward the message to the correct process using conventional means (socket or pipe communication). Unfortunately, your original two processes are no longer communicating via PLCIO and extra work is required to send a reply back to the PLC. The other approach is to enable IP Address aliasing on your server. If you configure the server’s network interface to have multiple IP Addresses, then each process can listen on the same TCP/IP port but also on a different IP Address. It is then up to the PLC to send the message to the correct IP Address destination. To listen on a single IP Address in PLCIO, set the j_plcio_ipaddr global variable prior to your plc_open() call.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123