Modbus TCP - Divide register by 10

Good Morning

We have a temperature value in a single modbus input register in the format XXXZ where Z is after the decimal place. For example a real world value of 25.3 degrees is provided as 253 in the modbus register. I can multiply this by a scale factor to make it 253.0 degrees, but what I would like to do is to display and log it as 25.3 (so divide by a factor of 10) Is there a way to do this?

Thanks

David

Hi David,

To divide a PLC value by a certain number, you have to add a factor with a decimal. In your case this factor would be 0.1

If you want to display and log this value, you can enter 0,1 as the factor of your variable.
If you only want to display this value, you can enter 0,1 as the factor in the Studio

Hope this answers your question.
Kind regards,

Dennis

Got it - makes sense… Thanks.

1 Like