In today's article I cover how to scale a value in a numeric display within FactoryTalk View Studio.
A reader recently reached out to me with a problem he was having.
He had a number like 411 that he wanted to be displayed as 4.11.
But when he changed the number of digits and decimal places in the numeric display's properties as shown below…
He found that while the display changed, the value didn't.
So I explained to him that while those settings wouldn't actually change the value displayed, he did have a few options to make the change he wanted.
First, I recommended he scale the value in the PLC.
That's my preference because I've found it can be very helpful to have both the raw and scaled values in the PLC when you're troubleshooting code.
But editing existing PLC code isn't always an option, so I also mentioned he could easily scale the Tag's value in the Tag's settings IF his numeric display referenced an HMI Tag .
However, when using Logix base processors most designers directly reference tags in the controller, and therefore I told him the easiest option would likely be to scale the value right there in the numeric display itself.
And that can be done by following the five simple steps below:
NOTE: Yuo can purchase “ad free” copies of our articles, videos, and sample code for $1 each here. Or become a “Patron” for as little as $1 a month and receive at least $3 worth of articles/videos/sample code free each month! Find out more here.
Step 1) With the graphic open in View Studio, double click on the numeric display in question:
Step 2) Then select the “Connections” tab:
Step 3) Then click on the “Exprn” button to open the expression editor:
Step 4) Then enter in your expression and click on “OK” and then save your graphic display.
Note: In this example I divide the Tag by 100:
Step 5) Now when you test the display (or run the project) you'll see the actually value displayed is not the tag value but instead the result of your numeric display's expression:
Watch me demonstrate this procedure below in Episode 3 of The Automation Minute Season 4:
Have a question or comment? Please feel free to leave them with us HERE.
Shawn began sharing automation news and know-how online in 1996 when he launched his first BBS. Then in 1999 he moved to the internet launching ShawnMichael.com, which he later renamed ShawnMTierney.com. In 2013 he moved his automation efforts to a new website, TheAutomationBlog.com, which has since become the most popular independent industrial automation blog on the web.
Latest posts by Shawn Tierney (see all)
- CompactLogix Training Course Now On Sale, Just $99 - November 20, 2019
- Episodes Of The Automation Minute Now Available! - November 12, 2019
- Insider News: Prepping for Automation Fair - November 8, 2019
Click HERE to scroll down to view or leave comments