Convert Float into Integer
Ahmad
✭
Hello everyone
Can anyone please tell me how to convert float number into integer number in RAPID (RobotStudio).
For Example if ==> nPassOffs_Y:= ((2-1)/4) = 0.25 then i only need the 0. I jsut want to drop the decimal part. IS THAT Possible in RAPID?
Thanks in advance
Ahmad
????
0
Comments
-
Hi Ahmad,Use the Truncate function:nPassOffs_Y:= Trunc((2-1)/4);ornPassOffs_Y:=Trunc(nPassOffs_Y);BR,Shane0
-
Thanks Shane for your helpI will try thatthanks agianAhmad????0
-
you can use "trunc" to convert to interger (or use "Round" if you need a rounded number) .Or you can also use DIV for integer division.nPassOffs_Y:= ((2-1) DIV 4)0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings