New AWG M8199A now included

ExfoLaser now uses GPIB
minor stuff
This commit is contained in:
Silas Labor Zizou
2025-03-03 09:13:16 +01:00
parent 492f889dce
commit 6570746d17
9 changed files with 211 additions and 141 deletions

View File

@@ -53,11 +53,8 @@ classdef OptAtten < handle
try
%connect to device
v = visadev('TCPIP::134.245.243.248::INSTR');
debug = 0;
if debug
disp(['Connected to Instrument: ',char(v.Vendor),' ',char(v.Model),' SerNo:',char(v.SerialNumber)]);
@@ -279,6 +276,10 @@ classdef OptAtten < handle
cnt = cnt+1;
end
fprintf("\n SET: CH1 %.2f dB | CH2: %.2f dB | CH3: %.2f dB | CH4: %.2f dB\n",obj.value_state(1), obj.value_state(2), obj.value_state(3), obj.value_state(4));
fprintf(" ATT: CH1 %.2f dB | CH2: %.2f dB | CH3: %.2f dB | CH4: %.2f dB\n",obj.atten_state(1), obj.atten_state(2), obj.atten_state(3), obj.atten_state(4));
fprintf(" POW: CH1 %.2f dBm | CH2: %.2f dBm | CH3: %.2f dBm | CH4: %.2f dBm \n \n",obj.power_state(1), obj.power_state(2), obj.power_state(3), obj.power_state(4));
delete(v);
catch error
@@ -292,7 +293,12 @@ classdef OptAtten < handle
end
end
function [p1,p2,p3,p4]=readPower(obj)
function [p1,p2,p3,p4]=readPower(obj, options)
arguments
obj
options.silent = 0
end
v = visadev('TCPIP::134.245.243.248::INSTR');
cnt = 1;
@@ -309,6 +315,9 @@ classdef OptAtten < handle
p3 = obj.power_state(3);
p4 = obj.power_state(4);
if options.silent == 0
fprintf("\n CH1: %.2f dB | CH2: %.2f dB | CH3: %.2f dB | CH4: %.2f dB\n \n",p1, p2, p3, p4);
end
end
end