# Mathematical equation in memory

## 5 posts in this topic

Hello,

I would like to make mathematical equation, but I am not very good with Omron.

On operator panel I can adjust such parameter with memory location of "WR00097" (it can be adjusted on operator panel from 0 to 10 000; 0 = 0% and 10 000 = 100%)

I would like to make equation which takes the the WR00097 and subtract by 15% and puts the new value to memory location WR00095.

So if value in WR00097 is 10 000 then I want the value in WR00095 is 8 500.

Can anyone help me to find a way how to do it?

##### Share on other sites

Use a  BCD MULTIPLY: *B(424)  instruction. You will always multiply by 8500. Take the second word of the result as the output.

10000 x 8500 = 8500 0000

regards,
Garry

1 person likes this

##### Share on other sites
1 hour ago, gclshortt said:

Take the second word of the result as the output.

Hello,

I do not understand this part, how can I get 8500 out of 8500 0000

##### Share on other sites

The result of the multiplication is placed in W95 and W96. The value of 8500 will be in the second word (W96) which is the most significant word.

Regards,
Garry

1 person likes this

##### Share on other sites

Alright, I believe I understood you! I will try it soon and hopefully it will work.

Thank you so much for your help Garry!

Mikk