Scaling - Logarithmic scale, SLC500

Cryogen

Member
Join Date
Oct 2005
Location
NH
Posts
151
I need to scale a signal 0V to 10V to 10 power (-11) to 10 power (-1). It is a logarithmic scale.

1V is 10 power (-10)
2V is 10 power (-9) etc..

How do I handle this while scaling in RSlogix?
Any comments would be greatly appreciated..
 
Is this a vacuum transduer with 1V/Decade output?

ie
0 to 1 volt is 0 to 1000 X 10^-10 torr
1 to 2 volt is 0 to 1000 x 10^-9 torr
2 to 3 volt is 0 to 1000 x 10^-8 torr

If this is what you want then somewhere I have a program that I used to do this... If its something else, then what I have isn't what you are looking for.
 
Its been quite a while since I did that bit, and I don't even remember precisley which project it was on. I'll see if I can dig up the code later this afternoon.
 
I can't find the program, but the ion vacuum gages I was using (which I think is typical) calculates the analog output voltage using:

Vout=(-Vac.Exponent x 1.0 VDC) + (1-(Vac.Mantissa/10))

To convert this back you take the voltage read and subract the fraction (to the right of the decimal) from 1 and multiply by 10. Then you take the whole number part to the left of the decimal and negate it, and it becomes your exponent.

Thus for 1.56 volts you get
10 x (1 - .56) = 4.4 x 10-1 Torr.

For 5.67 volts you get
10 x (1 - .67) = 3.3 x 10-5Torr.

IIRC, I scaled my 0-10V analog input into 0-1000 (voltage in * 100) for an implied 2 decimal places, and then put it into the math register and used a double divide to separate it into fraction and whole number parts. (Assuming you are using Logix 500 SLC and not a ML or Logix 5 or 5K)

MOV SCALED_ANALOG_INPUT S:13
MOV 0 S:14
DDV 100 N7:0 //The value in N7:0 is discarded
MOV S:13 N7:1 //remainder
MOV S:14 N7:2 //unrounded quotient

SUB 100 N7:1 N7:3 //subract from 1 - remember volts is multiplied by 100
DIV N7:3 10.0 F8:0 //multiply by 10 - remember, volts is already multiplied by 100, dividing by 10 produces the desired result.

MUL N7:2 -1 N7:2 //negate the quotient that will become the exponent
XPY 10 N7:2 F8:1 //Raise 10 to the now negative exponent
MUL F8:0 F8:1 F8:2 //put the two parts back together again.

This should give you a real number in F8:2 that is the same as what is displayed on the ION gage controller.

Refer to the specifications of your ion gage to make sure it uses the same formula.

Sorry I couldn't find the actual program, but I hope this helps you.
 
Last edited:
Thanks for your help. I am still going over it.. Not completely there but I appreciate your help.
 
I often cheat with things like this. It is easy to get a PLC to calculate a high order polynomial equation like Y = A +Bx + Cx² ..... because it is all multiplication.

If I have a screwy equation I plot the data in Excel, and then I create an X-Y chart of the data. Then you can right click on the line, and clidk on "Add Trendline". I usually use the polynomia type trendline, but you have choices. Under options you click on "Display Equation on Chart". This will give you the actual equation with constantants A, B, C and so on. If you right-click on the equation and click "Format" you can get as many decimal places and so on as you need.
 

Similar Topics

Hi, having some issues with scalings (SCP commands) with some Vegapuls 65 guided wave radar level transmitters. I've set the min/max in the...
Replies
5
Views
117
I want to measure the tank level and get the sensor output to the PLC. Below are the details : Tank Height =0 - 3m, the sensor is stalled 0,2m...
Replies
15
Views
608
Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
14
Views
359
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
219
Hi all. I'm working on a rehab and I'm trying to figure stuff out. See screenshot at the bottom. Local:5:I.Data[6] in BTD instruction is a...
Replies
6
Views
712
Back
Top Bottom