horvatmiha

M221 & SoMachine Basic - ANALOG INPUT SCALING

10 posts in this topic

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

PID has nothing to do with scaling.

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Can HMI GXU3512 connect with altivar12HU22M2 with cables TCSMCNAM3M002PTCSMCNAM3M002P ?

 i need help

im newbie

 

Edited by SaukiBullah

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

What about PID in M22

Can you get an example

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now