![Coherent Solutions SwitchBlade Скачать руководство пользователя страница 32](http://html1.mh-extra.com/html/coherent-solutions/switchblade/switchblade_user-manual_2634924032.webp)
Modular Optical Switch
|
SwitchBlade
Coherent Solutions
|
SwitchBlade
(V1.4)
28
7.
Once commands have been executed in the
‘
Communicate
’ tab, clicking on the ‘
Session
Log
’ tab now shows MATLAB script code
that will perform all the commands that
were executed in the ‘
Communicate
’ tab.
8.
By clicking ‘
Save Session…
’ you are able to
save the MATLAB .m file of these executed
commands.
Figure 40 - MATLAB VISA Session Log
11.9
MATLAB Example Code: Query the MTP1000
% Find a VISA-TCPIP object. This is if the VISA object has already be
% created with tmtool etc, or has been removed from the workspace without
% first being closed (cleanly disconnected)
MTP-1000 = instrfind(
'Type'
,
'visa-tcpip'
,
...
'RsrcName'
,
'TCPIP0::192.168.1.4::inst0::INSTR'
,
'Tag'
,
''
);
% Create the ‘agilent’ VISA-TCPIP object if it does not exist
% otherwise use the object that was found.
if
isempty(MTP-1000)
MTP-1000 = visa(
'agilent'
,
'TCPIP0::192.168.1.4::inst0::INSTR'
);
else
fclose(MTP-1000);
MTP-1000 = MTP-1000 (1);
end
% Open the connection to the VISA object
fopen(MTP-1000);
% Query the MTP-1000.
response = query(MTP-1000,
'*IDN?'
);
disp(
'The *IDN query response:'
);
disp(response);
response = query(MTP-1000,
'*OPT?'
);
disp(
'The *OPT query response:'
);
disp(response);
% Close the connection to the object
fclose(MTP-1000);
% Clean up all objects.
delete(MTP-1000);
Notes
: The IP address (
192.168.1.4
) used in the code is an example only. You will need to
substitute in the IP address of your MTP1000.
Содержание SwitchBlade
Страница 1: ......
Страница 40: ...V1 4...