MATLAB Answers

Connecting to ThorLabs PAX1000 Polarimeter using Test & Measurement Tool

2 views (last 30 days)
Ryan
Ryan on 20 Jun 2018
Commented: Sunny Hsu on 6 Dec 2019
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 Comments

Ryan
Ryan on 21 Jun 2018
This is what I see using instrhwinfo:
instrhwinfo('visa')
HardwareInfo with properties:
InstalledAdaptors: {'ni'}
JarFileVersion: 'Version 3.7'
instrhwinfo('vxipnp')
HardwareInfo with properties:
InstalledDrivers: {'niFgen' 'niRFSA' 'niScope'}
VXIPnPRootPath: 'C:\Program Files\IVI Foundation\VISA\Win64'

Sign in to comment.

Answers (1)

Kien Phan Huy Kien Phan Huy
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

  2 Comments

Sunny Hsu
Sunny Hsu on 6 Dec 2019
Hi KK,
I wonder where was the very specific commands 'SENS:CALC 9;:INP:ROT:STAT 1' and 'SENS:DATA:LAT?' defined? Can someone share the PAX1000 polarimeter related programmer reference documentation if it exists?
SH

Sign in to comment.

Sign in to answer this question.