TIA Portal - Strange Behavior with Add Function

Yes that seems to be what Jieve writes:


I disagree: OP specifically qualified what they wrote "Of course if you know your limits, then they can be applied/tested. But for the general case, using LReal covers more bases."

I think the point is that, if the problem will not fit into 53 bits (throwing away 12 for exponent and sign), it will be a 3σ or higher case.



Noone is saying "don't think about the bits;" that is after the primary lesson of this thread, IMO. But if a certain solution works for the vast majority of cases, and memory is cheap (it was not always that way, but it generally is nowadays), why not?


I too wince as the wasted memory, but I too won't be cranky about it.
 
Yes that seems to be what Jieve writes:


I disagree with the "LReals as probable first choice [..]".
1st understand the problem, then choose the solution.
Not choose a solution, then go back and change it when you have understood the problem.

Maybe I am being cranky here.
When I started we had at most 16 bit integers and shift left for multiplications and shift right for divisions. And if the multiplications or divisions where not by a multiple of 2, you had to combine multiple SHL or SHR plus ADDs or SUBs to get to the desired result.
And you had to think hard about how to not saturate and also not lose resolution.
The luxury of having floating point math available does not mean you should not understand the problem as well as the solution.


Same, but I didn't need to calculate with SHL and SHRs. Have converted old programs still where that kind math was used.
My old work colleague once telled that he started his career with 8 bits (int 256) PLCs on early 80s. It have been hard to calculate to seperate bytes and combining them later on PC.
 

Similar Topics

Hi Guys, In TIA Portal, I observed a 'Less than' Instruction transition to TRUE when the compared value is not less than the desired stated...
Replies
13
Views
4,693
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
255
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
2
Views
210
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
176
Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
12
Views
310
Back
Top Bottom