模拟事件添加到一个程序使用Python API可打印版本 + - RoboDK论坛(//www.w5838.com/forum) + - - -论坛:RoboDK (EN) (//www.w5838.com/forum/Forum-RoboDK-EN) + - - -论坛:通用RoboDK问题(//www.w5838.com/forum/Forum-General-questions-about-RoboDK) + - - -线程:添加模拟事件程序使用Python API (/ Thread-Add-simulation-events-to-a-program-using-Python-API) |
模拟事件添加到一个程序使用Python API- - - - - -neurotek- - - - - -12-13-2018 你好, 是否可以添加模拟事件从Python API程序吗? 如。 sorter_tray_manipulate = RDK.Item (“sorter_tray_manipulate”) sorting_destination_frame = RDK.Item (“sorting_destination_frame”) 掠夺=RDK。AddProgram (“New_Program”) 掠夺。AddSimualtionEvent (type = EVENT_TYPE_ATTACH, tcp = sorter_tray_manipulate) 掠夺。AddSimualtionEvent (type = EVENT_TYPE_DETACH_ALL attach_frame = sorting_destination_frame) RE:添加模拟事件程序使用Python API- - - - - -艾伯特- - - - - -12-13-2018 这是不可能的。相反,我建议你添加一个程序调用一个宏,它引起一个定制的事件。 举个例子,如果你想东西粘在一个特定的点你的程序(如抓住对象和你的机器人工具): 程序= RDK.AddProgram (“YourProgram”) … 程序。RunInstruction (YourEvent, INSTRUCTION_CALL_PROGRAM) … 然后,程序“YourEvent”可以是一个Python宏观RoboDK站中是这样的: object.setParentStatic(工具) 这将把对象的工具。更多的信息关于这个函数: //www.w5838.com/doc/en/PythonAPI/robolink.html robolink.Item.setParentStatic |