![Coherent Solutions BERTPXIe-1003 Скачать руководство пользователя страница 95](http://html1.mh-extra.com/html/coherent-solutions/bertpxie-1003/bertpxie-1003_user-manual_2634920095.webp)
PXIe Platform Bit Error Rate Tester
|
BERTPXIe-1003/1005
Coherent Solutions Ltd.
Version
1.00
94
9.7.5
MATLAB code example
The following example shows how to communicate with a PXIe module using the MATLAB
code.
% Find a VISA-TCPIP object. This is if the VISA object has already been
% created with tmtool or has been removed from the workspace without
% first being closed (cleanly disconnected).
PXIE_Chassis = instrfind(
'Type'
,
'visa-tcpip'
,
...
'RsrcName'
,
'TCPIP0::10.10.10.89::inst0::INSTR'
,
'Tag'
,
''
);
% Create the ‘agilent’ VIS
A-TCPIP object if it does not exist
% otherwise use the object that was found.
if
isempty(PXIE_Chassis)
PXIE_Chassis = visa(
'agilent'
,
'TCPIP0::10.10.10.89::inst0::INSTR'
);
else
fclose(PXIE_Chassis);
PXIE_Chassis = PXIE_Chassis (1);
end
% Open the connection to the VISA object.
fopen(PXIE_Chassis);
% Query the PXIE_Chassis.
response = query(PXIE_Chassis,
'*IDN?'
);
disp(
'The *IDN query response:'
);
disp(response);
response = query(PXIE_Chassis,
'*OPT?'
);
disp(
'The *OPT query response:'
);
disp(response);
% Replace this with a valid command for your device (read the programming
% guide section for examples)
command =
''
% Close the connection to the object.
fclose(PXIE_Chassis);
% Clean up all objects.
delete(PXIE_Chassis);
I
MPORTANT
MATLAB 2010x or later with the Instrument Control Toolbox is required to
run the code in this section.