23import RapidCodeHelpers
as helpers
25rapidcode_dir = helpers.find_rapid_code_directory()
28os.add_dll_directory(
"c:\\Program Files (x86)\\INtime\\bin")
31sys.path.append(rapidcode_dir)
36 print(
"Hello, RapidCode.")
38 motionController:RapidCode.MotionController = RapidCode.MotionController.CreateFromSoftware(rapidcode_dir)
39 print(
"This object is a "+str(type(motionController)))
42 print(
"MotionController creation error count: ", motionController.ErrorLogCountGet())
43 helpers.check_errors(motionController)
45 motionController.AxisCountSet(1)
46 axis:RapidCode.Axis = motionController.AxisGet(0)
47 helpers.check_errors(axis)
49 print(
"Axis ",axis.NumberGet(),
" creation error count: ", axis.ErrorLogCountGet())
51 axis.MoveRelative(2, 10, 1, 1, 50)
53 while not axis.MotionDoneGet():
54 print(
"Position: ", axis.CommandPositionGet(),
" Velocity: ", axis.CommandVelocityGet())
60if __name__ ==
'__main__':