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,876
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
4,017
Hello all, I'm having trouble opening an application. After clicking open I'm prompted to login and after putting in username & password it...
Replies
0
Views
22
Has anyone found information on using the variable message file? I keep looking for documentation on how to implement the message file name as a...
Replies
0
Views
50
I have two identical machines running similar HMI projects, the only difference is one is done in FactoryTalk View Version 10 and the other is...
Replies
5
Views
223
Back
Top Bottom