# Increment of temperature setpoint

## Recommended Posts

```Good afternoon!

We are running an application to control an oven with recipe, ramp and landing, using a V430-J-RA22.
The customer has a table where he puts the values of initial temperature, final temperature and time to leave the initial temperature and reach the final temperature.

To reach the value of how much the temperature setpoint should be increased, we use the following equation:

Final Temp - Start Temp / Time
Ex: 250-120/90 = 1.44 ° C per minute -> that is, the setpoint must be increased by this value every minute

In this way, we take this value and store it in a memory to insert in the PID control.
However, this only accepts whole numbers (MI), but for decimal places after the comma we would have to use one (MF).

Is there anything we can do or is this a limitation of the software?```
##### Share on other sites

• MVP 2023

There is rarely a need to use MF in this type of situation. Multiply both sides of your equation by 100 (or 1000 to obtain an additional decimal point of precision). Perform your calculation, then apply additional math to obtain a final temperature change to one decimal point, (times 10, which is what the I/O for the temperature probe will be working in).

##### Share on other sites

```Thanks for the quick response...
Could you please show this calculation with a practical example with real numbers?```
##### Share on other sites

• MVP 2023

You need someone to show you how to multiply by 100? Keep in mind that this forum is staffed by volunteers, not Unitronics employees for the most part. We have day jobs and help out here when available - we cannot write your program for you. I recommend that you make your best attempt and then post your results here with specific questions if you can't get it to work. Someone here will then help guide you.

##### Share on other sites

• MVP 2023

I post some tips about MF to ML conversion (with MI max value mast be below +32768).

You can use it in your application for calculate Flex727 idea with x100 myltiply.

And set PID setpoint with MI.

##### Share on other sites

1 hour ago, Flex727 said:

You need someone to show you how to multiply by 100? Keep in mind that this forum is staffed by volunteers, not Unitronics employees for the most part. We have day jobs and help out here when available - we cannot write your program for you. I recommend that you make your best attempt and then post your results here with specific questions if you can't get it to work. Someone here will then help guide you.

```Sorry @ Flex 727, if my question made you so furious ...
It is according to your explanation I did not understand what value should I multiply by 100 ... only that ...```
##### Share on other sites

• MVP 2023

Flex and I are both known to snap at people for asking for "example code".  There's a fine line between "point me in the right direction" and "do it for me so I can implement it and call it my own to my boss".  It's an old programmer's attitude that's acquired, like the taste for Scotch.

Anyway, what you need to become familiar with is the concept of implied decimal places.  You can do amazing things with integers but you need to track your powers of 10 and know in your calculations that a number is 10 or 100 times bigger to "imply" 0.0 or 0.00 precision.

When you're doing your calculations with integers, keep in mind that the maximum value for an MI is 2^15 or 32767.  For this reason I do most of my cranking in ML's and then extract the final answer to an MI.  Also, remember that when you multiply or divide your power of 10 adds or subtracts.

The best way to learn this for yourself is to experiment with the numbers on your calculator with whole numbers only.  Then just write PLC code to match.

We're much more friendly and tend to help when someone bangs on something and then posts their code.

Joe T.

##### Share on other sites

15 minutes ago, Joe Tauser said:

Flex and I are both known to snap at people for asking for "example code".  There's a fine line between "point me in the right direction" and "do it for me so I can implement it and call it my own to my boss".  It's an old programmer's attitude that's acquired, like the taste for Scotch.

Anyway, what you need to become familiar with is the concept of implied decimal places.  You can do amazing things with integers but you need to track your powers of 10 and know in your calculations that a number is 10 or 100 times bigger to "imply" 0.0 or 0.00 precision.

When you're doing your calculations with integers, keep in mind that the maximum value for an MI is 2^15 or 32767.  For this reason I do most of my cranking in ML's and then extract the final answer to an MI.  Also, remember that when you multiply or divide your power of 10 adds or subtracts.

The best way to learn this for yourself is to experiment with the numbers on your calculator with whole numbers only.  Then just write PLC code to match.

We're much more friendly and tend to help when someone bangs on something and then posts their code.

Joe T.

```Joe thanks for the explanation.
My intention was not to ask someone to do the routine for me.
I believe that with your explanation I will be able to simulate something that meets my need.
Thank you.```
##### Share on other sites

• MVP 2023
2 hours ago, Joe Tauser said:

Flex and I are both known to snap at people for asking for "example code".

I was a bit snippy, wasn't I?

## Create an account

Register a new account

×