Jump to content

Recommended Posts

Hello,

I am using a V570 with V200-18-E2B snap IO. Software version is 9.8.65

I am linearizing a pressure sensor (4-20 ma) to be able to read from 0 to 30.00 inHg. As you can see in the image below I made y2 a value of 3000 to be able to display it with 2 decimals in the HMI.

image.thumb.png.d3d7f4a0659bc46a531d19467a8111b2.png

 

However I still need to get it with 2 decimals into a Float (MF) to be able to convert this value to mbar by multiplying it by 33.86.   

So basically what I can't figure out is that if I get a value 3000 (30 inHg) I need to be able to put into a float 30.00, If I get 15 should be able to put into a float 00.15 and so on.

Is this something that can be done by using Num to Ascii and putting the ascii value into 2 MIs?  then using those 2 MIs into a float convert A+b/n?

I am hoping somebody point me in the right direction in how to achieve this.

 

Thanks in advance

Link to comment
Share on other sites

Why not simply use a second linearization function?

LinConv.thumb.png.91ee63bd3a4489076cb780a04aa3aa74.png

 

Besides that, be aware that you are demonstrating a precision which is not existing, when you display the inHG-Value with two decimal digits.
Your PLC can only read 819 value points (highest value 1023 - lowest value 204), which means every increase of MI0 by 1, will increase MI 1 by 3,663 (3000 inHG / 819).

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.