线程评分:
  • 0投票 - 0平均
  • 1
  • 2
  • 3
  • 4
  • 5
使用Python API添加模拟事件
你好,

是否可以在Python API的程序中添加仿真事件?

例如

sorter_tray_manipulate = rdk.item('sorter_tray_manipulate')
satring_destination_frame = rdk.item('salting_destination_frame')
prog=RDKaddProgram('new_program'
PROG.ADDSIMUALTIONEVENT(type = event_type_attach,tcp = sorter_tray_manipulate)
PROG.ADDSIMUALTIONEVENT(type = event_type_detach_all,stact_frame = sarting_destination_frame)
这是不可能的。取而代之的是,我建议您将程序调用添加到引起定制事件的宏。

例如,如果您想在程序中的特定点附加某些内容(例如,使用机器人工具抓住对象):

程序= rdk.addprogram('yourprogram')
...
program.runinstruction('yourevent',consendion_call_program)
...

然后,程序“ YourEvent”可以是您的Robodk站中的python宏,可以做类似的事情:

object.setParentStatic(工具)

这将将对象连接到工具上。有关此功能的更多信息:
//www.w5838.com/doc/en/pythonapi/robo...rentstatic




用户浏览此线程:
1位客人