Forum
Trouble with decimal precision
Quote from Henrique Núñez on October 6, 2020, 3:07 pmHello, im using FOCAS2 for pulling data from a 0i-F CNC.
Using the library, and following the tips in the posts, i could get values from axes (not all together, if someone know how to do it let me know please), but they are delivered as integers, not as floating point values.
For instance, if my CNC displays X = 202.987, on my C# code the value is plain 202, even if it's double. Anyone know what can be happening? Thank you.
Hello, im using FOCAS2 for pulling data from a 0i-F CNC.
Using the library, and following the tips in the posts, i could get values from axes (not all together, if someone know how to do it let me know please), but they are delivered as integers, not as floating point values.
For instance, if my CNC displays X = 202.987, on my C# code the value is plain 202, even if it's double. Anyone know what can be happening? Thank you.
Quote from Henrique Núñez on October 7, 2020, 1:30 pmSolved it. The problem was between the keyboard and the chair.
It was just related to floating point casting before performing division.
Solved.
Solved it. The problem was between the keyboard and the chair.
It was just related to floating point casting before performing division.
Solved.