Thorlabs / Motion_Control_Examples

Software examples for Thorlabs motion control products (e.g. T-Cube, K-Cube, and benchtop brushless, DC, stepper, and Piezo motor controllers)
MIT License
71 stars 28 forks source link

Cannot create KCubeObject #36

Closed sethCHP closed 1 year ago

sethCHP commented 1 year ago

Anytime I try to create a KCube object I get that the object refrence does not exist. This occurs even when running the example "Python/KCube/KIM101/kim101_pythonnet.py"

The line that is failing

"device = KCubeInertialMotor.CreateKCubeInertialMotor(serial_no)"

Object reference not set to an instance of an object. at Thorlabs.MotionControl.PrivateInternal.Settings.DeviceConfigurationBase.VerifyDeviceSettingsName(Boolean replace) at Thorlabs.MotionControl.PrivateInternal.Settings.DeviceConfigurationBase.ReadConfiguration(DeviceConfigurationNode node, GeneralSettings generalSettings) at Thorlabs.MotionControl.PrivateInternal.Settings.DeviceConfigurationBase.LoadConfiguration(String serialNo, GeneralSettings generalSettings) at Thorlabs.MotionControl.KCube.InertialMotorCLI.KCubeInertialMotor.InitializeDevice(String serialNumber) at Thorlabs.MotionControl.KCube.InertialMotorCLI.KCubeInertialMotor._CreateKCubeInertialMotor(String serialNumber) at Thorlabs.MotionControl.KCube.InertialMotorCLI.KCubeInertialMotor.CreateKCubeInertialMotor(String serialNumber)

sethCHP commented 1 year ago

Bad connection between controller and computer. Switched to cable delivered with device and the code ran just fine.