1. Home
  2. Knowledge Base
  3. Communication Protocols
  4. How to Communicate from a ControlByWeb Device to a PLC

How to Communicate from a ControlByWeb Device to a PLC

ControlByWeb devices are industrial edge controllers capable of either stand-alone operation or working as part of a large control system. The term edge controller refers to the Industrial Internet of Things (IIoT) where a programmable controller can collect data or control processes while still reporting back to a central SCADA or cloud. An edge controller features both programmable logic and web/network connectivity.

Connecting a ControlByWeb edge device to a PLC is a simple task in most cases. Here are three common methods that work well in different scenarios:

  • Modbus: setting up the ControlByWeb device as a Modbus TCP/IP slave
  • Remote I/O: using ControlByWeb Peer-to-Peer communication to connect remote I/O
  • HTTP Requests: sending commands and parsing XML or JSON files
Computer Circuit Board Concept Image

Most of the time, and especially for those initiated with Modbus, the first method is ideal. However, when you need to connect remote I/O, the second method works very well. Finally, for some newer PLCs or for software developers, HTTP requests are another method that might prove best.

Keep in mind that there are more possibilities. If you don’t find something that will work for you, contact us to discuss how we can meet your specific needs.

Method 1: Modbus TCP/IP

Modbus is a messaging structure protocol used in industrial manufacturing control and automation. It is an open protocol and offers interoperability with software and devices from other manufacturers.

To use a ControlByWeb device as a Modbus TCP/IP slave, you need to enable Modbus in the General Settings > Advanced Network menu. There you can define a port, set the Endianness, and view a table with the Modbus addresses.

You can now send Modbus commands via the PLC and the ControlByWeb device will return the associated data.

For information regarding how to speak to our devices using Modbus, refer to our user manuals. To learn more about Modbus in general, check out www.modbus.org.

Method 2: Remote I/O

Remote I/O Example Diagram

If you want to monitor or control remote assets or processes that are physically located away from the PLC, the Remote I/O method is a good option. This method simply wires inputs and outputs from one of our devices directly to the I/O on the PLC. You would then use Peer-to-Peer communication with another remote ControlByWeb device to monitor and/or control assets or processes near or far.

Our devices communicate over IP networks, such as a LAN or the Internet, so you can monitor contacts or control distant relays easily. You can do this across an industrial complex or in another part of the world.

Method 3: HTTP Commands

Modern PLCs are quickly gaining the ability to make HTTP requests to web servers to send and pull data. If you have a PLC capable of making HTTP requests, you can send one-way relay commands to a ControlByWeb device across the network. This gives your PLC remote relay control for virtually anything you need.

You can also push and pull data such as register values or sensor readings. Keep in mind that if you’re pulling data with HTTP requests, our devices will return a JSON or XML file, depending on which device you use. Consequently, your PLC and your programmer must be able to parse a JSON or XML file. For well-rounded software developers, this will be a familiar task. For ladder logic programmers, this will likely be new territory.

A Few Use Cases Worth Mentioning

Not all PLCs are created equal. Some are installed in critical applications that require redundancy. Others could use a feature boost by adding a ControlByWeb controller. In both scenarios, our modules have proven helpful and popular.


Perhaps one of the most common uses for ControlByWeb edge controllers is as a redundant device. For backup functions, a module such as our X-410, with 4 digital inputs and 4 relays, would monitor communication from the PLC. The device would act as a Modbus slave as long as the PLC is active. When communication stops, the X-410 can be programmed to take over.

You can program our devices to only take over when certain conditions are met, such as if the PLC has not communicated in over 5 mins, or after a certain number of “pings” with no response.

Email Alerts

Older PLCs often lack modern capability like remote communication. These PLCs represent a challenge for many control engineers because they are expensive to replace. A great option to extend their service life is to add a ControlByWeb edge controller for email alerts.

Email alerts are popular because they are easy to program and are an effective way to communicate important status updates to personnel.

Flexibility is King

Our edge programmable controllers are designed around flexibility. This puts you squarely in control of how you interface with our devices and delivers more capability to handle increasingly complex automation scenarios.

Our cellular, ethernet, and Wi-Fi networking capabilities extend the reach of our devices to provide more industrial solutions in more places.

Adding ControlByWeb devices to your monitoring and control network offers unique advantages. They are ideal for redundant control, data acquisition, edge programmability, remote access, email alerts, data logging and even simple I/O expansion without adding prohibitive costs.

If you follow these directions and still have questions, contact us.

Was this article helpful?

Related Articles

Shopping Cart