Posted 25 January Hello! I am new at PLC programming. I am using TM221CE16R PLC with TM3AI8 analog input module and SoMachine Basic v1.6. I am trying to scale analog input value. I am using 4-20 mA pressure sensor. I managed my wiring so that I get raw values in SoMachine Basic. But I don't know how to scale these values to usable values. My sensor works in range 0 - 16 bar. What is best way to get values? Is it PID function block or multioperand function block using equations to get range 0 - 16? I will appreciate your help. Thanks in advance! Share this post Link to post Share on other sites
Posted 26 January PID has nothing to do with scaling. Share this post Link to post Share on other sites
Posted 26 January For scaling in M221 you need to follow by scale equations as this link below. https://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value Then I have create program example to scaling input. Please check it. M221_Analog_IP_Scale.smbp 1 person likes this Share this post Link to post Share on other sites
Posted 28 January Thanks a lot for your replies. @Wasan, scale equations work great, also your program example is perfect. It's all clear to me. Thanks! Share this post Link to post Share on other sites