Late entry, I know, but just to add a few extra options.
You should find that S7 has standard instructions ROUND, CEIL, FLOOR and TRUNC for 'trimming' REAL numbers to DINTs -
CEIL always rounds up to the next whole number (so 3.1 becomes 4, and 3.9 becomes 4);
FLOOR always rounds down to the previous whole number (so 3.1 becomes 3, and 3.9 becomes 3);
TRUNC simply throws away the portion following the decimal point (so 3.1 becomes 3, and 3.9 becomes 3)
ROUND rounds to the nearer whole number (so 3.1 becomes 3, and 3.9 becomes 4. If there are two whole numbers equally near then ROUND returns the even one. So 3.5 becomes 4).
Regards
Ken