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. Syconet Geek // January 12, 2011 at 6:01 PM  

    Very informative article on PLC Analog Input Wiring and PLC Programming

  2. Anonymous // March 8, 2011 at 11:10 AM  

    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. Injy // March 8, 2011 at 9:12 PM  

    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. Anonymous // March 9, 2011 at 6:28 PM  

    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. Injy // March 9, 2011 at 11:08 PM  

    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. Anonymous // April 25, 2011 at 2:27 AM  

    Thanks My Problem got Solved.

  7. ksskumar // December 5, 2011 at 3:10 PM  


  8. ksskumar // December 5, 2011 at 3:11 PM  

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

  9. Injy // December 8, 2011 at 12:23 PM  

    You can simply see it in the watch window!!

    No special programming required

  10. Avb // August 6, 2012 at 5:40 PM  

    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

  11. Cajun // August 28, 2012 at 3:36 AM  


    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?


  12. Unknown // February 1, 2013 at 12:34 PM  

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

  13. FYP // February 2, 2013 at 8:35 PM  

    Which PLC are you using ?.

    If Omron PLC then use SCALE instruction as explained above.

  14. Mafa Yofong // November 28, 2013 at 5:26 PM  

    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?

  15. Pawan Bahuguna // November 28, 2013 at 7:54 PM  

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

  16. jerico quin // December 13, 2013 at 7:19 AM  

    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. :)

  17. AT // December 13, 2013 at 6:51 PM  

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

  18. jerico quin // December 15, 2013 at 9:06 PM  

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

  19. Pawan Bahuguna // December 16, 2013 at 6:17 PM  

    Jerico : For Valve opening are you using encoder ?

  20. jerico quin // December 18, 2013 at 6:01 AM  

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

Post a Comment

Free Business and Tech Magazines and eBooks