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

Python Program Generation Issues (UR)

#2
You should use:
robot.RunInstruction("Program1", INSTRUCTION_CALL_PROGRAM)

Other Examples:
robot.RunInstruction('Setting the spindle speed', INSTRUCTION_COMMENT)
robot.RunInstruction('SetRPM(25000)', INSTRUCTION_INSERT_CODE)


You can use RunInstruction on a robot item or a program item. If you call it on a program it will add the appropriate instruction as if you selected Program-Program Call Instruction, if you call it on a robot it will add appropriate code when generating your code.

More information here:
//m.sinclairbody.com/doc/en/PythonAPI/robo...nstruction

And a more complete example here:
//m.sinclairbody.com/doc/en/PythonAPI/exam...g-with-gui


Messages In This Thread
再保险:Python支持gram Generation Issues (UR) - byAlbert- 06-15-2018, 09:01 PM



Users browsing this thread:
1 Guest(s)