The leader in industrial automation and control solutions

How to Read Analog Input Voltage (0-5V)

Watch on YouTube

This tutorial shows you how to read an Analog Input Voltage (0-5V), display the raw reading, and convert the signal to more meaningful values using an HMI+PLC combo and displaying on the user-interface.

Software Required

Hardware Required

  • HMC4070A-M – Other HMC2000/HMC4000 models can also be used
  • HMC3-M1212P0200 V2 – Other HMC3 I/O modules with Analog Inputs can also be used
  • 24 VDC Power Supply (4010-0011)
  • A 100 PSI Pressure Transducer Sender Sensor is used in the example, but any 0-5V sensor can be used.

Wiring and Circuit Design

Analog Input 0-5V (3) Wire Voltage Output

Red Wire: 24V Power from Power Supply

Black Wire: Output Signal to PLC/Controller

Blue Wire: 0V on Sensor to Negative Power Supply

2nd Blue Wire: Ground to Negative Power Supply

Analog Input 0-5V (2) Wire Voltage Output

Red Wire: 24V Power from Power Supply

Black Wire: Output Signal to PLC/Controller

Blue Wire: 0V on Sensor to Negative Power Supply

An HMC3-M1212P0200 V2 I/O Module is used in the wiring diagrams above.

The illustrations also apply to any HMC3 I/O Module with Analog Input capabilities.

Software Code

Ladder Diagram

Analog Input 0-5V Logic Block 0-5v scaled logic

Structured Text

Another type of IEC Language you can use:

User Interface

Analog Input 0-5V – Raw and Scaled Data

Sample Project

The project shown above was designed for the specific hardware mentioned at the beginning of the tutorial and is intended to provide you guidance when programming your unit. If you are using models other than the ones specified in this sample project, similar steps can be duplicated within your own project.

Download MAPware Sample Project

Resources & Documentation

HMC/MAPware-7000 Resources

More

See our Support Center for a complete list of Quick Start and Installation Guides

Additional Resources

The following table shows the cross reference values for the Raw Register Value in MAPware and what current or voltage it corresponds to depending on the analog input type configured for the channel. This may be different from module to module so please refer to the HMC3 I/O module guide and find your specific module part number to see those corresponding values.

Expansion Module Register Value0 to 20mA4 to 20mA0 to 10V0 to 5V
00mA4mA0V0V
163845mA8mA2.5V1.25V
3276810mA12mA5V2.5V
4915215mA16mA7.5V3.75V
6553520mA20mA10V5V
Diane Callahan Avatar