Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
&ACCESS RVP
DEF rsi_ext_axis_example()
; =============================================
; Copyright 2025 KUKA Hungaria Kft.
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
; =============================================

; =============================================
;
; ROS INDUSTRIAL: KUKA RSI HW INTERFACE
; Realtime UDP data exchange with
; kuka_rsi_driver using GPIO
;
; =============================================

; Declaration of KRL variables
DECL INT ret ; Return value for RSI commands

;FOLD INI
;FOLD BASISTECH INI
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)

; Move to start position
PTP $AXIS_ACT_MEAS

; Create RSI Context
ret = RSI_LOAD("rsi_ext_axis_example")
IF (ret <> RSIOK) THEN
HALT
ENDIF

; Set AxisCorr parameters to allow full range of motion
ROS_SetAxisCorrLimits("rsi_ext_axis_example")

; Activate RSI Context
ret = RSI_ACTIVATE("rsi_ext_axis_example")
IF (ret <> RSIOK) THEN
HALT
ENDIF

; Start RSI execution
ret = RSI_PROCESS_ON(#ABSOLUTE)
IF (ret <> RSIOK) THEN
HALT
ENDIF

; Sensor guided movement
RSI_MOVECORR()

; Turn off RSI
ret = RSI_PROCESS_OFF()
IF (ret <> RSIOK) THEN
HALT
ENDIF

PTP $AXIS_ACT_MEAS

END
Loading
Loading