Skip to content

Commit

Permalink
Remove 5 second wait in RAPID modules, update RobotStudio resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephanie Eng committed Apr 4, 2022
1 parent 4831bf5 commit 3568b89
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 99 deletions.
Binary file modified robot_studio_resources/IRB1200_5_90.rspag
Binary file not shown.
Binary file modified robot_studio_resources/IRB1200_5_90_EXTAX.rspag
Binary file not shown.
2 changes: 0 additions & 2 deletions robot_studio_resources/TExtAxisMain.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ MODULE TExtAxisMain

! Release the EGM id.
EGMReset egm_id;

WaitTime 5;
ENDWHILE

ERROR
Expand Down
192 changes: 95 additions & 97 deletions robot_studio_resources/TRob1Main.mod
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,98 +1,96 @@
MODULE TRob1Main
!======================================================================================================
! Copyright (c) 2018, ABB Schweiz AG
! All rights reserved.
!
! Redistribution and use in source and binary forms, with
! or without modification, are permitted provided that
! the following conditions are met:
!
! * Redistributions of source code must retain the
! above copyright notice, this list of conditions
! and the following disclaimer.
! * Redistributions in binary form must reproduce the
! above copyright notice, this list of conditions
! and the following disclaimer in the documentation
! and/or other materials provided with the
! distribution.
! * Neither the name of ABB nor the names of its
! contributors may be used to endorse or promote
! products derived from this software without
! specific prior wrSitten permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!======================================================================================================

!***********************************************************
! Program data
!***********************************************************
! Home position.
LOCAL CONST jointtarget home := [[0, 0, 0, 0, 30, 0], [9E9, 9E9, 9E9, 9E9, 9E9, 9E9]];

! Identifier for the EGM correction.
LOCAL VAR egmident egm_id;

! Limits for convergance.
LOCAL VAR egm_minmax egm_condition := [-0.1, 0.1];

!***********************************************************
!
! Procedure main
!
! This RAPID code exemplify how to run EGM joint position
! motions.
!
! Note: Update the UCDevice "ROB_1" with correct
! values for the remote address and port
! (i.e. to the EGM server).
!
! Update via RobotStudio:
! Controller tab -> Configuration ->
! Communication -> Transmission Protocol
!
!***********************************************************
PROC main()
MoveAbsJ home, v200, fine, tool0;
WHILE TRUE DO

! Register an EGM id.
EGMGetId egm_id;

! Setup the EGM communication.
EGMSetupUC ROB_1, egm_id, "default", "ROB_1", \Joint;

! Prepare for an EGM communication session.
EGMActJoint egm_id
\J1:=egm_condition
\J2:=egm_condition
\J3:=egm_condition
\J4:=egm_condition
\J5:=egm_condition
\J6:=egm_condition
\MaxSpeedDeviation:=20.0;

! Start the EGM communication session.
EGMRunJoint egm_id, EGM_STOP_RAMP_DOWN, \J1 \J2 \J3 \J4 \J5 \J6 \CondTime:=5 \RampOutTime:=5;

! Release the EGM id.
EGMReset egm_id;

WaitTime 5;
ENDWHILE

ERROR
IF ERRNO = ERR_UDPUC_COMM THEN
TPWrite "Communication timedout";
TRYNEXT;
ENDIF
ENDPROC
MODULE TRob1Main
!======================================================================================================
! Copyright (c) 2018, ABB Schweiz AG
! All rights reserved.
!
! Redistribution and use in source and binary forms, with
! or without modification, are permitted provided that
! the following conditions are met:
!
! * Redistributions of source code must retain the
! above copyright notice, this list of conditions
! and the following disclaimer.
! * Redistributions in binary form must reproduce the
! above copyright notice, this list of conditions
! and the following disclaimer in the documentation
! and/or other materials provided with the
! distribution.
! * Neither the name of ABB nor the names of its
! contributors may be used to endorse or promote
! products derived from this software without
! specific prior wrSitten permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!======================================================================================================

!***********************************************************
! Program data
!***********************************************************
! Home position.
LOCAL CONST jointtarget home := [[0, 0, 0, 0, 30, 0], [9E9, 9E9, 9E9, 9E9, 9E9, 9E9]];

! Identifier for the EGM correction.
LOCAL VAR egmident egm_id;

! Limits for convergance.
LOCAL VAR egm_minmax egm_condition := [-0.1, 0.1];

!***********************************************************
!
! Procedure main
!
! This RAPID code exemplify how to run EGM joint position
! motions.
!
! Note: Update the UCDevice "ROB_1" with correct
! values for the remote address and port
! (i.e. to the EGM server).
!
! Update via RobotStudio:
! Controller tab -> Configuration ->
! Communication -> Transmission Protocol
!
!***********************************************************
PROC main()
MoveAbsJ home, v200, fine, tool0;
WHILE TRUE DO

! Register an EGM id.
EGMGetId egm_id;

! Setup the EGM communication.
EGMSetupUC ROB_1, egm_id, "default", "ROB_1", \Joint;

! Prepare for an EGM communication session.
EGMActJoint egm_id
\J1:=egm_condition
\J2:=egm_condition
\J3:=egm_condition
\J4:=egm_condition
\J5:=egm_condition
\J6:=egm_condition
\MaxSpeedDeviation:=20.0;

! Start the EGM communication session.
EGMRunJoint egm_id, EGM_STOP_HOLD, \J1 \J2 \J3 \J4 \J5 \J6 \CondTime:=5 \RampOutTime:=5;

! Release the EGM id.
EGMReset egm_id;
ENDWHILE

ERROR
IF ERRNO = ERR_UDPUC_COMM THEN
TPWrite "Communication timedout";
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE

0 comments on commit 3568b89

Please sign in to comment.