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

I'm having a hard time either remembering or figuring this out. I have a PLC program and the associated HMI program. I know what this means...
Replies
4
Views
106
Hello, I'm working with Studio 5000 and ME Station, and I'm trying to find a way to detect if the PC with the HMI is shut down or not. I've tried...
Replies
5
Views
145
Hello everyone, Wondering if anybody can help me with this: I have a CompactLogix processor running a little robot cell. Every 200 cycles...
Replies
8
Views
165
Hello, I have an issue where I want to simulate an Siemens HMI panel, through NAT connection to a PLC. I have the possibility through extended...
Replies
5
Views
181
Hi there, I'm trying to learn about the siemens TIA HMI features and have been following tutorials on a simple start/stop button test, however I...
Replies
3
Views
105
Back
Top Bottom