FactoryTalk View: Any workaround for 6-digit precision limit?

Matthew Modar

Lifetime Supporting Member
Join Date
Feb 2008
Location
Tulsa, OK
Posts
43
Referencing KB document QA9877:

"...FactoryTalk View SE Graphics supports single precision floating point values, and by default only provides for 6 significant digit accuracy. Note: digits displayed before the decimal point count as part of the total significant digits. Any digits displayed after the 6 significant digit are approximations only and should not be treated as significant..."

I am working on an ME V11 project and require 8 digit accuracy for several display and input fields. These are all PLC REALs with four digits before and four digits after the decimal point.

I can create two DINTs and HMI fields for each of these and then merge them in the PLC, but this seems unnecessarily cumbersome for both me and the machine operators.

In typical Rockwell fashion, the KB article lists single-precision/6-digit accuracy as the "default", but gives no indication of how to change the default or if this is even possible. I assume it is not. Has anyone found any other workaround for this limitation?
 
Can you switch to LREALs (64-bit floating point)? LREALS have 15+ digits of precision.
>>> struct.unpack('f',struct.pack('I',0x45111111))
(2321.066650390625,)
>>> struct.unpack('f',struct.pack('I',0x45111110))
(2321.06640625,)
>>> 2321.066650390625/(2321.066650390625-2321.06640625)
9507089.0
Those two numbers, 2321.066650390625 and 2321.06640625, represent two adjacent numbers that can be exactly expressed in REAL (32-bit) floating-point format, and no number between them can be exactly represented. I.e. this is analogous to how many integers there are between 1023 and 1024: the answer is none.


When you have a REAL 32-bit floating value, the next values that can be represented above and below it will be between one 8,388,608th and 16,777,215th fraction of the value away.
 
Last edited:
REALs only provide a little better than 6 digits precision. Some say 6.5. drbitboy is correct about using LREAL. Also, it is important to do any math operations in the correct order. As a General rule, do the math on similar sized numbers first to avoid round off errors.

If LREALs are not available then use DWORDs. Another trick is to split the DWORD into a 16 bit integer and a 16 bit fraction. Both the integer and fractional part will provide 5 digits of accuracy.
 
Can you switch to LREALs (64-bit floating point)?

FTView ME does not (apparently) support LREALs. The tag browser does not see the my test variable. I get a line of asterisks when I enter it manually. I did a quick search, but found no documentation of this limitation.

Another trick is to split the DWORD into a 16 bit integer and a 16 bit fraction. Both the integer and fractional part will provide 5 digits of accuracy.

This was my original "plan B" and it looks like what I'll have to resort to.

Thank you to everyone.
 

Similar Topics

Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
121
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
140
Hello, We recently upgraded our control server to a newer model. After the transition we are experiencing issues with our trend graphs to where...
Replies
2
Views
116
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
196
This is admittedly a pretty obscure problem, but maybe someone else has run into it, or at least something similar. For reasons I won't get into...
Replies
3
Views
128
Back
Top Bottom