Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert instruction code not sent in Run On Robot mode
#11
I'm sorry I never got back to this thread. It is currently not possible to send custom script code using the Instruction command.

On the other hand, you can send a program "ID" to your robot and customize the driver. Similar to this type of operation:
//www.sinclairbody.com/forum/Thread-Unable-t...75#pid3275
#12
The method works with the generation of program trough the post processor.

But is there a solution to send an ID program to the apiur( bin file) during the runonrobot mode ?
#13
Yes, this is possible, you should be able to send a program ID that you'll receive in the driver script. However, you should customize your driver script.

More specifically, you should customize the MSG_RUNPROG section of the UR side of the driver given the number of the program name:

Code:
elif mtype == MSG_RUNPROG:
prog_num = socket_read_binary_integer(1)
prog_name = socket_read_string()
如果prog_num = = 1:
Program1()
elif prog_num == 2:
Program(2)
end
break
#14
(07-09-2020, 01:09 PM)Albert Wrote:Yes, this is possible, you should be able to send a program ID that you'll receive in the driver script. However, you should customize your driver script.

More specifically, you should customize the MSG_RUNPROG section of the UR side of the driver given the number of the program name:

Code:
elif mtype == MSG_RUNPROG:
prog_num = socket_read_binary_integer(1)
prog_name = socket_read_string()
如果prog_num = = 1:
Program1()
elif prog_num == 2:
Program(2)
end
break

Hi Albert,

I understand the process you are describing about sending Program "IDs" to the driver script. You mention modifying the driver script and elaborate with the code snippet above. Could you please be more specific about what script I should be editing?

There is no editable UR driver script in the following location: C:\RoboDK\api\Robot. When you say "on the UR side of the driver", I am not sure I fully understand what you mean.

Thanks in advance! Please let me know if you need any other information!
#15
Hi Trevorb,

Please contact us via email and we'll provide you with the required files.

Albert
#16
(07-09-2020, 01:09 PM)Albert Wrote:Yes, this is possible, you should be able to send a program ID that you'll receive in the driver script. However, you should customize your driver script.

More specifically, you should customize the MSG_RUNPROG section of the UR side of the driver given the number of the program name:

Code:
elif mtype == MSG_RUNPROG:
prog_num = socket_read_binary_integer(1)
prog_name = socket_read_string()
如果prog_num = = 1:
Program1()
elif prog_num == 2:
Program(2)
end
break

I'm trying to use URscript call function to control my end effector on UR10 (set_tool_digital_out)
I'm connected to the robot and I'm using the driver.
You mentioned that we can modify the driver to call the program ID:
//www.sinclairbody.com/forum/Thread-Online-p...ght=driver

Do I include the UR scriptset_tool_digital_out"in a Python Program inside RoboDK and call its program ID on the driver?
We're still unclear on where to include the URscript "set_tool_digital_out" and call its ID in the customized driver.

Thank you in advance,
Pedram
#17
Hi Pedram,
I just got back to you on the other thread to properly map tool outputs for your UR robot.
Inserting custom code is not supported for all robots when you use the run on robot option (drivers).




Users browsing this thread:
1 Guest(s)