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.5K RobotStudio
- 391 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 305 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 773 RAPID Programming
- 17 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings