25if platform.system() ==
"Windows":
26 os.add_dll_directory(
"c:\\Program Files (x86)\\INtime\\bin")
28import RapidCodeHelpers
as helpers
31rapidcode_dir = helpers.find_rapid_code_directory()
32sys.path.append(rapidcode_dir)
33import RapidCodePython
as RapidCode
36 print(
"Hello, RapidCode.")
38 creation_params:RapidCode.CreationParameters = helpers.get_creation_parameters()
39 motionController:RapidCode.MotionController = RapidCode.MotionController.Create(creation_params)
40 print(
"This object is a "+str(type(motionController)))
43 print(
"MotionController creation error count: ", motionController.ErrorLogCountGet())
44 helpers.check_errors(motionController)
46 motionController.AxisCountSet(1)
47 axis:RapidCode.Axis = motionController.AxisGet(0)
48 helpers.check_errors(axis)
50 print(
"Axis ",axis.NumberGet(),
" creation error count: ", axis.ErrorLogCountGet())
52 axis.MoveRelative(2, 10, 1, 1, 50)
54 while not axis.MotionDoneGet():
55 print(
"Position: ", axis.CommandPositionGet(),
" Velocity: ", axis.CommandVelocityGet())
58 motionController.Delete()
63if __name__ ==
'__main__':