Industry 4.0 Protocols

4-20 mA Current Loop

The standard

The 4-20 mA current loop is one of the most robust sensor signaling standard. Current loops are ideal for data transmission because of their inherent insensitivity to electrical noise. In a 4-20 mA current loop, all the signaling current flows through all components; the same current flows even if the wire terminations are less than perfect. All the components in the loop drop voltage due to the signaling current flowing through them. The signaling current is not affected by these voltage drops as long as the power supply voltage is greater than the sum of the voltage drops around the loop at the maximum signaling current of 20 mA.

Transmitting sensor information via a current loop is particularly useful when the information has to be sent to a remote location over long distances (500 meters, or more). The loop's operation is straightforward: a sensor's output voltage is first converted to a proportional current, with 4 mA normally representing the sensor's zero-level output, and 20 mA representing the sensor's full scale output. Then, a receiver at the remote end converts the 4-20 mA current back into a voltage which in turn can be further processed by a computer or display module.

This list includes some of the most common uses of the standard:

  • Sensors and instruments

  • Remote transducers

  • Monitoring processes

  • Data transmission in industrial ambients

Power supply

The loop power-supply generally provides all operating power to the transmitter and receiver, and any other loop components that require a well-regulated DC voltage. In loop-powered applications, the power supply's internal elements also furnish a path for closing the series loop. +24 V is still the most widely used power supply voltage in 4-20 mA process monitoring applications. This is due to the fact that +24 V is also used to power many other instruments and electromechanical components commonly found in industrial environments. Lower supply voltages, such as +12 V, are also popular since they are used in computer based systems.

Transmitters categories

Depending on the source of current for the loop, devices may be classified as active (supplying power) or passive (relying on loop power). The Plug&Sense! Industry 4.0 device can work with two different types of current loops.

Type 2 loop current

Type 2 transmitters are energized by the current loop, where the supply voltage is included in the receptor. The transmitter is floating and the ground is in the receptor.

Type 3 loop current

Type 3 transmitters have 3 wires powered by the source voltage in them. In this case the transmitter is the power source for the current loop. The transmitter common is connected to the common of the receptor.

RS-485

The standard

RS-485 is the most versatile communication standard. The RS-485 standard defines the electrical characteristics of drivers and receivers for use in digital systems. The standard is published by the Telecommunications Industry Association/Electronic Industries Alliance (TIA/EIA). RS-485 signals are used in a wide range of computer and automation systems and are used in programmable logic controllers and on factory floors. Since it is differential, it resists electromagnetic interference from motors and welding equipment. It may be used to control video surveillance systems or to interconnect security control panels and devices such as access control card readers. It does not specify or recommend any communications protocol. In the next table the electrical characteristics of the standard are defined.

This list includes some of the most common uses of the standard:

  • Industrial equipment

  • Machine to Machine (M2M) communications

  • Industrial Control Systems, including the most common versions of Modbus and Profibus

  • Programmable logic controllers

  • RS-485 is also used in building automation

  • Interconnect security control panels and devices

Functional features

The differential transmission is the base of the functioning. The same information is sent trough the 2 wires, but with a phase difference of 180 degrees. Any interference introduced in the signal will affect equally both wires. By reversing the signals interferences are eliminated each other. Another noise immunity is the use of twisted pairs. Twisted pairs in RS-485 communication however adds immunity which is a much better way to fight noise. The resulting noise current is many factors lower than with an ordinary straight cable.

Connectivity

Network topology is probably the reason why RS-485 is now the favorite interface in data acquisition and control applications. RS-485 is the only one of the interfaces capable of Internet working multiple transmitters and receivers in the same network. It is possible to connect 32 devices to the network. Currently available high-resistance RS-485 inputs allow this number to be expanded to 256. With the introduction of "automatic" repeaters and high-impedance drivers/receivers this "limitation" can be extended to hundreds (or even thousands) of nodes on a network. In RS-485, the communication is half duplex. It means bidirectional but not simultaneously communication. Only one device may be transmitting at any given time and all other are receiving.

RS-232

The standard

RS-232 is a standard for serial communicatino transmission of data. It defines singnals connecting between a data terminal and a data communication equipment. The standard defines the electrical characteristics and timing of signals, the meaning of signals and the physical size.

The Electronic Industries Association (EIA) standard RS-232-C defines:

  • Electrical signal characteristics such as voltage levels, signailing rate, timing, and slew-rate of signals, voltage withstand level, short circuit behavior, and maximum load capacitance

  • Interface mechanical characteristics, pluggable connectors and pin identification

  • Functions of each circuit in the interface connector

  • Standard subsets of interface circuits for selected telecom applications

The standard does not define such elements as the character encoding (i.e. ASXCII, EBCDIC, or others), the framing of characters (start or stop bits, etc.), transmission order of bits, or error detection protocols. The character format and transmission bit rate are set by the serial port hardware, typically a UART, which may also contain circuits to convert the internal logic levels to RS-232 compatible signal levels. The standard does not define bit rates for transmission, except that it says it is intended forbit rates lower than 20,000 bits per second.

Functional features

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are either in the range of +3 to +15 volts or the range −3 to −15 volts with respect to the "Common Ground" (GND) pin; consequently, the range between −3 to +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD, and their secondary channel equivalents), logic one is represented as a negative voltage and the signal condition is called "mark". Logic zero is signaled with a positive voltage and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the de-asserted or inactive state is negative voltage.

SDI-12

The standard

SDI-12 (Serial Digital Interface at 1200 baud) is an asynchronous serial communications protocol for intelligent sensors that monitor environment data. These instruments are typically low-power (12 volts), are used at remote locations, and usually communicate with a data logger or other data acquisition device. The protocol follows a client-server configuration whereby a data logger (SDI-12 recorder) requests data from the intelligent sensors (SDI-12 sensors), each identified with a unique address.

Functional features

Communication occurs over a single data line in half-duplex. The digital addressing system allows an SDI-Recorder to communicate with up to 62 individual sensors. Only the pre-configured sensor matching that address will respond (handshake). Other sensors on the same line will not respond until called and typically stay in "sleep mode" (low power mode), until called.

Electrically the protocol is a 3-wire digital connection: data, ground and 12 V. The data signal, using 5 V logic levels, is similar to RS-232 with the same asynchronous byte encoding. The inline data is human readable as the data is transmitted in ASCII.

All SDI-12 communications are transmitted in ASCII at 1200 baud with 7 data bits and an even parity bit. The standard also specifies a communications protocol that allows sensors to remain in a low-power sleep state until awoken by a serial break signal sent by the master. The first character of each command is a unique sensor address that specifies with which sensor the recorder wants to communicate. Other sensors on the SDI-12 bus ignore the command and return to low-power standby mode. The protocol also specifies a retry mechanism to overcome any data corruption. CRCs were introduced to the SDI-12 protocol with release of version 1.3.

The standard provides guidelines on transient protection and does not require the use of a specific connector.

The specification document describes a number of advantages including:

  • Interchangeability of sensors without reprogramming of data acquisition devices

  • Power is supplied to sensors through the interface

  • Ability to implement self-calibration algorithms within the sensor itself and use low-cost EEPROMs for information storage

  • Applicability of training in SDI-12 to a variety of sensors and data recorders

The SDI-12 specification is in the public domain.

SDI-12 sensor commands

The most typical commands supported by the sensors in the Libelium catalogue are:

  • ?! : Address query command

  • aI!/?I! : Send identification command

  • aM! : Start measurument

  • aAb! : Change address

  • aD0! : Send data

  • aM1!..aM9! : Request additional measurements

Where 'a' is the address of the semsor. 'b' in change address command is the new address to assign to the sensor.

Response to the indentification command is as follows, allccccccccmmmmmmvvvxxx...xxx where:

  • 'a' : Address of the sensor

  • 'll': SDI-12 compatibility number

  • 'cccccccc': Vendor name

  • 'mmmmmm': Sensor model number

  • 'vvv': Sensor version

  • 'xxx...xxx': Serial number

Data read from the sensor has also an specific format: a+<value1>+<value2>...<CR><LF>

Where 'a' is the address of the sensor read.

Modbus

The protocol

Modbus is a data communication protocol originally published by Modicon in 1979 for use with its PLCs. Modbus has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices.

The Modbus protocol can be implemented over RS-485 and RS-232 physical layers.

Both RS-232 and RS-485 sockets can implement Modbus since it is simply a software layer built on top the physical layer.

Modbus supports communication to and from multiple devices connected to the same cable. For example, there can be a device that measures temperature and another device to measure humidity connected to the same cable, both communicating measurements to the same computer.

Protocol version

There are many variants of Modbus protocols: Modbus RTU, Modbus ASCII, Modbus over TCP/IP, Modbus over UDP, Modbus Plus, etc.

The Plug & Sense! Industry 4.0 device implements the Modbus RTU (Remote Terminal Unit) protocol over RS-485 and RS-232.

It is based on a master/slave architecture:

  • There is only one master in the network

  • One or more slaves can be connected to the network at the same time

  • Only the master can initiate communication

  • The master can only initiate one transaction simultaneoously

  • The slaves can only respond requests from the master

Modbus RTU frame format

Modbus function codes

Modbus bases its data model on a series of tables that have distinguishing characteristics. The 4 primary tables are:

The various data access operations (reading, writing and other operations) are categorized in different functions. Plug & Sense! Industry 4.0 implements the following Modbus functions:

Last updated