Jump to content

Logaritmic formula


Recommended Posts

Hello,

 

I'd like to have a formula math function with a logaritmic scale.

The formula is

P=10^(U-5,5)

U is a analog input 0-10Vdc

P is a pressure calculated by the Jazz PLC

 

My question how to program this formula in the U90 Software?

 

Greetz

Link to comment
Share on other sites

The Jazz controllers unfortunately cannot support complicated math functions. They are limited to basic calculations that use 16 bit MI values that can work with values from -32768 to +32767. It would not be possible to calculate such large values within the Jazz controller using logarithmic operations.

 

If possible I would recommend utilizing one of our Vision Series controllers, such as the V120. This will allow the use of the more powerful software that can work with 32 bit numbers as well as more complicated formulas.

Link to comment
Share on other sites

  • MVP 2023

If you're feeling really brave, look up the Taylor series for an exponential calculation, write a long program calculating sums and squares, and work with virtual decimal points.  There is one 32 bit register you can use with special functions.  I did this years ago to calculate cosines in an M90 before the V120 existed. 

 

As Alex points out, you are limited by the valued a 16 bit signed integer can hold.  You'll have to run some sample calculations to see if it's even possible.

 

The Jazz wall strikes again.  The easiest thing to do is buy a V130.

 

Joe T.

  • Upvote 1
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.