I am trying to communicate with a piezoelectric driver made by Thorlabs, which operates with their Kinesis software. I need to use the ThorlabsGenericPiezoCLI class within the Thorlabs.MotionControl.GenericPiezoCLI assembly, however, I get an error when I try to create an instance of the class. The code is
thorlabs_asm_path = 'C:\Program Files\Thorlabs\Kinesis\';
genPiezo_asm_name = 'Thorlabs.MotionControl.GenericPiezoCLI.dll';
genPiezo_asm = NET.addAssembly(fullfile(thorlabs_asm_path,genPiezo_asm_name));
genPiezo_cls = Thorlabs.MotionControl.GenericPiezoCLI.Piezo.ThorlabsGenericPiezoCLI;
The error is
Error using Thorlabs.MotionControl.GenericPiezoCLI.Piezo.ThorlabsGenericPiezoCLI
Abstract classes cannot be instantiated. Class 'Thorlabs.MotionControl.GenericPiezoCLI.Piezo.ThorlabsGenericPiezoCLI' defines abstract methods and/or properties.
I guess my first question is how would I use the methods and properties that are within this class when it can't be instatiated? Or, if I use other subclasses that are from a different assembly but inherit from this abstract class, then do I need to instantiate this abstract class at all?