Discussion
UR5e Homing |
34 views
|
Answered | |
/ Most recent by bcastets
in Programming
|
5 comments |

I am working on a program sequence for our UR5e robot. When the program is interrupted or stopped, or after digital input 1 (button for program stop) is activated, the robot should be driven to the safe home position upon activation of digital input 2 (button for home travel).
I have already tried it with URScript and the following code:
URScript program to drive to safe home position after program stop or digital input interruption Define the safe home position home_pose = p[0.1, -0.5, 0.3, -1.57, 0, 0]
Wait for program stop or activation of digital input 1 while True: if not is_program_running() or get_digital_in(1): break sleep(0.1)
Wait for activation of digital input 2 while True: if get_digital_in(2): break sleep(0.1)
Drive to the safe home position movej(home_pose, a=1.2, v=0.25)
However, there is always a syntax error...
Does anyone have any ideas or are there other possibilities?
Thank you very much!
However you can move the robot to home position using a if continuous check statement and request the robot to move if the digital input is at True. You can use regular nodes to do that, you don't need to use scripting.
Scripting open more possibility but it is not so easy to debug.
If you want to do that when the program is stopped i think it needs to be done from outside. Something like a pc could monitor robot state via modbus for example and request program execution to go to home position via ur client interface.
Würde diese Routine funktionieren?
Stellen Sie die sichere Ausgangsposition zu Beginn des Programms ein, um sicherzustellen, dass sich das System in einem sicheren Zustand befindet, bevor Sie das Programm ausführen.
Starten Sie das Programm mit Digitaleingang 2 und warten Sie, bis das Signal Digitaleingang 0 hoch ist, um fortzufahren.
Wenn das Signal am Digitaleingang 0 erkannt wird, fahren Sie mit der Programmausführung fort.
Wenn das Programm mit dem digitalen Eingang 0 beginnt und der digitale Eingang 2 niedrig ist, wird es nicht angehalten
- Would this routine work?
- Set the safe home position at the start of the program to ensure the system is in a safe state before running the program.
- Start the program with digital input 2 and wait until the digital input 0 signal is high to continue.
- If the signal on digital input 0 is detected, continue the program execution.
- If the program starts with digital input 0 and digital input 2 is low, it will not stop
It sounds possible to process like this. You could give it a try !