How to configure 4-20mA analog input on a PLC

configure a 4-20mA analog input on a PLC:

The PLC (Programmable Logic Controller) is used for the control of industrial machines and process installations. The PLC was designed specially for this purpose and offers the possibility of a flexible configuration by means of hard- and software. The PLC can be adapted to the machine or process which needs to be controlled. Analog signals such as pressure and temperature from the process are evaluated by the PLC and based on these signals the process is controlled by the PLC.

Analog signals need to be connected to the PLC and configured. Because of the modular design and configuration of the PLC many things can go wrong. This article gives some guidelines.

connect the sensor to the PLC:

Most analog inputs on PLC systems support voltage, current and resistance. In order to accomplish the connection the first thing is to determine how the 4-20 mA sensors shall be connected to the PLC. On some PLC’s locating the correct terminal is enough, sometimes jumpers need to be configured, and on some PLC’s the input shall be configured by software. On some PLC’s a resistor must be connected in order to transform a voltage input to a 4-20 mA current input. Check the documentation of the PLC before the sensor is connected to the analog input on the PLC. Some example configurations are shown on our 4-20 mA connection page.

How the analog value is represented in the PLC:

Inside the PLC the A/D converter transforms the analog signal to a digital value. The digital value represents the analog signal. In case of a 10 bit A/D converter the digital value will be between 0 and 1024. Some A/D converters can generate negative values. The minimum signal is 4 mA with a 4-20 mA signal. When the signal is lower then 4 mA the digital value is negative, or is 4 mA a positive value? Read the PLC manual in order to determinee how the A/D converter handles the negative value. Does the PLC handle this or do you need a correction in software. Also check on which address the value is available to the PLC program.

In case you are not sure about the configuration it may be wise to build a test setup to check the configuration. With a current loop tester you can easily simulate the current on the analog input which makes it easy to test and validate the configuration of the PLC.

Make sure the value is scaled properly:

The digital value in the PLC need to be scaled to a value meaningful and readable by humans. A pressure of 0-16 bar is represented inside the PLC by a value between 0 and 1024, on the display a value between 0 and 16 bar is needed. This needs some calculation. Some PLC’s come with standard software functions for this purpose. When these are not available, the user has to write these software routines.

These software routines can be tested by means of the test set-up from step 2.

The scaling can be checked with this online 4-20 mA scaling calculator

Check alarms!Alarm:

Usually analog inputs are guarded by alarms. Both process alarms as well as hardware alarms. What happens on a wire break on a 4-20mA input? Is this recognized as a wire-break alarm or as a process alarm, low temperature, low pressure? When is the wire-break alarm activated? Is the alarm activated immediately or after a pre-defined time minimizing false alarms? Does the sensor comply with the Namur NE43 recommendation? In this case a sensor fault can be represented by a current higher then 21 mA. Is your software capable to handle all these situations? In case the 4-20 mA input is compatible to the Namur NE43 recommendation the alarms can be tested with a current loop tester with extended current range.

Test configuration before commissioning:

Test iconWhen things go wrong in it can take a lot of time and money to resolve configuration issues on 4-20 mA analog inputs. Especially when these issues appear during commissioning on site. In order to test the analog inputs DIVIZE has a complete range of current loop test units. Every step of a 4-20 mA configuration can be tested and validated with the help of a DIVIZE 4-20 mA simulator. Problems with the analog input configuration and signal can be identified and resolved in an early stage. Unnecessary delays in commissioning can be eliminated.

Also Read:  Top 100 Questions & Answers Instrumentation Engineering Vol-2

Leave a Reply