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,715
Hi PLC people, think about this scenario: The PLC is somehow connected to the same network with the facilities` network. Then someone connects to...
Replies
2
Views
89
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
192
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
116
Hello, i am using profibus as communication between plc and fanuc arm. I can easily send inputs from plc to arm, but i can't monitor any outputs...
Replies
0
Views
47
Back
Top Bottom