Data Types

Hello,

I recently came across some anomalous data in a mailbox. The tag in question was a float and was returning some values that were about ~1.79769313486232E+308. I had expected that these values could only be in the range of a IEEE 32-bit single precision float (based on the RG-008 Flexy family user guide).

Any insight that could be provided here would be very helpful.

Hi David,

We have been discussing this internally to see if we could sort out where this could be coming from.

So far we have determined that the data mailbox can receive 64bit numbers. The Flexy itself does not support it but we were able to test that it can log a 64 bit number and then push that logged value to the data mailbox. It can not naively read and display the numbers it will show up as inf in the tag viewer.

If I had to guess is that the data was not logged correctly but fit into the format and is being misinterpreted here or some other logging error happened. It looks like 1.79769313486232E+308 is at the edge of what a float can hold. googling the number and it looks like it can also be used for null as well as a few other interesting articles on it.

Deryck

Thanks Deryck,

I suspected the same thing about the quality of the data as it originated in the PLC and how it was transferred to the mailbox. I had a feeling this was a ‘special’ number but i was not aware of any of the issues you linked.

We will handle this in the application syncing the data - thank you for the quick reply.

Just a quick update on this -

I tested this problem using a MEM tag on my Flexy 205. I was able to set the tag value to the problem number above, then perform a datamailbox sync. I was able to log this value to the mailbox with a good quality rating, then pull it down using the DMWEB API. On the local tag display of the Ewon i did see the value as inf.

So it appears that there is no enforcement of the single-precision spec on the Ewon device itself - if an IO server is capable of returning a value that would overflow a single, the Ewon will internalize it. This is not a problem, necessarily, i just wanted to explain what I found in case anyone else runs into this phenomenon.

1 Like