Numerical operation including decimal point in WinC function

Document ID : KB000115953
Last Modified Date : 01/10/2018
Show Technical Document Details
Question:
The calculation result of the numerical value including the decimal point does not become the correct value in the WinC function.
Environment:
Plex 6.x 7.x
Answer:
Please use the assignment operator "ROUND =" when performing calculations. When calculating in action diagram using fixed decimal numbers in C ++, there is no error unless intermediate value (in case of composite calculation) or result value overflow (overflowed) after being once passed to fixed decimal type must. However, if have received a value from a Double or Float type and have a decimal value at that point, since it is already an approximation, errors may occur, so the use of the "ROUND =" assignment operator Recommended.