|
Tag value rounding from 0.0054 to 0.1 during PRINT conversion - Printable Version +- Ewon Technical Forum (https://techforum.ewon.biz) +-- Forum: Development (https://techforum.ewon.biz/forum-50.html) +--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html) +--- Thread: Tag value rounding from 0.0054 to 0.1 during PRINT conversion (/thread-2860.html) |
Tag value rounding from 0.0054 to 0.1 during PRINT conversion - leekhilk@ithena.ai - 21-04-2026 Hello Community, I am seeking guidance on a data precision issue I’m encountering with an Ewon Flexy 205. The Setup: Hardware: Flexy 205 Protocol: Reading tags via OPCUA. The Observation: In the Flexy "Values" tab (UI), the tag Blower_A2_Spd_Ctrl_Mode correctly displays as 0.0054. The Problem: When I attempt to use this value in a BASIC script (either to print to the console or build an HTTP JSON payload), the value is being rounded aggressively. PRINT Blower_A2_Spd_Ctrl_Mode@ // Output in console: 0.1 Any guidance from the experts here would be greatly appreciated! RE: Tag value rounding from 0.0054 to 0.1 during PRINT conversion - AngelaT - 21-04-2026 You might want to look into the SFMT command. You can use it to format your value as a string. It will give you more control over your decimal places. RE: Tag value rounding from 0.0054 to 0.1 during PRINT conversion - leekhilk@ithena.ai - 22-04-2026 (21-04-2026, 05:17 PM)AngelaT Wrote: You might want to look into the SFMT command. You can use it to format your value as a string. It will give you more control over your decimal places. Hi AngelaT Thanks for the information and i have tried using SFMT command and it worked. SFMT MyTag5@, 20, 0, "%f" |