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

Voltage not updated when using PFM450_pythonnet.py with Kinesis Simulator #60

Open bng919 opened 2 weeks ago

bng919 commented 2 weeks ago

When using PFM450_pythonnet.py with Kinesis Simulator the following error is recorded in the simulator log, and voltage is not updated. Simulator Log attached.

Comms Processing Error: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Thorlabs.MotionControl.KinesisSimulator.Model.GenericPiezo.PrecisionPiezoSimulator.SimulateControlMode()
   at Thorlabs.MotionControl.KinesisSimulator.Model.GenericModules.GenericDeviceType1.<>c__DisplayClass18_0.<AddGetterSetterWithChannel>b__0(UInt16 cmd, Byte destination, Byte[] bytes)
   at Thorlabs.MotionControl.KinesisSimulator.Model.GenericModules.GenericDeviceBase.ProcessCommand(UInt16 cmdID, Byte destination, Byte[] data)

This issue occurs with the following two lines uncommented: https://github.com/Thorlabs/Motion_Control_Examples/blob/088a9dfc0d1ae5f3b8b51bb06ae230bc6445b0dc/Python/Benchtop/PPC00X/PFM450_pythonnet.py#L29 https://github.com/Thorlabs/Motion_Control_Examples/blob/088a9dfc0d1ae5f3b8b51bb06ae230bc6445b0dc/Python/Benchtop/PPC00X/PFM450_pythonnet.py#L102

Simulator settings Simulator type: PPC001 Precision Piezo Mode: Standard connection Stage: PFM450E

EventLog -20240905-125826.Log

Screenshot 2024-09-05 125815

TrumanMetz commented 1 day ago

Hello, Thank you for bringing this to our attention. We're currently investigating this occurrence. I will post another comment once we've discovered the source of this issue.

Bests,

Truman Metz