# Scientific Notation

## Recommended Posts

Please could someone explain how I can display a 0-10v input signal as a pressure output:-

9.1v = 1000mb  to 1.0v = 5.5 x 10-5mb ?

I am using 1210 with latest Visilogic.

My ladder programming skill is quite basic but I  have managed to control and HMI a full

high vacuum pumping system but need to display the vacuum levels in scientific notation.

Any help would be great.

Many thanks

Stan

##### Share on other sites

Hello,

If the pressure  is linearly proportional to the analog input voltage, then you could use linear interpolation formula and floating point registers (MF).

Floating registers are also known as real numbers and it's the best way to deal with fractions.

Since the linearization function within Visilogic can't be used for MF registers, you have to do it step by step using simple mathematical functions.

LINEAR INTERPOLATION FORMULA:

Y = ( ( X - X1 )( Y2 - Y1) / ( X2 - X1) )

Where,

X1,Y1 = First co-ordinates

X2,Y2 = Second co-ordinates

X = Target X co-ordinate

Y = Interpolated Y co-ordinate

X1=409

X2=3726

Y1=0.000055

Y2=1000

Y= Pressure result displayed on the screen

##### Share on other sites

• MVP 2021

First, which module part number are you connecting the input to?

I think you may have a bigger problem with the resolution of the A/D converter in the module.  Our highest resolution is 14 bit, which means you get 2^14 or 16384 counts to play with.  You've dialed the span down to 9.1 V to 1.0 V, so you'll get a smaller fraction, assuming you're using one of these inputs:

1.0 V = 1638 counts = X1

9.1 V = 14909 counts = X2

Total span = 13271 counts

Your high end value is 1000 (Y2), so the best you can get if the low value is 0 (Y1) is 0.07 mb per count.  In other words, trying to read more than one decimal of precision accurately is unobtainable.  You can feed the output of the Linear block into an interpolating equation as Kikis points out, but everything past the first decimal will be meaningless.

Joe T.

##### Share on other sites

• MVP 2021

+1 to Joe's post.

But seeings how you are working with a vacuum system, you really only need to display things once it gets down to certain levels.  eg my refrig gauges only display digits below 500 microns.

It appears that you can change the outputs of the sensor to various vacuum levels, so you might be able to get the figures you need by reducing the span to very high vacuum zones.

If you can do this, but also do need to display vacuum through the entire range, then use 2 sensors with settings to suit and automatically switch between them.

cheers,

Aus

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible. ×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×