HMI Fractions?

UncleHairball

Member
Join Date
Nov 2019
Location
Califurnia
Posts
11
I have an existing piece of equipment, using an Allen-Bradly Panelview 5500 running a View Designer program, that requires operators to enter measurements taken with a tape measure. We have lots of problems with users not being able to quickly convert fractions to decimal, so I am trying to change my numeric entries to be fractional instead of decimal.


Is this possible? Can you suggest resources for me?


Thanks in advance for your suggestions.
 
Metric Tape measures available at Home Depot/Lowes

Have your operators either enter CM or MM directly from tape measure
 
Have your operators either enter CM or MM directly from tape measure


Good idea, but I fear that adding a new measurement system will make things even more difficult. If arithmetic is not a strong subject, a new unit system is probably going to make things worse.


Thanks for the suggestion, though.
 
We have similar issues on our equipment, i.e. operators not able to think in decimal. On a new machine we built, they take measurements with a ruler graduated in 16ths and enter them in the HMI during setup. Decimal entry was not an option so I had to figure out the best way to enter fractions.

I ended up storing the value as a whole number representing 16ths of an inch, so for example 3-1/4" would be stored as 52. The arrow buttons simply increment or decrement the value by 1 (1/16"). In the PLC it's easy, just multiply the value by 0.0625 to get decimal inches. The field on the HMI displays a text string which is determined by the following code:

Code:
int q := value / 16;   // quotient
int r := value % 16;   // remainder
cstring result;

if(q==0 && r==0) result := "0";

if(q>0){
    result := IntToText(q,10,1);
    if(r>0) result += "-";
}

switch(r){
    case 0: break;
    case 1: result += "1/16"; break;
    case 2: result += "1/8"; break;
    case 3: result += "3/16"; break;
    case 4: result += "1/4"; break;
    case 5: result += "5/16"; break;
    case 6: result += "3/8"; break;
    case 7: result += "7/16"; break;
    case 8: result += "1/2"; break;
    case 9: result += "9/16"; break;
    case 10: result += "5/8"; break;
    case 11: result += "11/16"; break;
    case 12: result += "3/4"; break;
    case 13: result += "13/16"; break;
    case 14: result += "7/8"; break;
    case 15: result += "15/16"; break;
}

return result;
This was done on a Red Lion G3 but I would assume it could be translated to a PV. In our case the entries were always 4" or less so it was reasonable to use the arrow buttons for entry. In the case of a larger range you could probably split it up and use a numeric entry field for the whole part of the fraction.

fraction.PNG
 
We have similar issues on our equipment, i.e. operators not able to think in decimal. On a new machine we built, they take measurements with a ruler graduated in 16ths and enter them in the HMI during setup. Decimal entry was not an option so I had to figure out the best way to enter fractions.

I ended up storing the value as a whole number representing 16ths of an inch, so for example 3-1/4" would be stored as 52. The arrow buttons simply increment or decrement the value by 1 (1/16"). In the PLC it's easy, just multiply the value by 0.0625 to get decimal inches. The field on the HMI displays a text string which is determined by the following code:

Code:
int q := value / 16;   // quotient
int r := value % 16;   // remainder
cstring result;

if(q==0 && r==0) result := "0";

if(q>0){
    result := IntToText(q,10,1);
    if(r>0) result += "-";
}

switch(r){
    case 0: break;
    case 1: result += "1/16"; break;
    case 2: result += "1/8"; break;
    case 3: result += "3/16"; break;
    case 4: result += "1/4"; break;
    case 5: result += "5/16"; break;
    case 6: result += "3/8"; break;
    case 7: result += "7/16"; break;
    case 8: result += "1/2"; break;
    case 9: result += "9/16"; break;
    case 10: result += "5/8"; break;
    case 11: result += "11/16"; break;
    case 12: result += "3/4"; break;
    case 13: result += "13/16"; break;
    case 14: result += "7/8"; break;
    case 15: result += "15/16"; break;
}

 return result;
This was done on a Red Lion G3 but I would assume it could be translated to a PV. In our case the entries were always 4" or less so it was reasonable to use the arrow buttons for entry. In the case of a larger range you could probably split it up and use a numeric entry field for the whole part of the fraction.


Now you've really got me thinking. I appreciate your helpfulness very much.
 

Similar Topics

Hi I have a couple of hmi panel view plus 700 Hmi and we keep dropping coms /stars in the data boxes I’ve checked the plc and unmanaged switch...
Replies
6
Views
140
Hello all, I'm currently working on a servo motor linear positioning system (ball screw). I'm all set up regarding communication between my HMI...
Replies
1
Views
79
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
160
how do I connect the 20-HMI-A3 to the powerflex 525
Replies
2
Views
102
Currently I’m using ESA model VT155W0000 HMI and it’s communicate with Fanuc PLC. Can any one suggest can I convert ESA model to EXOR HMI eSMART07M
Replies
0
Views
74
Back
Top Bottom