Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
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
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 364 IRC5
- 83 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings