FactoryTalk View / Compactlogix Changing 0.000 - 0.630 on Display to -0.315 to +0.315

Join Date
Aug 2016
Location
Virginia
Posts
343
Good Morning ,

On my Panelview Plus ( CompactLogix ) I have a knife position that is showing 0.000 to 0.630 on my HMI and also my program . I took notice
that this knife postion goes below the center line , so I would like to display
this number as -0.315 to +0.315 . I don't have any adjustment on my Linear Position Sensor. What would be the best way to make 0.000 to 0.630 show as -0.315 to +0.315 on my HMI ?

I know there are some instructions to invert a value , but this is under and above the centerline .

Thanks so much again for your help.
 
If you search SCL in the help file it will show you the formula to use. I just tried it with the CPT instruction and got the results you wanted.

I Created the following REAL tags but you could hard code it in the formula if you parameters are not going to change.
IN = Value coming from device
RawMin = 0
RawMax = .63
EuMin = -.315
EuMax = .315

Expression in the Compute instruction was this ((IN-RawMin)*((EUMax-EUMin)/(RawMax-RawMin)))+EUMin

Hardcode is this (IN-0.0)*(.315 - -.315)/(.63-0.0)+ -.315
 
Thanks so much for taking the time to try this code out.

So you are saying that the following expression will take the 0.000 to .630
and allow that to scale -.315 to 0.00 and from 0.00 to +.315 ? The journey of the magnet will cover this span.
---------------------------------------------------------------------------------------
Expression in the Compute instruction was this ((IN-RawMin)*((EUMax-EUMin)/(RawMax-RawMin)))+EUMin.

I Created the following REAL tags but you could hard code it in the formula if you parameters are not going to change.
IN = Value coming from device
RawMin = 0
RawMax = .63
EuMin = -.315
EuMax = .315
 
Thanks . It will be always changing . It is a linear position sensor with a magnet .


If it is continually changing between 0.0 to 0.630, then subtracting 0.315 will give you -0.315 to +0.315, which is, I believe, what you asked for on the HMI.
 

Similar Topics

Good Morning , We have a HMI application that has not saved recipes since it was put in a few years ago. Just briefly I looked at the...
Replies
4
Views
2,859
Hi, I have just made some changes on a panelview program and have hit a roadblock. :banghead: For some background info, the panelview communicates...
Replies
2
Views
3,997
Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
97
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
1
Views
77
Hello, We recently upgraded our control server to a newer model. After the transition we are experiencing issues with our trend graphs to where...
Replies
2
Views
106
Back
Top Bottom