Hi, we're using the Cirrus Link MQTT module to receive transmissions from our sensors out in the field. I'm having a weird issue where some of the sensors get rounded by Ignition while others do not. They both appear to be transmitting correctly in Node-Red, subscribing to Ignition's MQTT broker gives the correct values, but the actual designer has rounded numbers.
I was wondering if anyone has ran into this issue before or any tips on debugging why this issue is happening? I can't have the designer rounding these numbers.
I'm attaching pictures showing Node-Red vs. the designer.
Ignition's default number format for tags is 0.##, which rounds on display in the designer. The actual floating point value is still there.
Change the tag's format property to suit your needs. Your user interfaces can use the tag's format, or substitute anything it likes, completely up to you.
While the format string is almost certainly the "answer" in this case to the visible precision loss you're seeing, I want to call one thing out.
Computers are rounding numbers all the time. Basically, everything that's not explicitly using arbitrary precision arithmetic (i.e. some financial systems) is relying on bog-standard IEEE-754 floating point representation. Including Node-RED.
So while the format string you use for display is almost certainly going to fix the issue you're having in the immediate sense, don't be misled by the apparent precision you're seeing in Node-RED about what's actually happening internally.
Thank you guys for the insight, I ended up fixing the issue before I checked back with the forum. I was not expecting such fast replies
I ended up deleting the tags and when the next MQTT transmission came in, I was getting the amount of precision I was aiming towards for the sensors that I needed.