06-15-2018, 09:01 PM
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
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