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

Unable to send custom code to online robot

#7
Hi Albert,

Thanks for this information, it is incredibly useful. I think this information (exactly as you wrote it) should be in the docs. If it's already there then perhaps it's too difficult to find.

One other question: How can I specify the output directory and file name of the generated program when using RUNMODE_MAKE_ROBOTPROG_AND_START?
Right now the program is written on the Desktop, but I'd like to change that with the API if possible.

Here is my code:

Code:
RDK = RoboDK.robolink.Robolink()
RDK.ProgramStart('david_temp01', 'C:/Users/david.murray/Desktop/RoboDK Script Testing', "Universal_Robots", robot)

robot = RDK.Item('UR10', RoboDK.robolink.ITEM_TYPE_ROBOT)

RDK.setRunMode(RoboDK.robolink.RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD)


机器人。RunInstruction(“modbus_set_output_signal("v1_a", True)', RoboDK.robolink.INSTRUCTION_INSERT_CODE)
机器人。RunInstruction('sleep(2)', RoboDK.robolink.INSTRUCTION_INSERT_CODE)
机器人。RunInstruction(“modbus_set_output_signal("v1_a", False)', RoboDK.robolink.INSTRUCTION_INSERT_CODE)
机器人。RunInstruction(“modbus_set_output_register("Rail_Cmd_Pos", 900)', RoboDK.robolink.INSTRUCTION_INSERT_CODE)

机器人。Disconnect()
RDK.Finish() # Redundant?


Regards,
David


Messages In This Thread
RE: Unable to send custom code to online robot - bydavidmurray- 05-14-2019, 05:43 PM



Users browsing this thread:
1 Guest(s)