Thorlabs Linear Stage LTS150 Long Travel Stage with Matlab
Hi,
I have some trouble getting this stage to work in Matlab.
It works using the Throlabs App—Hence hardware is ok
I am able to read the serial number of the linear stage—-> The test computer does see the hardware.
But when trying to connect to the device—Matlab thinks the stage is not connected.
Anyone else may have found a solution for this issue?
Thanks,
——————- Code for future reference ——–
% Load .dll files associated with the Thorlabs motor
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.DeviceManagerCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.GenericMotorCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.IntegratedStepperMotorsCLI.dll’)
%NET.addAssembly(‘C:Program FilesThorlabsKinesisThorLabs.MotionControl.VerticalStageCLI.dll’)
import Thorlabs.MotionControl.DeviceManagerCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.ControlParameters.*
import Thorlabs.MotionControl.GenericMotorCLI.AdvancedMotor.*
import Thorlabs.MotionControl.GenericMotorCLI.Settings.*
import Thorlabs.MotionControl.IntegratedStepperMotorsCLI.*
%import ThorLabs.MotionControl.VerticalStageCLI.*
% Generate device list
Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.BuildDeviceList() % Build device list
serialNumbersNet = Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.GetDeviceList() % Get device list
serialNumbers = cell(ToArray(serialNumbersNet)) % Convert serial numbers to cell array
serial_no = serialNumbers{1} % shows correct serial number (‘45357364’)
device = LongTravelStage.CreateLongTravelStage(serial_no);%The output of this line must be suppressed
device.Connect(serial_no);
—————-Hi,
I have some trouble getting this stage to work in Matlab.
It works using the Throlabs App—Hence hardware is ok
I am able to read the serial number of the linear stage—-> The test computer does see the hardware.
But when trying to connect to the device—Matlab thinks the stage is not connected.
Anyone else may have found a solution for this issue?
Thanks,
——————- Code for future reference ——–
% Load .dll files associated with the Thorlabs motor
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.DeviceManagerCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.GenericMotorCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.IntegratedStepperMotorsCLI.dll’)
%NET.addAssembly(‘C:Program FilesThorlabsKinesisThorLabs.MotionControl.VerticalStageCLI.dll’)
import Thorlabs.MotionControl.DeviceManagerCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.ControlParameters.*
import Thorlabs.MotionControl.GenericMotorCLI.AdvancedMotor.*
import Thorlabs.MotionControl.GenericMotorCLI.Settings.*
import Thorlabs.MotionControl.IntegratedStepperMotorsCLI.*
%import ThorLabs.MotionControl.VerticalStageCLI.*
% Generate device list
Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.BuildDeviceList() % Build device list
serialNumbersNet = Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.GetDeviceList() % Get device list
serialNumbers = cell(ToArray(serialNumbersNet)) % Convert serial numbers to cell array
serial_no = serialNumbers{1} % shows correct serial number (‘45357364’)
device = LongTravelStage.CreateLongTravelStage(serial_no);%The output of this line must be suppressed
device.Connect(serial_no);
—————- Hi,
I have some trouble getting this stage to work in Matlab.
It works using the Throlabs App—Hence hardware is ok
I am able to read the serial number of the linear stage—-> The test computer does see the hardware.
But when trying to connect to the device—Matlab thinks the stage is not connected.
Anyone else may have found a solution for this issue?
Thanks,
——————- Code for future reference ——–
% Load .dll files associated with the Thorlabs motor
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.DeviceManagerCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.GenericMotorCLI.dll’);
NET.addAssembly(‘C:Program FilesThorlabsKinesisThorlabs.MotionControl.IntegratedStepperMotorsCLI.dll’)
%NET.addAssembly(‘C:Program FilesThorlabsKinesisThorLabs.MotionControl.VerticalStageCLI.dll’)
import Thorlabs.MotionControl.DeviceManagerCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.*
import Thorlabs.MotionControl.GenericMotorCLI.ControlParameters.*
import Thorlabs.MotionControl.GenericMotorCLI.AdvancedMotor.*
import Thorlabs.MotionControl.GenericMotorCLI.Settings.*
import Thorlabs.MotionControl.IntegratedStepperMotorsCLI.*
%import ThorLabs.MotionControl.VerticalStageCLI.*
% Generate device list
Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.BuildDeviceList() % Build device list
serialNumbersNet = Thorlabs.MotionControl.DeviceManagerCLI.DeviceManagerCLI.GetDeviceList() % Get device list
serialNumbers = cell(ToArray(serialNumbersNet)) % Convert serial numbers to cell array
serial_no = serialNumbers{1} % shows correct serial number (‘45357364’)
device = LongTravelStage.CreateLongTravelStage(serial_no);%The output of this line must be suppressed
device.Connect(serial_no);
—————- thorlabs, linearstage, lts150, .net MATLAB Answers — New Questions