New AWG M8199A now included
ExfoLaser now uses GPIB minor stuff
This commit is contained in:
@@ -22,7 +22,7 @@ classdef AwgKeysight
|
||||
% AWG.upload("Signal4",Signal);
|
||||
|
||||
|
||||
properties(Access=protected)
|
||||
properties(Access=public)
|
||||
model awg_model
|
||||
%fdac double
|
||||
skews double
|
||||
@@ -209,8 +209,7 @@ classdef AwgKeysight
|
||||
% read/write lock file to our ntserver/scratch
|
||||
try
|
||||
obj.check_lock(char(obj.model),1);
|
||||
obj.lock_device(char(obj.model));
|
||||
|
||||
obj.lock_device(char(obj.model));
|
||||
catch
|
||||
warning('Could not reach ntserver to write lock!')
|
||||
end
|
||||
@@ -221,9 +220,14 @@ classdef AwgKeysight
|
||||
v = visadev('TCPIP0::zizou.tf.uni-kiel.de::hislip0::INSTR');
|
||||
case awg_model.M8199B
|
||||
v = visadev('TCPIP0::localhost::hislip0::INSTR');
|
||||
case awg_model.M8199A_ILV
|
||||
v = visadev('TCPIP0::Zizou::hislip0::INSTR');
|
||||
case awg_model.M8199A_ILV
|
||||
v = visadev('TCPIP0::Zizou::hislip0::INSTR');
|
||||
end
|
||||
|
||||
debug = 0;
|
||||
|
||||
if debug
|
||||
disp(['Connected to Instrument: ',char(v.Vendor),' ',char(v.Model),' SerNo:',char(v.SerialNumber)]);
|
||||
end
|
||||
@@ -233,16 +237,17 @@ classdef AwgKeysight
|
||||
% aw=readline(v);
|
||||
% assert(obj.numChannels==sscanf(aw, '%f'),['Wrong Channel config. AWG response: ',num2str(sscanf(aw, '%f')), ' Channels']);
|
||||
|
||||
switch obj.model
|
||||
case awg_model.M8196A
|
||||
|
||||
obj.writeNcheck(v,':INST:DACM FOUR');
|
||||
obj.writeNcheck(v,':ABORt');
|
||||
obj.writeNcheck(v,sprintf(':FREQuency:RASTer %.15g;', obj.fdac));
|
||||
if obj.model == awg_model.M8196A
|
||||
|
||||
case awg_model.M8199B
|
||||
obj.writeNcheck(v,':ABORt ''M2''');
|
||||
obj.writeNcheck(v,sprintf(':FREQ ''M1.ClkGen'', %.15g;', obj.fdac));
|
||||
obj.writeNcheck(v,':INST:DACM FOUR');
|
||||
obj.writeNcheck(v,':ABORt');
|
||||
obj.writeNcheck(v,sprintf(':FREQuency:RASTer %.15g;', obj.fdac));
|
||||
|
||||
elseif obj.model == awg_model.M8199B || obj.model == awg_model.M8199A || obj.model == awg_model.M8199A_ILV
|
||||
|
||||
obj.writeNcheck(v,':ABORt ''M2''');
|
||||
obj.writeNcheck(v,sprintf(':FREQ ''M1.ClkGen'', %.15g;', obj.fdac));
|
||||
|
||||
end
|
||||
|
||||
@@ -257,8 +262,7 @@ classdef AwgKeysight
|
||||
|
||||
if segm_len > 0
|
||||
|
||||
switch obj.model
|
||||
case awg_model.M8196A
|
||||
if obj.model == awg_model.M8196A
|
||||
|
||||
% 1) TRAC DEl - delete the previous waveform
|
||||
obj.writeNcheck(v,sprintf(':TRACe%d:DELete %d', chan, segm_num));
|
||||
@@ -278,7 +282,7 @@ classdef AwgKeysight
|
||||
% 5) SET OUTPUTS ON/ OFF (generation not started at this point)
|
||||
obj.writeNcheck(v, sprintf(':OUTPut%d ON', chan));
|
||||
|
||||
case awg_model.M8199B
|
||||
elseif obj.model == awg_model.M8199B || obj.model == awg_model.M8199A || obj.model == awg_model.M8199A_ILV
|
||||
|
||||
% 1) TRAC DEl - delete the previous ch waveform
|
||||
obj.writeNcheck(v,sprintf(':TRAC:DEL ''M2.DataOut%d'', %d', chan, segm_num));
|
||||
@@ -308,8 +312,7 @@ classdef AwgKeysight
|
||||
|
||||
else
|
||||
% If no signal defined, turn off channel
|
||||
switch obj.model
|
||||
case awg_model.M8199B
|
||||
if obj.model == awg_model.M8199B || obj.model == awg_model.M8199A || obj.model == awg_model.M8199A_ILV
|
||||
obj.writeNcheck(v, sprintf(':OUTP ''M2.DataOut%d'', OFF',chan));
|
||||
end
|
||||
|
||||
@@ -318,12 +321,11 @@ classdef AwgKeysight
|
||||
end
|
||||
|
||||
% Set global output on/ off to start generation
|
||||
switch obj.model
|
||||
case awg_model.M8196A
|
||||
if obj.model==awg_model.M8196A
|
||||
|
||||
obj.writeNcheck(v,':INIT:IMMediate');
|
||||
|
||||
case awg_model.M8199B
|
||||
elseif obj.model == awg_model.M8199B || obj.model == awg_model.M8199A || obj.model == awg_model.M8199A_ILV
|
||||
|
||||
% SET Ref clock out (which is conn. to scope) to 10 MHz
|
||||
obj.writeNcheck(v, ':OUTPut:FREQuency ''M1.RefClkOut'',10000000');
|
||||
@@ -331,7 +333,7 @@ classdef AwgKeysight
|
||||
% :OUTP:GLOB 'M1.System', OFF
|
||||
obj.writeNcheck(v, ':OUTP:GLOB ''M1.System'', ON');
|
||||
obj.writeNcheck(v, ':OUTP:GLOB ''M2.System'', ON');
|
||||
obj.writeNcheck(v,':INIT:IMMediate ''M2''');
|
||||
%obj.writeNcheck(v,':INIT:IMMediate ''M2''');
|
||||
end
|
||||
|
||||
% operation ceomplete (opc)
|
||||
|
||||
Reference in New Issue
Block a user