Connecting to ThorLabs PAX1000 Polarimeter using Test & Measurement Tool
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Greetings,
I have a ThorLabs PAX1000 polarimeter connected via USB to a 64 bit Windows 7 machine running Matlab R2015a 64bit. I am attempting to use Matlab to automate some measurements. The vendor software is working fine which implies that the drivers are installed correctly. However, I don't see any drivers for the device listed in the Test & Measurement Tool.
I have attached the section of the device manual which discusses the driver files, and a screen shot from the Test & Measurement Tool where you can see that the device is detected under USB, but no PAX drivers are listed.
Is it possible to use the VXI drivers with Matlab for this device, if so, how do I proceed?
Thanks, Ryan
2 Kommentare
Walter Roberson
am 21 Jun. 2018
You should be able to use VISA for that device, according to the documentation.
What shows up for
instrhwinfo('visa')
Antworten (1)
Kien Phan Huy Kien Phan Huy
am 18 Okt. 2019
Here is my code
clear all
close all
clc
% Check VISA object (Uncomment and run the first time to get your device ID)
%out4 = instrhwinfo('visa','agilent')
%out4.ObjectConstructorName
% Create VISA Object given the device ID
tlpax=visa('agilent', 'USB0::0x1313::0x8031::M00547469::0::INSTR');
% Connect PAX 1000
fopen(tlpax)
% Identify Thorlabs PAX 1000
fprintf(tlpax, '*IDN?');
data = fscanf(tlpax) % Expected return is 'THORLABS,PAX1000IR2/M,M00547469,1.0.3'
% Measurement in mode 9
fprintf(tlpax,'SENS:CALC 9;:INP:ROT:STAT 1');
% get measurement
fprintf(tlpax,'SENS:DATA:LAT?');
messagetxt = fscanf(tlpax);
message=str2num(messagetxt);
% Convert data to conventional units
mode=message(3)
az=message(10)*180/pi % in °
ellip=message(11)*180/pi % in °
DOP=message(12)*100 % in %
P=message(13)*1e3 % in mW
% Compute normalized Stokes parameters
Psi=message(10);
Chi=message(11);
S1=cos(2*Psi)*cos(2*Chi) % normalized S1
S2=sin(2*Psi)*cos(2*Chi) % normalized S2
S3=sin(2*Chi) % normalized S3
% Disconnect PAX 1000
fclose(tlpax);
delete(tlpax);
clear tlpax
8 Kommentare
Sam
am 19 Nov. 2020
Bearbeitet: Sam
am 19 Nov. 2020
Just to give a potential solution:
I remvoved this line :fprintf(tlpax,'SENS:CALC 9;:INP:ROT:STAT 1');
from the loop and that seemd to solve the problem I was having. Although, I have to add in pause(.04) between fprintf(tlpax,'SENS:DATA:LAT?'); and storing it in a matrix, which leads to my secondary problem occasionaly.
Siehe auch
Kategorien
Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!