Complex Math Problem, Atleast to me

MATT116

Member
Join Date
Dec 2009
Location
Dallas, TX
Posts
330
RSLogix 5000 V24
1756-L72

Trying to figure out the best way to solve this problem.

TCF = e ˄ 1100(1/298 - 1/T)

Where T = °C + 273.15
TCF Temperature Correction Factor

I'm not sure why when I divide 1/298 I get 3.35570471e-003 and not 0.003355704

I have ladder, function block and structured text at my disposal.

Thanks
 
Those two numbers are the same the first version is in scientific format (possibly engineering) the second is in standard decimal.

To get decimal from scientific move the decimal the amount of places and direction specified in the exxx that represents 10^x so e-003 means

3.3557047 * 10^-3
 
Scientific format is useful to display very large numbers or very small decimals.

Most programs do not recognize p, n, u, m, k, M, G (pico, nano, micro, milli, kilo, mega, giga) to remove excess zeros because using these CAN result in ambiguity in the number, scientific notation removes this ambiguity while removing excess 0's

ie 3G = 3,000,000,000 = 3 billion = 3 * 10^9 or 3e9

One thing to watch for not every program will use or recognize the "e (E)" notation
 
To further clarify, the 'e' in your formula (the base of natural log or 2.718281828) is not the same as the 'e' in '3.35570471e-003' were it means 'exponent' as explained in dlweber's posts.
 
To further clarify, the 'e' in your formula (the base of natural log or 2.718281828) is not the same as the 'e' in '3.35570471e-003' were it means 'exponent' as explained in dlweber's posts.

Good catch, I had that feeling I missed something important in there.
 
Thanks guys for the clarification and I understand what your saying
But I still cant seem to get the correct result in the PLC
Assuming T = 298.15 I should have a result of 8.94 but I get 1.0018588 in the PLC
 
Off the top of my head I don't know without seeing the math being done, however typically (in any programming) order of operations, or a data type conversion at the wrong time is what I have seen and done to have bad math.
 
1.0018588150955565495100727303679

is what I get from the windows calculator doing the formula

I don't have my tablet with my fancy calculator app on it
 
Using the exact calculation you have in the CPT box yields 1.0018588.
Not sure why you think it should be different. The formula results appear accurate to me...
 
Is the 1/298-1/T supposed to be in the exponent?

In your Wolfram Alpha they are not, in your PLC they are

Double check your formula

One of them is incorrect
 

Similar Topics

Hello. I'm still on my first major project in S7 and have a rather simple problem that I can't quite put into S7 terms. The problem is simple...
Replies
8
Views
2,482
I have a very complex math need to finish in S7 like: (X1-A)*Y1+(X2-A)*Y2+(X3-A)*Y3 ... +(X20-A)*Y20 Is there some good way to do that? Or I...
Replies
30
Views
7,690
Yes it's very legacy.. but sometimes it's necessary to use old stuff for fun.. and because it's so much cheaper. Crimson 3.0 had the ability to...
Replies
4
Views
1,620
Hello all, I am fairly new to programming HMI's and am working with Crimson 3.1 for the first time. I am trying to recreate an annunciator of...
Replies
12
Views
6,375
What application in your experience has demanded the most complex PLC program? I suppose I should clarify what manner "complex" I'm asking about...
Replies
37
Views
12,521
Back
Top Bottom