EasyManua.ls Logo

Keysight E4428C ESG RF - Programming the Status Register System; Overview

Keysight E4428C ESG RF
404 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Keysight Signal Generators Programming Guide 153
Programming Examples
RS-232 Programming Interface Examples (ESG/PSG Only)
fopen(t);
%for writing to a file instead to see what is being output
%t=fopen('test', 'w');
% send command with filename
fprintf(t, '%s', horzcat(':MEM:DATA:FIR "', instrumentFilename, '",'));
% send type
if (isreal(timeDomainFilter))
fprintf(t, '%s', 'REAL,');
else % convert complex to a real array
fprintf(t, '%s', 'COMP,');
temp=zeros(1,length(timeDomainFilter)*2);
temp(1:2:end)=real(timeDomainFilter);
temp(2:2:end)=imag(timeDomainFilter);
timeDomainFilter=temp;
end
% output osr
fprintf(t, '%d', osr);
% send coefficients
fprintf(t, ',%g', timeDomainFilter);
% send terminator
fprintf(t, '\n');
fclose(t);
end
RS-232 Programming Interface Examples (ESG/PSG Only)
“Interface Check Using HP BASIC” on page 153
“Interface Check Using VISA and C” on page 154
“Queries Using HP Basic and RS-232” on page 156
“Queries for RS-232 Using VISA and C” on page 158
Before Using the Examples
Before using the examples: On the signal generator select the following settings:
Baud Rate - 9600 must match computer’s baud rate
RS- 232 Echo - Off
Use an RS- 232 cable, that is compatible with Table 2-2 on page 64.
Interface Check Using HP BASIC
This example program causes the signal generator to perform an instrument reset. The SCPI
command *RST will place the signal generator into a pre- defined state.
The serial interface address for the signal generator in this example is 9. The serial port used is
COM1 (Serial A on some computers). Refer to “Using RS–232 (ESG and PSG Only)” on page 61 for more
information.

Table of Contents

Related product manuals