Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Inserted custom code does not execute on robot

#1
I am trying to open and close my gripper which is not supported by RoboDK (Ufactory Gripper G2).  I was told I could insert code to be executed, which I did (see Prog6 in the attached RDK file).  When I run on robot, the moves execute, but the added code that I inserted to open and close the gripper is not executed.

If I generate the robot program and copy and paste the code from VSCodium into Ufactory Studio and run it, the program works (gripper opens and closes).  Why does it not work when running the program from RoboDK with the Run on Robot selected?  This is a major detriment to debugging as I can't use my gripper at all.

Also, and much less important... when I select Send Program to Robot, it does not get put on my robot... where does it go and how do I get it to the robot?


Attached Files
.rdk   DEBUR Fusion Import rev 3.rdk (Size: 1.78 MB / Downloads: 40)
#2
I understand you are trying to use the driver.

Did the following commands related to the gripper work for you?
Code:
    robot.UARMAPI.set_gripper_g2_position(pos=80, speed=100, force=100, wait=True)
We may need to implement a passthrough to run custom commands to drive the gripper for uFactory.
#3
Yes, when I export the program with the " robot.UARMAPI.set_gripper_g2_position(pos=80, speed=100, force=100, wait=True)" complete with the indent (spaces) command in it, copy it into Ufactory Studio and run it, it does work. The gripper does open and close properly. However, in debugging a program (any program) in RoboDK using "run on robot" the command does not execute on the robot (gripper does not open or close).

I would expect when running on robot to step through my program, when it hits this inserted code command it would execute on the robot... it does not. This is a major hindrance to building and testing a program, one of the major advantages of RoboDK. I need to be able to actuate the gripper within RoboDK as I step through my program. How do I do that?
#4
Can you test with this new version for Windows? This will allow you to run the robot.UARMAPI commands properly the same way you do with the post processor.

You can download it here:
https://drive.google.com/open?id=1WRVBDE...p=drive_fs

We'll soon make this new version public.
#5
I have a consistent problem with running Prog7 for the first time, both in RoboDK 6.0.6.26902 and 6.0.7.26916.  I connect to the robot and then run Prog7 for the first time.  The robot makes the first move and then stops,.  The connection status says working for like 60 seconds and then goes back to ready.  It never completes the moves (I waited several minutes to make sure).  I disconnect from the robot, move the robot back to the home position using Ufactory Studio, then reconnect to the robot in RoboDK and rerun Prog7. This time it actually completes all the moves, but the gripper never opens or closes.  When the program completes, it says working for over a minute before going back to ready... but I can now run the program over and over (but the gripper never opens or closes).
 
The driver log files from both 6.0.6 and 6.0.7 are attached, and as you can see the joint move calls, but no calls are made to open or close the gripper.


Attached Files
.txt   Driver_Log_File_RoboDK 6.0.6.26902.txt (Size: 1.67 KB / Downloads: 5)
.txt   Driver_Log_File_RoboDK 6.0.7.26916.txt (Size: 4.17 KB / Downloads: 7)
.rdk   DEBUR Fusion Import rev 3.rdk (Size: 1.78 MB / Downloads: 4)
#6
You should implement the following edits to make program calls work with the driver:
  1. You should use the Program call option (not the insert code option)
  2. You should make sure that you trigger program calls using the driver in Tools-Options-Driver, and check the option Trigger program calls on the robot
  3. You should also make sure there are no spaces in the program line that you want to call/trigger.
For example, in your case you should replace this line:
Code:
    robot.UARMAPI.set_gripper_g2_position(pos=0, speed=100, force=100, wait=True)
For this:
Code:
robot.UARMAPI.set_gripper_g2_position(pos=0,speed=100,force=100,wait=True)
I attached the RoboDK project with these edits (2 and 3). Let us know if you still have issues.

I noticed this will fail to work with the post processor. We'll update the post processor to make it work as well when you generate the program.


Attached Files
.rdk   DEBUR Fusion Import rev 3.1.rdk (Size: 1.78 MB / Downloads: 9)
#7
I downloaded the RDK file you provided and ran it.  It failed the Driver Log is attached.  There are 2 options for the setting "Trigger program calls on the robot", "Always" and "Only if the program is not available in RoboDK".  I tried both options, and both options produced the same error and disconnected from the robot.

I verified that the program call was exactly as you described it in the post (no spaces), so this solution does not appear to work properly.

I will also note that when I run Prog7 for the first time, the robot makes the first move then stops and never continues.  The status of the robot shows working for a minute or so then goes ready but never executes the next command.  I disconnect and reconnect the robot and rerun Prog7 and it does run to completion (or at least until it gets an error running the program call).

Thanks,


John Heimann


Attached Files
.txt   Driver Log Debur Fusion Import rev 3.1.txt (Size: 2.53 KB / Downloads: 7)
#8
The driver setting to trigger program calls through the robot has been properly changed as now I see the run program in the log.

However, there is still a space in the program call (right before wait). Can you try remove it and try again?

robot.UARMAPI.set_gripper_g2_position(pos=0,speed=100,force=100,wait=True)
  




Users browsing this thread:
1 Guest(s)