F8 Floating decimal question

I have found a mistake in my previous program. It works fine except for certain specific floats that are between 256.5 and 512.0 that meet a particular criteria where bit 15 of the mantissa is set along with some other bits between 0 and 14 of the mantissa.

I have attached a corrected version which also includes another method, showing two different ways to truncate the float, and it also includes a subroutine that will round any large float to the nearest whole number.
 

Similar Topics

Hi there, Does anyone know how to limit the # of decimal places of all floating integers displayed on the HMI? I want to display one decimal...
Replies
4
Views
7,478
RSLogix 500 FTVS-ME I have a floating integer that I only want to go 2 places to the right of the decimal point(100th) but I can't find the...
Replies
1
Views
1,662
Ladies & Gent's, I am reading a floating point number from a Seimens RWF40 controller(PV) modbus address 30000 IEEE_754 format. I want to...
Replies
11
Views
2,727
Equipment- AB HMI PV600 2711-B6C20 Control Logix 1769L32E Software- RSlogix 5000 and Panelbuilder 32 Problem- I have an analog signal back to...
Replies
0
Views
1,277
I’m using a 05 PLC which cannot handle real (floating point) numbers. The operator must enter the cut length into the C-Micro panel. (I used a...
Replies
2
Views
3,591
Back
Top Bottom