Implement Messaging Devices in a PLC Environment

PLCenviromentThe last article Messaging Devices Don’t get No Respect, discussed messaging devices, and why vendors of those devices have difficulty integrating them with traditional PLC control systems. Devices like RFID readers, markers, production inspection systems and other devices are not I/O devices. These devices are command driven. Some series of commands implement the sometimes very complex functionality of the device. There are often commands to initiate operations, to abort operations, to report status, to configure parameters, to add/change/remove jobs, to download parameters, and to implement all sorts of other operations.

Programmable Controllers work best with devices that have inputs and outputs. PLCs send outputs to valves, the outputs drive the valve actuator, and get inputs from the valve with the actual status of the valves. Everything’s cyclic, neat, and organized.

Messaging devices aren’t like that. Asynchronous commands just do not fit well into that kind of traditional PLC system. The design of a messaging device PLC interface needs a lot more care and thought than a traditional I/O device. How difficult that is going to be depends on the complexity of the command interface.

Non-complex messaging devices

A simple scale, for example, might just have a command to start a scale conversion and another command to report status and results. That can easily be turned into a cyclic operation that a PLC can easily transfer. Instead of the initiation command, a bit in the cyclic output can be used to initiate the weighing operation, and a status bit and a set of values in the cyclic input can indicate status and weight values. One bit can indicate in progress and another completion. Non-complex messaging devices like this simple scale are not difficult, though care needs to be exercised with the handshaking for the interface.

Other messaging type devices with a much richer set of functionality, controlled by a very complex command interface, are much more difficult to integrate. These devices can have operational configuration, job or task configuration, job status, and commands that generate different kinds of results. The configuration data required by some devices, like markers, can be virtually unlimited. For example, a 3D mark can be a megabyte of marking data. Integration of complicated devices like these is possible but it requires a combination of technologies and strategies to make it operationally and cost effective.

Complex messaging devices

Complex devices like markers usually have some sort of PC control program that end users use to setup jobs, design barcodes or marks, setup placement, and define the values that get placed when the actual mark is made. These tools are proprietary to the vendor and a proprietary Ethernet protocol is entirely proper for this kind of operation. General setup tasks like this are not the domain of the PLC, so this kind of tool would not be replaced by a PLC or even an industrial HMI.

Job selection, job configuration, and execution, however, are the domain of the PLC. If the data required is data generated or maintained by the PLC, and is a small enough quantity to be handled by the PLC memory, cyclic operations (Write Outputs/Get Inputs) can be designed to drive job configuration and execution.

Sometimes job data is driven from an IT system, or sometimes it is just too voluminous to be practical for the limited memory configuration of a PLC. In that case, it sometimes makes sense to have the messaging device receive data directly from the IT system using XML, JSON, OPC UA, HTTP or some other IT protocol. It is seldom practical to deliver this type of data using the PLC as an intermediate data storage device.

When the device command set is complicated, it is sometimes practical to use a combination of commands over the PLC’s asynchronous command interface and cyclic input/output over the synchronous command interface. PLC programmers notoriously don’t like using asynchronous commands, but sometimes don’t have a choice when driving these types of complicated messaging devices.

There are many factors to consider, many tradeoffs and many different technologies that can be applied to the implementation of complicated messaging devices in a PLC environment. Our company is uniquely qualified to provide you with the right information and assist you in developing a strategy. Contact one of Real Time Automation’s message device integration project managers for more information on how to get started or call 1-800-249-1612.

Attn: Our office is closed November 28-29 in observance of Thanksgiving. Orders placed after 2 pm CST 11/27/24 will be processed 12/2/24.