horvatmiha Posted January 25, 2019 Report Posted January 25, 2019 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!
NevergoldMel Posted January 26, 2019 Report Posted January 26, 2019 PID has nothing to do with scaling.
Wasan Posted January 26, 2019 Report Posted January 26, 2019 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 2
horvatmiha Posted January 28, 2019 Author Report Posted January 28, 2019 Thanks a lot for your replies. @Wasan, scale equations work great, also your program example is perfect. It's all clear to me. Thanks!
haans Posted January 9, 2020 Report Posted January 9, 2020 Wasan: Your example is very good, but could to explain to me why you convert to double word and floating? To help me understand better. Thanks in advance
Wasan Posted January 9, 2020 Report Posted January 9, 2020 I have convert to DWORD and floating because if you use normal 16 bit word you can have maximum value at 65535 then I convert to Dword or float 32 bit to can have result more thn 65535 espicially when you multiply them You can use for dword if you need to only integer resule and float for accurancy for fraction.
SaukiBullah Posted January 29, 2020 Report Posted January 29, 2020 (edited) Can HMI GXU3512 connect with altivar12HU22M2 with cables TCSMCNAM3M002PTCSMCNAM3M002P ? i need help im newbie Edited January 29, 2020 by SaukiBullah
Wasan Posted February 3, 2020 Report Posted February 3, 2020 @SaukiBullah You should create your own cable first by followwiring diagram from these link below. Magelis HMIGXU3512 at page 35 https://download.schneider-electric.com/files?p_enDocType=User+guide&p_File_Name=GXU_+User+Manual.pdf&p_Doc_Ref=BR082018FP037 Inverter Altivar12 ATV12HU22M2 at page 8 https://download.schneider-electric.com/files?p_enDocType=User+guide&p_File_Name=ATV12_Modbus_EN_BBV28590_02.pdf&p_Doc_Ref=BBV28590
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now