How to Achieve One Decimal Place Precision in S7-1200 Analog Scaling for Temperature Monitoring

Question:

Hello everyone, I need your assistance in determining how to achieve a precision of one decimal place for my scaled output value. I'm currently utilizing a 0-10 V input to monitor room temperature through a normalization and scaling function, but I'm only receiving whole numbers in the output. I'm working with the analog input on the CPU 1214C. Your help would be greatly appreciated—thank you in advance!

Top Replies

Utilize a REAL data type instead of using an integer (int) for enhanced precision and better numerical representation.

mk42 recommends using a REAL data type rather than an int. Click here for a detailed example.

I replicated the process outlined in the example, employing authentic data types; however, I am still obtaining only whole numbers.

User franchois13 mentioned: "I've followed the instructions provided in the example and used actual data types, yet I am still only able to obtain whole numbers. Click to see more... Please upload a screenshot for reference."

In the initial conversion of Scale_x, you're transforming from Real to DInt while utilizing a Memory Word (MW) for the output. For the subsequent Scale_x, you’re also employing a Memory Word (MW) for the result. Please refer back to the example image I shared for clarification.

Hi there! It sounds like you’re on the right track with normalization and scaling, but to achieve one decimal place in your output, you may want to consider adjusting your scaling formula. Instead of just multiplying by your scale factor, you can round or format your output to one decimal place after calculating it. Also, check if the configuration of your analog input module allows for decimal precision—it might involve adjusting your data type or settings. Good luck with your project!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  →