Jump to content

Viewing large numbers


Recommended Posts

I have a 5-digit number to view on a Samba unit. Displaying the value is no problem, but I can't figure out how to put a simple comma in the thousands position. The numeric variable does seem to have that option. If I try to place a text object (with only an apostrophe) on top of the numeric variable in the correct location, the software automatically puts it behind the numeric variable where it won't be seen. Does anybody have any ideas for displaying a comma as part of a number? 

Link to comment
Share on other sites

  • MVP 2021

There's no easy way to do this in Unitronics.  It would require a change in the OS to insert commas in the numeric display object.

The only way I can think to do it would be to break the number into exponential pieces and display them in separate numeric fields and have static text commas in between them, with hide bits on the commas based on the value of the source.

A pain in the butt.

I'll put a link to this post in the "We're Listening" section.  It would be a nice feature to have.

Joe T.

 

Link to comment
Share on other sites

  • MVP 2021

I agree with Joe and am glad to see him asking the Creators.

However, if it is always 5 digits you could cheat a little bit and pretend the decimal point you could do at the "thousands mark" is a comma.  Just a little bit of division/maths beforehand.  Even having the dec point might be a good enough separator for now, giving that little bit of extra clarity.  Depends what country you are in.

I quote from something copied from a site and have underlined the important bit:

Great Britain and the United States are two of the few places in the world that use a period to indicate the decimal place. Many other countries use a comma instead. The decimal separator is also called the radix character. Likewise, while the U.K. and U.S. use a comma to separate groups of thousands, many other countries use a period instead, and some countries separate thousands groups with a thin space.

In Aus it is getting hard to keep up with constantly changing norms, seemingly dictated by what is PC or trendy at the time.  Used to be commas, but supposedly it is now the thin space.

cheers,

Aus

  • Upvote 1
Link to comment
Share on other sites

Thanks to you both for answering. I converted MI to MF, then divided by 1000 and used INV(A+B/n) to the break the result into two MIs. Then displayed the two MIs side-by-side with just enough space to allow the text object comma between them. I have not tested it yet, but I think it might work. Also defined a Hide bit for the comma if the original number is less than 1000. The comma is not a requirement for my program, it just seems natural to have it in the display. Personal preference.

In all of my other HMI programming software packages, selecting a comma is as simple as checking a checkbox.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...