You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 11th, 2019, 08:29 PM   #1
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
HMI Fractions?

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.
  Reply With Quote
Old November 11th, 2019, 08:51 PM   #2
Timbert
Member
United States

Timbert is offline
 
Timbert's Avatar
 
Join Date: May 2011
Location: The middle of the Pacific Ocean
Posts: 438
Spend more tax money on public education?

__________________
An expert is a man who has made all the mistakes which can be made in a very narrow field. --Niels Bohr as quoted by Edward Teller
  Reply With Quote
Old November 11th, 2019, 09:16 PM   #3
Mark-
Lifetime Supporting Member
United States

Mark- is offline
 
Join Date: Nov 2008
Location: Texas
Posts: 705
Quote:
Originally Posted by UncleHairball View Post
Is this possible? Can you suggest resources for me?
Resources to do accomplish what? Graphic entry? Arithmetic? Programming?
__________________
Good luck,

Mark
PeakHMI
  Reply With Quote
Old November 11th, 2019, 09:24 PM   #4
Plastic
Member
United States

Plastic is offline
 
Join Date: Feb 2009
Location: Michigan
Posts: 311
Metric Tape measures available at Home Depot/Lowes

Have your operators either enter CM or MM directly from tape measure
  Reply With Quote
Old November 11th, 2019, 09:27 PM   #5
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,559
Three numeric entry fields. One for whole number, one for numerator, one for denominator. Do the arithmetic in the PLC to convert to a decimal number. I'm not convinced it won't result in just as many errors though.
  Reply With Quote
Old November 11th, 2019, 11:44 PM   #6
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Quote:
Originally Posted by Steve Bailey View Post
Three numeric entry fields. One for whole number, one for numerator, one for denominator. Do the arithmetic in the PLC to convert to a decimal number. I'm not convinced it won't result in just as many errors though.

Brilliant idea, Steve. Thanks very much for the help.
  Reply With Quote
Old November 11th, 2019, 11:46 PM   #7
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Or how about none?
  Reply With Quote
Old November 11th, 2019, 11:49 PM   #8
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Quote:
Originally Posted by Plastic View Post
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.
  Reply With Quote
Old November 12th, 2019, 06:42 AM   #9
jimtech67
Member
United States

jimtech67 is offline
 
jimtech67's Avatar
 
Join Date: Jun 2002
Location: New Jersey
Posts: 469
give these out or post it by the HMI


https://www.mfgtray.com/wp-content/u...Conversion.pdf
  Reply With Quote
Old November 12th, 2019, 07:32 AM   #10
mister x
Member
Canada

mister x is offline
 
Join Date: Jan 2019
Location: Canada
Posts: 156
Quote:
Originally Posted by jimtech67 View Post
give these out or post it by the HMI


https://www.mfgtray.com/wp-content/u...Conversion.pdf
Go a step further and make them HMI buttons.
  Reply With Quote
Old November 12th, 2019, 07:41 AM   #11
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,559
A picture of a scale and a horizontal slider. Horizontal movement of the slider scaled to a range of zero to .999. If you want to get fancier, restrict the slider to incremental stops correspond to 16ths or 32nds.
  Reply With Quote
Old November 12th, 2019, 08:23 AM   #12
kolyur
Lifetime Supporting Member + Moderator
United States

kolyur is offline
 
kolyur's Avatar
 
Join Date: Oct 2004
Location: Wooster, Ohio
Posts: 1,538
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.
Attached Images
File Type: png fraction.PNG (1,007 Bytes, 74 views)
__________________
John
  Reply With Quote
Old November 12th, 2019, 05:59 PM   #13
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Quote:
Originally Posted by jimtech67 View Post
give these out or post it by the HMI


https://www.mfgtray.com/wp-content/u...Conversion.pdf

Yep, already tried that. Thanks for the suggestion.
  Reply With Quote
Old November 12th, 2019, 06:01 PM   #14
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Quote:
Originally Posted by Steve Bailey View Post
A picture of a scale and a horizontal slider. Horizontal movement of the slider scaled to a range of zero to .999. If you want to get fancier, restrict the slider to incremental stops correspond to 16ths or 32nds.

Another good idea. Thanks!
  Reply With Quote
Old November 13th, 2019, 12:13 AM   #15
UncleHairball
Member
United States

UncleHairball is offline
 
Join Date: Nov 2019
Location: Califurnia
Posts: 11
Quote:
Originally Posted by kolyur View Post
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Hi everyone, I'm new to this forum Padraic LIVE PLC Questions And Answers 225 May 11th, 2015 07:00 PM
G306 HMI to Unidrive SP comms ROAMER_AUS LIVE PLC Questions And Answers 32 November 7th, 2014 09:51 AM
Parallel ICONICS GraphWorx32 HMI MY_USER.NAME LIVE PLC Questions And Answers 0 October 13th, 2014 06:22 PM
RSLinx and a New PC based HMI Steve Etter LIVE PLC Questions And Answers 4 September 19th, 2014 09:31 AM
Magelis hmi xbtg4320 and a twido plc twdlcda24drf asim_rana LIVE PLC Questions And Answers 23 February 3rd, 2012 01:37 PM


All times are GMT -4. The time now is 12:34 PM.


.