Equasion help

SMOKE

Member
Join Date
May 2006
Location
East and West of Kaos
Posts
475
We put a new HMI on a machine a PC running FT View SE.
The machine runs on an some distance values that works good for the machine but not for the display.
A register might have a value of 1281 this = 128.125 or 1283 = 128.375 or 1285 = 128.5
You get it.
Can someone help me with an equation in the expression property box of a numeric display to show the decimal point.
 
Give more details. What HMI are you using?
For a HMI numerical display box, you don't have a formula for the decimal. It's position is fixed. In the Properties box, you tell it how many digits it has, and how many digits past the decimal point. Right click on the box to see the properties.
 
It is a PC running factory talk view SE
It will end up with 3 decimals when I am done.
You can manipulate any data with a formula in the properties box if you want. I want.
The data coming from the slc is e.g. 1283.0 the last digit is how many 1/8 so the 3 is 3/8. I want to MOD it to 128.375
 
Which SLC do you have? SLC5/01,02,03,04,05?
How is this number being generated in the SLC?
Why can't you just use floating point numbers in the SLC? Then poll it with the HMI.
 
Which SLC do you have? SLC5/01,02,03,04,05?
It is a 5/05
How is this number being generated in the SLC?
It is delivered from a sql server.
Why can't you just use floating point numbers in the SLC? Then poll it with the HMI.
They are in floating point registers. Other devices need to see the number as downloaded.

I actually can do what I want while polling a direct address. Like this.

({:: DRILL]N190:1} - {:: DRILL]N190:1} MOD 10 )/ 10 + ({:: DRILL]N190:1} MOD 10 )/ 8

There is 1400 registers so in the HMI I am using PlaceHolders and 1 HMI page. So I tried this.

({#1\HOLE1} - {#1\HOLE1} % 10 )/ 10 + ({#1\HOLE1} % 10) / 8

Any time I try to use a MOD with a PlaceHolder it wont work.

I was hoping someone would come up with a different equation.
 
Just a note this is quirk 10,001 with SE. I brought up some of these quirks with an AB instructor and he referred to them as "Features".

Again I am sorry about my spelling. I even have the spell check on.
 
Ok so its going on 3 am here and I left my bed cause I know Micky is going to bust me on the Float thing. The data is in integer reggies but I am displaying then as float.Cause I am changing them to that.. Maybe. I do know if I do simple math to it like add, divide or multiply it works. I hate that these things keep me up. For sure if the focus is direct it works, but using the hmi tag for replacement it dosent. Its a feature.
The drinking was employed to aid in the sleep problem... Not working.
 
Last edited:
A register might have a value of 1281 this = 128.125 or 1283 = 128.375 or 1285 = 128.5

Just to double check; should the example from your original post be 1285 = 128.625? Otherwise it seems like the value is just truncated?
 
Slightly OT

feature

6. [common] A bug that has been documented. To call something a feature sometimes means the author of the program did not consider the particular case, and that the program responded in a way that was unexpected but not strictly incorrect. A standard joke is that a bug can be turned into a feature simply by documenting it (then theoretically no one can complain about it because it's in the manual), or even by simply declaring it to be good. “That's not a bug, that's a feature!” is a common catchphrase. See also feetch feetch, creeping featurism, wart, green lightning.

source: http://catb.org/jargon/html/F/feature.html
 
Last edited:
I don't know much about Factory Talk but I do use RSView32 quite a lot (I'm a Siemens man really).

Could you use some VBA script to get the result that you need?

to demonstrate I made a form with a test box, a label and commandbutton. The desired number eg 1234 is entered into the test box and when the button is pressed the result e.g. 123.5 is displayed in the label. The code behind the button is shown below:

Private Sub CommandButton1_Click()
Dim strNum As String
Dim strLeft As String
Dim strRight As String
Dim NumLeft, NumRight, NumResult, NumChars
strNum = CStr(Me.TextBox1.Value) 'Fetch the value to be converted as a string
strRight = Right(strNum, 1) 'Get the righthand char
NumRight = CVar(strRight) 'and convert back to a number
NumChars = Len(strNum) - 1 'Calculate the number of chars on the left
strLeft = Mid(strNum, 1, NumChars) 'generate the lefthand chars
NumLeft = CVar(strLeft) 'and convert back to number
NumResult = NumLeft + (NumRight * 0.125) 'Calculate the result
Me.Label1 = CStr(NumResult) 'Dispaly the result
End Sub


Nick
 
Problem solved

Thanks for everyone's help I installed latest roll up patch and tried the equation again and finally received an error saying that the mod instruction cannot use a float.I checked the tags and the tag type and it was set to default,apparently the default is a float,I change the tags to integer type and wallah it works.

Thanks Smoke for the post.🍻
 

Similar Topics

Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
8
Views
61
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
9
Views
94
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
318
Hi all I need help on this As in my project used Schneider TM241 controller. Now I want to communicate Elite energy meter with controller by...
Replies
3
Views
151
Back
Top Bottom