
Test Value Range for "IF"

SteveMob
✭
in RobotStudio
Hello,
I am using an "IF" statement to test the values of the robots current axis angles. I am trying to test a range for IF axis 5 is between -1 to +1 degree (all values between -1 and +1) THEN SingArea\Wrist. I know by using a FOR loop you can test values like: FOR i FROM 1 TO 10 DO... My question is, is there a way to test a range of values using an IF statement like the FOR loop?
Thanks for any help!
SM
I am using an "IF" statement to test the values of the robots current axis angles. I am trying to test a range for IF axis 5 is between -1 to +1 degree (all values between -1 and +1) THEN SingArea\Wrist. I know by using a FOR loop you can test values like: FOR i FROM 1 TO 10 DO... My question is, is there a way to test a range of values using an IF statement like the FOR loop?
Thanks for any help!
SM
Tagged:
0
Best Answer
-
Like this
IF myJoint.robax.rax_5<1 AND myJoint.robax.rax_5>-1 THEN
Per Svensson
Robotics and Vision Specialist
Consat Engineering5
Answers
-
Thanks!0
Categories
- All Categories
- 5.6K RobotStudio
- 398 UpFeed
- 20 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 327 IRC5
- 65 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 820 RAPID Programming
- 7 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings