Dec 25, 2010

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 20mA 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.

PLC Analog Input Wiring and PLC Programming


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

29 comments:

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

    ReplyDelete
  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?

    ReplyDelete
  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.
    http://www.automation-talk.info/2011/01/plc-programming-tank-level-measurement.html

    If still you face any problem then let us Know.

    ReplyDelete
  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?

    ReplyDelete
  5. Yes u can use it.
    Use SCL instruction ..
    SCL D100 D200 D300
    and in d200-d203 put below values
    D200- 0
    D201-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.

    ReplyDelete
    Replies
    1. What's is the value ot d201 202

      Delete
    2. What's is the value ot d201 202

      Delete
    3. Sir can I ask 1 thing what value for d 200 d 201 that I put

      Delete
  6. Thanks My Problem got Solved.

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

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

    No special programming required

    ReplyDelete
  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

    ReplyDelete
  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?

    Thanks.

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

    ReplyDelete
  12. Which PLC are you using ?.

    If Omron PLC then use SCALE instruction as explained above.

    ReplyDelete
  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?
    thanks

    ReplyDelete
  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 ?

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

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

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

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

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

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

    ReplyDelete
  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.

    Thanks


    ReplyDelete
  22. 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.

    Thanks

    ReplyDelete
  23. What should i do if my range is between -20 degC to 100 degC?

    ReplyDelete
  24. Sir very informative web site.i am using keyence plc and want to programe 0-10V and 4-20mA signal input kindly tell me how i can get input and scaling and produce output.
    Thanks Naeem Ahmed from Pakistan +923462383485

    ReplyDelete
  25. Sir very informative web site.i am using keyence plc and want to programe 0-10V and 4-20mA signal input kindly tell me how i can get input and scaling and produce output.
    Thanks
    NAM AMIT KUMAR VISHWAKARMA
    Mb.9999275658.
    City. GURGAON
    State. HARYANA

    ReplyDelete

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