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.
Enjoy the benefits of membership! Patreon.com/automation
Check out my affordable courses: TheAutomationSchool.com
Ask me questions by clicking here to go to the comments link
Have an industrial automation news tip? Share it with us here
- Get A TIA Portal License For $35! (Limited Time Offer) - May 20, 2020
- How To Find Your Local Siemens Automation Distributor - May 20, 2020
- How To Get A Free Copy Of TIA Portal - May 19, 2020
Click HERE to scroll down to view or leave comments