Review the data types for both Prod_1_scaled and Pod_2_scaled; you might find the results unexpected. In order to support decimal values, these data types must be set to "real." Keep in mind that real data types require 4 bytes (MD), which suggests that your MW tags are likely not configured with the appropriate data type.
Thank you all! I’m going to try this out and will return to share my updates. Stay tuned for more information!
Absolutely, switching the data type to MD has successfully delivered the desired outcome. However, I have an additional question. The average value of the readings is currently being shown on a Mitsubishi GOT2000 HMI. I need to modify the data type and address in the device settings, but I can’t seem to locate the option to set it to MD. The only data types I’ve found include IW, QW, DB, MW, and a few others that I'm not familiar with. Thank you for your assistance so far!
I believe you would greatly enhance your programming skills by mastering the use of integers in your code, as well as understanding how to manipulate the decimal point in Human-Machine Interface (HMI) applications. Every HMI system supports this functionality, making it essential for effective programming.
Spaderkung suggested, "I believe you'll greatly benefit from understanding how to implement integers in your coding practices and how to adjust the decimal point in the Human-Machine Interface (HMI). All HMIs support this functionality." To that, I appreciate your advice! However, I need to explore alternative methods since connecting two devices from different manufacturers isn't a straightforward task. I plan to conduct further research on this topic. Thank you!
User franchois13 expressed gratitude for the suggestion but indicated the need to explore alternative methods for connecting two devices from different manufacturers, as it can be quite complex. They mentioned the importance of conducting further research. Additionally, they encouraged others to check out the images for the S7 300/400 series, noting that while their GTD 3 model is older and does not feature the S7 1200 series, the connection process should be comparable.
Spaderkung commented: "I believe you could greatly improve your coding skills by mastering the use of integers and understanding how to manipulate decimal points in your Human-Machine Interface (HMI). Most HMIs support this functionality. However, I've never encountered an HMI that automatically converts an integer to a decimal format. Is this a common feature? Personally, I rely on real numbers whenever I'm working with decimal values, as fixed-point arithmetic can become quite complex quickly."
Moggie mentioned: "Check out the images for the S7 300/400 series. My GTD 3 is an older model and doesn’t include the S7 1200 series, but the functionality should be quite similar. I’ve started adjusting the program to utilize the Data Blocks (DB), and it looks promising based on my initial test with the Mitsubishi HMI. I’ll provide an update if I achieve successful results. Thank you!"
That's a fascinating question! I was also in search of the same information.
User mk42 commented: “I’ve never encountered an HMI that automatically converts an integer (INT) into a decimal format. Is this a common feature? Personally, I prefer using real numbers whenever I need decimals.” Expanding on this, usually, there’s a dedicated formatting section for value displays, or it's configured through scaling tags. While I can’t speak for every HMI available, my experience with the ones I’ve worked on supports this observation. It’s important to note that utilizing an integer that scales up by a factor of ten is not the same as working with fixed decimals. For most applications, I also find myself relying on real numbers for ease of use, as the platforms I use do not face limitations regarding computational requirements or the increased data size associated with these values.
Moggie commented: "Check out the images for the S7 300/400 series. My GTD 3 is an older model and doesn't support the S7 1200 range, but it should be quite comparable. Click to expand for more details. I found success with this approach! Utilizing datablock addressing has proven to be much simpler and functions perfectly for my needs—specifically, displaying temperature readings in the Mitsubishi GOT2000 via the S7-1200 CPU. I really appreciate it. A big thank you, too, for all the other helpful suggestions!"