Zero External Axis in Rapid
I need reset an external axis to zero using RAPID code. The IndReset command only resets the axis to a multiple of 360 away from the original value.
PROC AxisReset()
VAR num regAXIS:=0;
VAR num regFK:=0;
WHILE regFK<> 3 DO
IndAMove M7, 1ToAbsNum:=regAXIS, 5;
WaitUntil IndInpos(M7,1)=TRUE;
TPErase;
TPReadFK regFK,"What direction?","","Left","Reset","Right","";
TEST regFK
CASE 2:
regAXIS:=regAXIS-2;
CASE 4:
regAXIS:=regAXIS+2;
ENDTEST
ENDWHILE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!Axis reset command here
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ENDPROC
This is on an S4C robot.
What I am looking to do is something like this.
PROC AxisReset()
VAR num regAXIS:=0;
VAR num regFK:=0;
WHILE regFK<> 3 DO
IndAMove M7, 1ToAbsNum:=regAXIS, 5;
WaitUntil IndInpos(M7,1)=TRUE;
TPErase;
TPReadFK regFK,"What direction?","","Left","Reset","Right","";
TEST regFK
CASE 2:
regAXIS:=regAXIS-2;
CASE 4:
regAXIS:=regAXIS+2;
ENDTEST
ENDWHILE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!Axis reset command here
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ENDPROC
Liam Wallace
0
Comments
-
Hello Liam,Unfortunately there is no command in the RAPID Independent Axis function that will zero the axis after a motion. I can only suggest that after a reset, move the axis back to zero if that would work.Kind Regards,Steve0
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)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings