2-25 Programming Examples
Programming with GPIB Commands
2-64
PN: 10370-10374 Rev. F
MG369xC GPIB PM
2-25 Programming Examples
provide three examples of GPIB programming using the MG369xC
command codes.
The following subroutine uses the output identify (
OI
) command to identify the signal generator’s model
number, serial number, minimum and maximum frequencies, minimum and maximum power level, and
software revision level. This subroutine is used in the example programs in
and
to read the limits of the signal generator.
10 ! “GET OI”
20 ! Gets the output id string
30 ! from a MG36XX Synthesizer
100 OUTPUT 705; “OI”
110 DIM A$[36]
120 ENTER 705; A$
130 M$=A$[1,2] ! Model
140 M1$=A$[3,4] ! Model Number
150 F1$=A$[5,9] ! Freq Low
160 F2$=A$[10,14] ! Freq High
170 L2$=A$[15,20] ! Min Power
180 L1$=A$[21,24] ! Max Power
190 S$=A$[25,28] ! Software Ver
200 S1$=A$[29,34] ! Serial Number
210 P$=A$[35,35] ! Model Prefix
220 S2$=A$[36] ! Series
230 PRINT “Model Number :”;M$;S2$;M1$;P$
240 PRINT “Serial Number :”;S1$
250 PRINT “Low Freq :”;F1$
260 PRINT “High Freq :”;F2$
270 PRINT “Max Power :”;L1$
280 PRINT “Min Power :”;L2$
290 PRINT “Software Ver :”;S$
300 END
Program Explanation:
Line 100: Sends the “OI” command.
Line 110: Dimensions the variable.
Line 120: Gets the “OI” string.
Line 130: Sets M$ to the model (36).
Line 140: Sets M1$ to the model number .
Line 150: Sets F1$ to the signal generator low-end frequency.
Line 160: Sets F2$ to the signal generator high-end frequency.
Line 170: Sets L2$ to the minimum power point.
Line 180: Sets L1$ to the maximum power point.
Line 190: Sets S$ to the software version number.
Line 200: Sets S1$ to the serial number.
Line 210: Sets P$ to the model prefix number ( ).
Line 220: Sets S2$ to the model series (A, B or C).
Lines 230–290: Prints the data obtained.
Figure 2-18.
Using the Output Identify (OI) Command
Содержание MG369 C Series
Страница 2: ......
Страница 6: ...Contents 4 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 262: ...A 34 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 264: ...Index 2 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 265: ......