setting # of decimal places on displayed floating integers (RSLogix)

Skidood

Member
Join Date
Oct 2016
Location
Ontario
Posts
215
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 place, not 9..

Also. is there a way to limit the decimal places to 2 for all FI's in the program, so the PLC doesn't have to blow its brains out doing math calculations? Just dont need that level of precision.
 
I don't know of any way to alter the display of floats in RSLogix software. You can add some burden to the PLC logic and force the results to end up with fewer decimal places, but it is usually simpler to do that with the formatting of the HMI objects. In the old Atari days, in order to achieve this, (for two decimal places as an example) I would multiply by 100 with an integer destination, then divide by 100 with a float destination. This is limited to values between -327.68 and +327.67 with 16 bit math operations and is typically only useful for the human observer...the 'puter don't care...

What HMI are you working with?
What's "FI"?

The PLC doesn't have to work harder because there are lots of digits in the operands.
 
Floating point numbers are called floating point because the decimal place can move around depending on the value. Extremely small numbers have lots of numbers behind the decimal and as the numbers increase in size, precision decreases.

All HMI software i have used allows you to set how many decimal places are displayed or needed to be entered when displaying or receiving information. This has nothing to do with the PLC code or the amount of time required to calculate it.
 
OK thanks. I don't have the HMI yet and don't have very much experience programming them but it might be a ProFace. It won't be an A-B.
 
All HMI software i have used allows you to set how many decimal places are displayed or needed to be entered when displaying or receiving information....

Second that : this is a fundamental requirement of any HMI.

You have to be able to constrain, format, normalise, or whatever you want to call it, all float numbers into the graphical object you create to display them.

You will always see options for number of digits following the d.p., and most will allow options for how the mantissa is displayed, e.g. leading zero(s), whether to display the + sign or a space for positive numbers, etc.

It should be possible to configure a column of numbers so the the d.p.'s align vertically

The only drawback is that you have to have knowledge of the largest number presented, so that you can allow for the number of digits before the d.p.
 

Similar Topics

Good morning fellow sea captains and wizards, I am being asked to do the above and obtain 4 values from each slave, I know about the MRX and MWX...
Replies
27
Views
565
SELECTED NEW FILE SELECTED PROCESSOR TYPE SELECTED I/O CONFIGURATIONS IM UNABLE TO CONFIGURE MY I/O’S. I HAVE A PAPER COPY OF A PROGRAM AND I...
Replies
0
Views
79
Does Rockwell still offer reset codes for old school Master Disk floppy's? In a bind and need to reset the activation disk soon and to be pointed...
Replies
9
Views
229
Hello, I am in possession of a WAGO PFC 200 750-8216 which I was successfully able to set up as a Modbus RTU Master to a slave device using...
Replies
0
Views
76
Hello. I am trying to use a Prosoft AN-X4 to improve the communications for a new panelview plus 7. This is going from a SLC-500 through DH+ to a...
Replies
9
Views
281
Back
Top Bottom