PLC Analog Input Wiring and PLC Programming

Generally PLC accepts two types of input , first one is digital and secondly analog. As we all know that digital input is one which is either 0 or 1. If it is 1 it means input is present and if it is 0 then its not present OR in simple words we can say that it is either ON or OFF. Examples of Digital Input to PLC are Push Buttons, Limit Switch, Trip signal or feedback signal etc.

But the Question is what is Analog Input ?

Analog input are those whose real time value keep on changing accordingly i.e if we talk for PLC then widely two types of analog input are accepted by PLC . First one is Voltage analog input and second one is Current analog input. Voltage Analog input is 0-10 V and Current input is 4-20 mA . All the devices whose output is in above two forms can be connected to PLC. Pressure, temperature, flow etc are a few things which can be measured and accordingly give output in current or voltage and can be read on PLC.

How to Connect Analog Input to PLC?

To connect Analog input first connect analog input card to PLC and then select whether its current input or voltage, i.e you have to define in the setup of analog input card that whether you are connecting voltage or current input. Some PLC card also have a dip-switch and through dip-switch also you can define type of input.
There will be two wires one "+" and one "-" , simply connect the "+" with "+" and "-" with "-".

Recommended Article: PLC Programming for Counting Encoder Pulses

PLC Programming for Analog Input:-

First of all PLC samples the data i.e it converts the analog value to digital at a continuous sampling rate . Sampling rate differs from PLC to PLC. So from programming point of view we have to write a program to scale the value. PLC converts the received value at a fixed sampling rate to pre-defined range and after that we can convert it according to our use.

For example:- A 4 to 20 mA signal will be sampled by PLC in to 1 to 6000 accordingly and after that by programming we can convert data sampled by PLC in to any range according to our requirement.

See below image for sample program idea for analog input.

As You can see in the above picture that we have converted the data received by PLC in to 0 to 100 accordingly. So the 4-20 mA signal received is converted in to 0-100 and after this we can use it according to our application. If you have any doubts you can write in comment sections and we will get back to you. Subscribe to Automation-Talk by Email .

Advertisements :-


  1. Very informative article on PLC Analog Input Wiring and PLC Programming

  2. hi, I've to use analog voltage input port to measure temperature and use it to control the heater. From my thermocouple curcuit, the voltage reading a 0 degrees= 2.5V and at 100 degrees= 2.904V. That means every 1 degree rise in temp. corresponds to 4mV rise in voltage. Temperature range that is used is only from 35-45 degrees. Memory upto D200 already in use. I understand I need to use the scaling function block but not sure exactly how to do it. any help there?

  3. Just see the temp. controller range . For example if it is 0 to 100 deg then it will give 0 volt at 0 deg and 10 v at 100 deg . Use the SCL instruction to calibrate this.
    See this sample program ... everything is clearly mentioned in this.

    If still you face any problem then let us Know.

  4. Thanks for your reply. Yes, I've seen this example earlier. My problem is the thermocouple is 100ohm at 0 degree and 138 ohm at 100 degree. So I used a normal potential divider to come up with the figures mentioned in the earlier post. (0degree=2.5V and 100 degree=2.904V). Can I use this and do the calibration as well?

  5. Yes u can use it.
    Use SCL instruction ..
    SCL D100 D200 D300
    and in d200-d203 put below values
    D200- 0
    D202- Temp Range Maximum value in Hexadecimal(#100)
    D203- 0FA0

    now o to 10 v will be equivalent to 0 to 100 Deg.

    Hope this solve out yours issue.

  6. Thanks My Problem got Solved.

  7. how to read o-100c in delta plc using ladder logic

  8. You can simply see it in the watch window!!

    No special programming required

  9. How can i find the analog inputs of my plc? Type:Cpm1a-30cdrav1
    I am using an LM35 to measure temperature(output=degrees in mV, so 26 C = 0.26 v), could you help me with the ledder diagram? pls

  10. Hi,

    Very informative and helpful article.

    I noticed that the above example shows the final value (after scaling) in integer.

    How can i get the final value with 1 decimal points?


  11. am new to to create a scale ?how to fix values in plc..pls tell..i dnt know anything pls guide me sir..

  12. Which PLC are you using ?.

    If Omron PLC then use SCALE instruction as explained above.

  13. we'd like to make PLC with ultrasonic sensor for measuring level of water. then the output will be displayed in big screen using RGB(VGA) or HDMI cable,
    can you help us? or give us some imagine to make it?

  14. @Mafa Yofong Yes, you can make connection to ultrasonic sensor as above and then take its output to display. What problem are you facing ?

  15. i have cj1mcpu13 cpu unit. my problem is i dont know how to program a analog signal. my input and output module is ad081v1 and da041. i have a 4-20ma flowmeter and a control valve. how can i control the openning of the valve ?. pls attach some example of program.thanks for those who help. :)

  16. @jerico : Please see above image and you will get idea how to get analog values, Use scalling instruction as shown.

  17. @AT : thanks how can i do to the valve opening in 0% 25% 50% 75% 100% only in scaling ? or i use compare? :)

  18. Jerico : For Valve opening are you using encoder ?

  19. @pawan bahuguna : no. i use analog signal of the flowmeter 4-20ma.

  20. Good morning, for DAC, it also use SCL function? Because from datasheet it use to analog input

  21. I got problem in SCL(194) at Source Word.

    In MOV(21) D100 get 2000 hex but in SCL(194) D100 display &8192.
    Which caused me Result Word no result.

    kindly tutorial me how to convert decimal to BCD at Source Word.



Get New Updates

Enter your email address:

Delivered by FeedBurner

Receive all updates via Facebook. Just Click the Like Button Below