You are on page 1of 18

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

Rev. #

Revised

1.0

YJ Liao

7/4/2003

Initialization

1.1

YJ Liao

8/25/2003

Add Note in example

1.2

YJ LIao

9/9/2003

Correct the index of SPAN command.

1.3

YJ Liao

10/9/2003

Add Delay

1.4

YJ Liao

2/11/2004

Returned OK in gray color

1.5

Claire Tsai

8/19/2004

Add Limit line commands

Author

Approved

YJ Liao

Date

Description

Signature

Date

Document Title

YJ Liao

10/9/2003

GSP827 Command List

Check

Document Number

Approval
Goodwill Instrument Co., LTD.
No. 95-11, BAO-CHUNG ROAD,
HSIN-TIEN CITY, TAIPEI HSIEN,
TAIWAN

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

GSP827 Command List


Note in examples
1. Returning message OK returns only for the software version V1.02 and below. (V0.94, V1.01).
2. Characters in italics represent the returning messages.
3. ^ means space.
4. Delay time is recommended only for reference. It could differ from different application.
5. All the Marker ( MEAS:MARK:xxxx) and Peak (MEAS:PEAK:xxxx) functions are available only for MM mode ON.
Command List

<parameter>

Description

Delay
(ms)

300
300

*CLS
*ESE

Parameters
(The unit is not case sensitive).

Example
(^ :space)

Clear Status Command

*CLS

Standard Event Status Enable

*ESE

Command

500

*ESE?

*ESE?
Standard Event Status Enable Query

500

*ESR?

Standard Event Status Register

*ESR?

Query

*IDN?

500
300
500
300
300

*OPC

*OPC?
*RST
*SRE

Identification Query

*IDN?

Operation Complete Command

*OPC

Operation Complete Query

*OPC?

Reset Command

*RST
*SRE

Service Request Enable Command


*SRE?
*STB?
*TST?
*WAI
MEASure

FREQuency

CENter

<value><unit

500
500
500
300

Service Request Enable Query

*SRE?

Read Status Byte Query

*STB?

Self-Test Query

*TST?

500

Set the center frequency

Wait-to-Continue Command

>
MEASure

FREQuency

500

CENter?

Query the center frequency in kHz

*WAI
Range: From 9k to 2.7GHz. Unit can be kHz,

MEAS:FREQ:CEN^100000^kHz

MHz and GHz

OK

Reply: <value>

<unit>

MEAS:FREQ:CEN?
100000.0^kHz

MEASure

FREQuency

STart

<value><unit

500

Set the start frequency

>
MEASure

FREQuency

STart?

500

Query the start frequency in kHz

Range: From 9k to 2.7GHz. Unit can be kHz,

MEAS:FREQ:ST^50^MHz

MHz and GHz

OK
MEAS:FREQ:STP?
100000.0^kHz

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure

FREQuency

SToP

<value<unit>

500

Set the stop frequency

>
MEASure

FREQuency

500

SToP?

Range: From 9k to 2.7GHz. Unit can be kHz,

MEAS:FREQ:STP^200^MHz

MHz and GHz

OK

Query the stop frequency in kHz

MEAS:FREQ:STP?
200000.0^kHz

MEASure

FREQuency

StepSize

<value>

1000

<unit>
MEASure
MEASure

FREQuency

500

StepSize?

SPAN

<index>

500

Set the step size of the frequency

Range: From 0 to 2.7GHz. Unit can be kHz, MHz MEAS:FREQ:SS^10MHz

settings

and GHz

OK

Query the step size of frequency

MEAS:FREQ:SS?

settings

10000.0^kHz

Set Span

<unit>

Sets span from 0 to 2.7GHz in index 0 to 21.

MEAS:SPAN^9 (set the span to

0=Zero Span, 1=1kHz, 2=2kHz, 3=5kHz,

1MHz)

4=10kHz, 5=20kHz, 6=50kHz, 7=100kHz,

OK

8=200kHz, 9=500kHz, 10=1MHz, 11=2MHz,


12=5MHz,

13=10MHz, 14=20MHz, 15=50MHz,

16=100MHz, 17=200MHz, 18=500MHz,


19=1GHz, 20=2GHz, 21=2.5GHz,22=Full Span.
MEASure

SPAN

FULL

2000

Set span to full span

MEASure

SPAN

ZERO

2000

Set span to zero span

MEASure

SPAN

LAST

200

Set span back to last span

MEASure

SPAN?

500

Query SPAN

MEAS:SAPN:FULL
OK
MEAS:SPAN:ZERO
OK
MEAS:SPAN:LAST
OK
MEAS:SPAN?
OK

MEASure

REFLevel

<value>

1000

Set reference level

<reflvlunit>

+20 dBm to -50 dBm or

MEAS:REFL^0^dBm

127 dBuV to 57 dBuV or

OK

67 dBmV to -3 dBmV or

MEAS:REFL^107^dBuV

-12.9 dBm/Hz to -82.9 dBm/Hz @ 3k RBW

OK

-22.9 dBm/Hz to 92.9 dBm/Hz @ 30k RBW


-32.9 dBm/Hz to 102.9 dBm/Hz @ 300k RBW
-44.1 dBm/Hz to 114.1 dBm/Hz @ 4M RBW
The unit has to be identical to the unit in use.
Otherwise the error message will appear.
MEASure

REFLevel?

MEASure

REFLevel

500

Query reference level

MEAS:REFL?
-30^dBm

SCALE

<value>

1000

Set amplitude scale

10, 5, 2, 1

MEAS:REFL:SCAL^5
OK

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure

REFLevel

500

SCALE?

Query the amplitude scale

MEAS:REFL:SCAL?
5

MEASure

REFLevel

UNIT

MEASure

REFLevel

UNIT?

MEASure

MARKer

MODE

MEASure

MARKer

MEASure

<unit>

1000

Set the amplitude unit

dBm, dBuV, dBmV, dB/Hz

MEAS:REFL:UNIT^dBuV
OK

500

Query the amplitude unit

<value>

500

1 to turn MM mode on,

MODE?

<value>

500

MARKer

ON

<value>

MEASure

MARKer

OFF

MEASure

MARKer

SELect

MEASure

MARKer

MEASure

MEAS:REFL:UNIT?
0,1

dBuV
MEAS:MARK:MODE^1
OK

Set selected marker(MM on)

0~9

MEAS:MARK:OFF^1
OK

500

Set selected marker(MM on) ,

0~9

MEAS:MARK:ON^1
OK

<value>

500

Set selected marker(MM on)

0~9

MEAS:MARK:OFF^1
OK

<value>

350

Select marker

0~9

MEAS:MARK:SEL^2
OK

SELect?

300

Query the number of marker selected

MARKer

FREQuency <value>

500

Assign the marker frequency

MEASure

MARKer

FREQuency

500

Query the reading of marker

MEASure

MARKer

LEVEL?

100

Query the reading of marker level

MEAS:MARK:LEVEL?

MEASure

MARKer

CENTER

200

Perform the marker to center

MEAS:MARK:CENTER
OK

MEASure

MARKer

STATUS?

200

Query the ON/OFF status of selected

MEASure

PEAK

CENTER

300

MEAS:PEAK:CENTER
OK

MEASure

PEAK

HIGHest

300

MEAS:PEAK:HIGHEST
OK

MEASure

PEAK

LEVel?

200

MEAS:PEAK:LEVEL?

MEASure

PEAK

TRACK

ON

300

Ok

MEAS:PEAK:TRACK^ON
OK

MEASure

PEAK

TRACK

OFF

200

Ok

MEAS:PEAK:TRACK^OFF
OK

0 to turn MM mode off,

MEAS:MARK:SEL?
9k~2.7GHz

<unit>
?

MEAS:MARK:FREQ ^1.3^GHz
OK
MEAS:MARK:FREQ?
1.3GHz

frequency

function

MEAS:MARK:STATUS?

marker

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure

PEAK

TRACK?

MEASure

TRAce

SAVE

ok

MEAS:PEAK:TRACK?

Assign the file (destination) number

1, 2, 100

MEAS:TRA:SAVE^2

for trace saving

Note: Before assign the file number, define the

OK

100
<index>

100

source first. See the next command.


MEASure

TRAce

SAVE

FROM

200

Assign the source for trace saving

MEASure

TRAce

SAVE

FROM?

100

Query the source for trace saving

Live, TraceA, TraceB

MEAS:TRA:SAVE:FROM:^Live
OK
MEAS:TRA:SAVE:FROM?
TRACEA

MEASure

TRAce

RECALL

<index>

100

Assign the file (source) number for

1, 2, 100

MEAS:TRA:RECALL:^5

trace recall

Note: Before assign the file number, define the

OK

destination first. See the next command.


MEASure

TRAce

RECALL

LOCation

100

Assign the destination for trace recall Live, TraceA, TraceB

MEASure

TRAce

RECALL

LOCation?

100

Query the destination for trace recall

MEASure

TRAce

NAME

<index><nam

100

Assign the trace for read. Refer to

MEAS:TRA:RECALL:LOC^TraceA
OK
MEAS:TRA:RECALL:LOC?
OK

e>

From A~Z, length is 24 characters.

MEAS:TRA:READ?

MEAS:TRA:NAME^2^SYSTEMA
OK

MEASure

TRAce

NAME?

<index>

400

Query the trace name as assigned

1 to 100

MEASure

TRAce

ERASE

<index>

100

Erase the identified trace

1 to 100

MEASure

TRAce

DATE?

<index>

200

Query the date of saving trace as

1 to 100

MEAS:TRA:NAME?2
SYSTEMA (for example)
MEAS:TRA:ERASE^2
OK

MEASure

TRAce

ERASE

ALL

100

MEAS:TRA:DATE?

assigned trace

OK

Erase all trace data in memory

MEAS:TRA:ALL
OK

MEASure
MEASure
MEASure
MEASure

TRAce
TRAce
TRAce
TRAce

SWITCH
SWITCH
SWITCH
SWITCH

LIVE
TRACEA
TRACEB
UPPER

100
100
100
100

Assign the live trace for dump trace

MEAS:TRA:SWITCH^LIVE

data. Refer to MEAS:TRA:READ?

OK

Assign the trace A for dump trace

MEAS:TRA:SWITCH^TRACEA

data. Refer to MEAS:TRA:READ?

OK

Assign the trace B for dump trace

MEAS:TRA:SWITCH^TRACEB

data. Refer to MEAS:TRA:READ?

OK

Assign the Upper (in spilt display)

MEAS:TRA:SWITCH^UPPER

trace for dump trace data. Refer to

OK

MEAS:TRA:READ?
MEASure

TRAce

SWITCH

LOWER

100

Assign the Lower trace for dump

MEAS:TRA:SWITCH^LOWER

trace data. Refer to

OK

MEAS:TRA:READ?

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure

TRAce

SWITCH

AVeraGe

100

MEAS:TRA:SWITCH^AVG
OK

MEASure
MEASure

TRAce
TRAce

SWITCH
SWITCH

PEAK
STORED

100
200

<index>

Assign the peak trace for dump trace

MEAS:TRA:SWITCH^PEAK

data. Refer to MEAS:TRA:READ?

OK

Assign the stored trace for dump

MEAS:TRA:SWITCH^STORED^3

trace data. Refer to

OK

MEAS:TRA:READ?
MEASure

TRAce

SWITCH?

MEASure

TRAce

READ?

400

Query the trace for data dump

1100

Dump the assigned trace data

MEAS:TRACE:SWITCH?
Live
It is 501 points of 10 bit DAC (digital to analog

MEAS:TRA:READ?

converter) data. The DAC value is from 0 to

Live^=^{137, 140, 135}

1,023.
MEASure

TRAce

ATRAce

MEASure

TRAce

ATRAce?

MEASure

TRAce

BTRAce

MEASure

TRAce

BTRAce?

<on, off>

200

Set trace A on/off.

600

Query the status (on/off) of trace A

300

Set trace B on/off

600

Query the status (on/off) of trace B

MEAS:TRA:ATRA^ON
OK
MEAS:TRA:ATRA?
ON

<on,off>

MEAS:TRA:BTRA^OFF
OK
MEAS:TRA:BTRA?
OFF

MEASure
MEASure
MEASure

TRAce
TRAce
TRAce

MAXHold

<on,off>

Enable/Disable peak hold function of

MEAS:TRA:MAXH^ON

trace

OK

Query the status (on/off) of peak hold

MEAS:TRA:MAXH?

function of trace

ON

300

Assign the number of trace averaging 1 to 200

MEAS:TRA:AVG:COUNT^20

200

MAXHold?
AVeraGe

200

COUNT
<value>

OK

MEASure

TRAce

AVeraGe

COUNT?

800

Query the number of trace averaging

MEASure

TRAce

AVeraGe

<on,off>

300

Enable/Disable the trace average

MEAS:TRA:AVG^ON

function

OK

Query the status (on/off) of trace

MEAS:TRA:AVG?

average function

on

200

Enable the trace freeze function

MEAS:TRA:FRE^OFF

500

Query the status (on/off) of trace

MEAS:TRA:FRE?

freeze function

OFF

Query the trace detection mode

MEAS:TRA:DET:M?

MEAS:TRA:AVG:COUNT?
20

MEASure

TRAce

400

AVeraGe?

MEASure

TRAce

FREeze

MEASure

TRAce

FREeze?

<on,off>

OK

MEASure

TRAce

DETect

Mode?

500

Normal

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure
MEASure

TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
TRAce
ACPR
ACPR?

DETect
DETect
DETect
DETect
DETect
DETect
DETect
DETect
DETect
DETect

A*C>A
<on/off>

100

AVeraGe

100

AVeraGe

100

AVeraGe
Qpeak AUTO
QPeak
QPeak
Qpeak

TC1
TC2
TC3

300
100
100
100
200
700
500

A-B>A

A+C>A

300

Peak+

A+B>A

CONSTant?

200

SAMPle

A<>B

CONSTant

200

NORMal

<value>

100
300
300
600
200
1100

Assign the trace to normal detect

MEAS:TRA:DET:NORM

mode

OK

Assign the trace to sample detection

MEAS:TRA:DET:SAMP

mode

OK

Assign the trace detection to the

MEAS:TRA:DET:PEAK+

positive peak mode

OK

Assign the trace detection to the

MEAS:TRA:DET:AVG^1

average 1 mode

OK

Assign the trace detection to the

MEAS:TRA:DET:AVG^2

average 2 mode

OK

Assign the trace detection to the

MEAS:TRA:DET:AVG^3

average 3 mode

OK

Assign the trace detection to the auto

MEAS:TRA:DET:QP:AUTO

quasi-peak mode

OK

Assign the trace detection to the

MEAS:TRA:DET:QP:TC1

quasi-peak TC1 mode

OK

Assign the trace detection to the

MEAS:TRA:DET:QP:TC2

quasi-peak TC2 mode

OK

Assign the trace detection to the

MEAS:TRA:DET:QP:TC3

quasi-peak TC3 mode

OK

Perform the trace A exchanges with

MEAS:TRA:A<>B

trace B function

OK

Perform the trace A plus trace B and

MEAS:TRA:A+B>A

move to trace A function

OK

Perform the trace A minus trace B

MEAS:TRA:A-B>A

and move to trace A function

OK

Assign the constant for trace math

MEAS:TRA:CONST^ 10

operation

OK

Query the constant for

trace math

MEAS:TRA:CONST?

operation

10

Perform the trace A plus a constant

MEAS:TRA:A+C>A

and move to trace A function

OK

Perform the trace A time a constant

MEAS:TRA:A*C>A

and move to trace A function

OK

Enable/Disable ACPR measurement

MEAS:ACPR:ON

function

OK

Query the status (on/off) of ACPR

MEAS:ACPR?

measurement

ON

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure
MEASure
MEASure
MEASure
MEASure
MEASure

ACPR
ACPR
ACPR
ACPR
OCBW

READ
READ
READ
READ

UPper1?
UPper2?
LOWer1?
LOWer2?

600
600
600
600
300

<on/off>

300

OCBW?

Query the ACPR measurement of

MEAS:ACPR:READ:UP1?

upper adjacent channel 1

-38.5 dB

Query the ACPR measurement of

MEAS:ACPR:READ:UP2?

upper adjacent channel 2

-25.3 dB

Query the ACPR measurement of

MEAS:ACPR:READ:LOW1?

lower adjacent channel 1

-37.6 dB

Query the ACPR measurement of

MEAS:ACPR:READ:LOW1?

lower adjacent channel 2

-24.8 dB

Enable/Disable the OCBW

MEAS:OCBW:ON

measurement

OK

Query the status (on/off) of OCBW

MEAS:OCBW?

measurement

ON
MEAS:OCBW:READ?

MEASure

OCBW

READ?

1500

Query the OCBW measurement

MEASure

OCBW

POWer?

1300

Query the channel power

MEASure

CHBW

<value>

200

0.205 MHz

MEASure
MEASure
MEASure

HLIMIT

MEASure

HLIMIT?

MEAS:CHBW^20^kHz

power measurement

OK

Query the channel bandwidth of

MEAS:CHBW?

power measurement

20 kHz

Assign the channel space of power

MEAS:CHSPC^40 kHz

measurement

OK

Query the channel space of power

MEAS:CHSPC?

measurement

40 kHz

100

Enable/disable the high limit line

MEAS:HLIMIT:ON

400

Query the status (on/off) of high limit

MEAS:HLIMIT?

line

ON

200

Enable/disable the low limit line

MEAS:LLIMIT:ON

400

Query the status (on/off) of low limit

MEAS:LLIMIT?

line

OFF

Enable/disable the pass/fail test

MEAS:ALARM:OFF

500

<value>

1600

CHSPC?

MEASure

MEAS:OCBW:POW?

300

CHBW?
CHSPC

measurement
Assign the channel bandwidth of

<on/off>

OK

MEASure

LLIMIT

MEASure

LLIMIT?

<on/off>

OK

100

MEASure

ALARM

<on/off>

MEASure

HLIMIT

FREQuency <index>

OK
<value>

*Only for the version V1.18 and

Index:0,1,2..9

above.

Value:0 to 2700MHz

MEAS:HLIMIT:FREQ^1^20
OK

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


MEASure

HLIMIT

FREQuency <Index>?

*Only for the version V1.18 and


above.

MEASure

HLIMIT

LEVEL

*Only for the version V1.18 and


above.

MEAS:HLIMIT:FREQ^1?
20 MHz

<index>
<value>

MEASure

HLIMIT

LEVEL

<index>?

*Only for the version V1.18 and


above.

MEASure

HLIMIT

EDIT

OK

*Only for the version V1.18 and


above.

MEASure

HLIMIT

DELETE

ALL

*Only for the version V1.18 and


above.

MEASure

LLIMIT

FREQuency <index>

Index:0,1,2..9
Value:-180~+20 dBm

MEAS:HLIMIT:LEVEL^1^-10
OK
MEAS:HLIMIT:LEVEL^1?
-10 dBm
MEAS:HLIMIT:EDIT:OK
OK
MEAS:HLIMIT:DELETE:ALL
OK

*Only for the version V1.18 and


above.

<value>
MEASure

LLIMIT

FREQuency <index>?

*Only for the version V1.18 and


above.

MEASure

LLIMIT

LEVEL

*Only for the version V1.18 and


above.

<index>
<value>

MEASure

LLIMIT

LEVEL

<index>?

*Only for the version V1.18 and


above.

MEASure

LLIMIT

EDIT

OK

*Only for the version V1.18 and


above.

MEASure

LLIMIT

DELETE

ALL

*Only for the version V1.18 and


above.

MEASure

ALARM

PASS?

CONtrol

BW

AUTO

100

Assign BW in ALL AUTO mode

CONtrol

RBW

<index>

200

Assign the RBW in index number

Index:0,1,2..9
Value:0 to 2700MHz

Index:0,1,2..9
Value:-180~+20 dBm

MEAS:LLIMIT:FREQ^1^5
OK
MEAS:LLIMIT:LEVEL^1?
5 MHz
MEAS:LLIMIT:LEVEL^2^-20
OK
MEAS:LLIMIT:LEVEL^2?
-20 dBm
MEAS:LLIMIT:EDIT:OK
OK
MEAS:LLIMIT:DELETE:ALL
OK

*Only for the version V1.18 and


above.

MEAS:ALARM:PASS?
OK
CON:BW:AUTO
OK

CONtrol

RBW

AUTO

100

Assign the RBW in auto mode

2=3kHz, 4=30kHZ, 6=300kHZ, 7=4MHz.

CON:RBW^4

Optional:3=9kHz, 5=120kHz

OK
CON:RBW:AUTO
OK

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


CONtrol

RBW

200

MANual

Assign the RBW in manual mode

CON:RBW:MAN
OK

CONtrol

RBW

CONtrol

RBW?

CONtrol

VBW

MODE?

200

Query the RBW mode.

200

Query the RBW

400

Assign the VBW by index number

Auto, Manual

CON:RBW:MODE?
Manual
CON:RBW?
30 kHz

<index>

0=10Hz, 1=30Hz, 2=100Hz, 3=300Hz, 4=1kHz,

CON:VBW^4

5=3kHz, 6=10kHz, 7=30kHz, 8=100kHz,

OK

9=300kHz, 10=1MHz
CONtrol

VBW

AUTO

400

Assign the VBW in auto mode

CONtrol

VBW

MANual

200

Assign the VBW in manual mode

CONtrol

VBW

MODE?

700

Query the VBW mode.

CONtrol

VBW?

600

Query the VBW

CONtrol

SYStem

300

Assign the GPIB address

CON:VBW:AUTO
OK
CON:VBW:MAN
OK
CON:VBW:MODE?
Manual
CON:VBW?
1 Khz

GPIB

ADDRess

1 to 30

<value>

CON:SYS:GPIB:ADDR^9
OK

CONtrol

SYStem

GPIB

ADDRess?

500

Query the GPIB address

CONtrol

SYStem

CONTrast

<value>

200

Assign the contrast number of the

CON:SYS:GPIB:ADDR?
9

CONtrol
CONtrol

SYStem
SYStem

400

CONTrast?

100

CLOCK?

128(white)~176(black)

CON:SYS:CONT^145

LCD module

OK

Query the contrast number of LCD

CON:SYS:CONT?

module.

145

Query the system date and clock

CONtrol:SYStem:CLOCK?
23:53:00
Monday May 26, 2003

CONtrol

SYStem

FirmWare?

700

Query the Firmware version

CONtrol

SYStem

VERsion?

600

Query the Software version and built

CONtrol:SYStem:FirmWare?
Firmware version = 2.0

date

CONtrol:SYStem:VERsion?
System Software Version = 00.94
03/31/03

CONtrol

SYStem

PRESET

CONtrol

SYStem

DISPlay

200

Preset the system

100

Set the display mode. 0:Normal,

CON:SYS:DISP^0

1:Inverse

OK

CON:SYS:PRESET
OK

<value>

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


CONtrol

SYStem

300

DISPlay?

Query the display mode

Normal, inverse

CON:SYS:DISP?
Normal

<on/off>

200

CONtrol

SYStem

BACKlight

Turn the backlight on/off

CONtrol

SYStem

BACKlight?

200

CONtrol

SWEEPtime

MODE?

300

Query the sweep time mode

CONtrol

SWEEPtime

<Auto/Man>

400

Set the sweet time mode

CONtrol

SWEEPtime?

400

Query the sweep time

CONtrol

SWEEPtime

600

Assign the sweep time in manual

ON, OFF

CON:SYS:BACK^ON
OK
CON:SYS:BACK?
ON

Auto/Manual

CON:SWEEP:MODE?
Auto
CON:SWEEP^Auto
OK
CON:SWEEP?
500.0 mS

CONtrol

TG

CONtrol

TG?

<VALUE>
<on/off>

NOTE: It can be set only in manual mode

CON:SWEEP^500^msec

mode

OK

100

Set TG output ON/OFF

CON:TG^ON

100

Query TG status (on/off) of TG.

OK
CON:TG?
ON
CONtrol

TG

NORM

CONtrol

TG

NORM?

<on/off>

200

Turn on/off the Normalization function

300

Query the status (on/off) of TG

CON:TG:NORM^ON
OK
CON:TG:NORM?

normalization
CONtrol

TG

LEVEL

CONtrol

TG

LEVEL?

CONtrol

TG

OFFSET

CONtrol

TG

OFFSET?

CONtrol

TG

REFlevel

<value> dBm

100

Assign the TG output level in dBm

ON
-50.0 to 0.0 dBm

CON:TG:LEVEL^ -10.0^dBm

NOTE: The unit has to be dBm.

OK

200

Query the TG level.

200

Assign the TG frequency offset

200

Query the TG frequency offset

100

Assign the reference level of TG

Any level within the display. For example, the

CONtrol:TG:REF^-30^dBm

output in dBm

ange on display is 100 to 20dBm, it is the

OK

CON:TG:LEVEL?
-10.0 dBm

<value>

-990.0 o 990.0 kHz

CON:TG:OFFSET^-500^kHz
OK
CON:TG:OFFSET?
500 kHz

<value> dBm

range of TG reference level.


CONtrol

TG

REFlevel?

300

Query the TG reference level

CON:TG:REF?
-30 dBm

CONtrol

TRIGger

FREE

100

Set the trigger mode to Free

CON:TRIG:FREE

(non-trigger) mode

OK

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


CONtrol

TRIGger

300

MODE?

Query trigger mode

CON:TRIG:MODE?
Free

CONtrol

TRIGger

SINGLE

200

CONtrol

TRIGger

MAN

200

CONtrol

TRIGger

LEVEL

Set the trigger mode to single mode

CON:TRIG:SINGLE
OK
CON:TRIG:MAN
OK

<value>

200

Assign trigger level

Any level within the display. For example, the

CON:TRIG:LEVEL^ -40^dBm

display range is 100 to 20dBm, it is the range

OK

of TG reference level.
CONtrol

TRIGger

LEVEL?

CONtrol

TRIGger

FREQ

100

Query the Trigger level

100

Assign the trigger frequency. The

CON:TRIG:LEVEL?
-40.0 dBm

<value>
<unit>

CONtrol

TRIGger

FREQ?

CONtrol

TRIGger

DELAY

CONtrol

TRIGger

DELAY?

Any frequency within the span.

CON:TRIG:FREQ^100^MHz

default is center frequency

OK

100

Query the trigger frequency

CON:TRIG:FREQ?

100

Assign the trigger delay

400

Query the trigger delay

100 MHz
<value>

CON:TRIG:DELAY^100 usec
OK
CONtrol:TRIGger:DELAY?
100 usec

CONtrol

TRIGger

CONtrol

DISPlay?

EXT

100

Set the trigger source to external

400

Query the display status (split

CON:DISP?

upper/split lower/full)

Split upper
CON:DISP:SPLIT

CONtrol:TRIGger:EXT
OK

CONtrol

DISPlay

SPLIT

200

Set the display to split mode

CONtrol

DISPlay

FULL

100

Set the display to full mode.

CONtrol

DISPlay

UPPER

200

Set the upper display(in split mode)

CON:DISP:UPPER

on.

OK

Set the lower display(in split mode)

CON:DISP:LOWER

OK
CON:DISP:FULL
OK

CONtrol

DISPlay

200

LOWER

on.
CONtrol

EXTREF

FREQ

<index>

100

OK

Assign the frequency of external

1=1MHz, 2=1.544MHz, 3=2.048MHz, 4=5MHz,

reference.

5=10MHz, 6=10.24MHz, 7=13MHz, 8=15.36MHz, OK

CON:EXTREF:FREQ^5

9=15.4MHz, 10=19.2MHz
CONtrol
CONtrol

EXTREF
BATTery?

FREQ?

300
300

Query the frequency of external

CON:EXTREF:FREQ?

frequency

10 MHz

Query the status (on/off) of battery

CON:BATT?
Battery option not installed

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.


CONtrol

BATTery

RUNTIME?

Query the run time of battery

CON:BATT:RUNTIME?
OK

CAL
CAL

CAL

600

INPUTZ?
INPUTZ

INPUTZ

<value>

<on/off>

dB

200

200

Query the offset of 75 Ohm input

CAL:INPUTZ?

impedance.

5.9 dB

Assign the offset of 75 Ohm input


impedance

CAL INPUTZ^5.9^dB

Set the inputZ offset on/off

CAL:INPUTZ^ON
OK

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

Example in Visual Basic


The example as below will first create a window Form1 and text box. Then send the commands to query the software information, set
center frequency at 1000MHz, get the trace data and display the returns in the text box. Pushing the Test button will start the operation.
This example use RS232 as interface. Refer to the code below to see the RS232 parameters.

Code:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption
=
"Form1"
ClientHeight
= 3525
ClientLeft
=
60
ClientTop
=
345
ClientWidth
=
6675
LinkTopic
= "Form1"
ScaleHeight
= 3525
ScaleWidth
=
6675

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

StartUpPosition = 3 'System default


Begin VB.TextBox Text1
Height
= 3435
Left
=
0
MultiLine
=
-1 'True
ScrollBars
=
3 'Both
TabIndex
=
1
Top
=
45
Width
=
5595
End
Begin VB.CommandButton cmdTest
Caption
=
"Test"
Height
=
555
Left
=
5670
TabIndex
=
0
Top
=
2925
Width
=
960
End
Begin MSCommLib.MSComm MSComm1
Left
=
6075
Top
=
45
_ExtentX
=
1005
_ExtentY
= 1005
_Version
= 393216
DTREnable
= -1 'True
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Dim rdBuffer As String
'Buffer for input string
Dim ErrStr As String
'Buffer for error message
'============== Delay in ms =================================
Private Function Delay(DelaymSec As Double)

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

Dim STime As Double, NTime As Double, Wait As Double


STime = timeGetTime
NTime = timeGetTime
Wait = NTime - STime
Do Until Wait >= DelaymSec
DoEvents
NTime = timeGetTime
If NTime < STime Then
'Maximum timegettime 2^32
Wait = 2 ^ 32 - STime + NTime
Else
Wait = NTime - STime
End If
Loop
End Function
'============================ Send command to GSP-827 ====================================
Public Function SendCMD(CMD As String) As Boolean
Dim Q As String
If Not MSComm1.PortOpen Then
'If port is not open, quit and return false
SendCMD = False
Exit Function
End If
MSComm1.Output = Trim(CMD) & Chr(13)
'Add CR at end of command and send the command to unit
Q = ReadCOM()
'Read the return from unit
Q = Trim(Replace(Q, Chr(13), " ", 1))
'Replace CR with space
If Q = "OK" Then
ErrStr = ""
SendCMD = True
Else
ErrStr = Trim(rdBuffer)
SendCMD = False
End If
End Function
'========================== Send query command and read the return string ====================================
Public Function SendQuery(QueryStr As String) As String
Dim Q As String
If Not MSComm1.PortOpen Then Exit Function
If MSComm1.InBufferCount Then
'Delete the data in buffer
rdBuffer = MSComm1.Input

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

End If
MSComm1.Output = Trim(QueryStr) & Chr(13)
Q = ReadCOM
Q = Trim(Replace(Q, Chr(13), " ", 1))
'Replace CR with space
If InStr(1, Q, "err") <> 0 Then
ErrStr = Q
SendQuery = Q
Else
ErrStr = ""
SendQuery = Q
End If
End Function
'========================= Read the data of comport buffer ===============================================
Public Function ReadCOM() As String
Dim Tout As Boolean
Dim ST As Double
rdBuffer = ""
Tout = False
ST = Timer
If MSComm1.InBufferCount = 0 Then
Do
Delay 50
If Timer - ST > 10 Then
Tout = True
ErrStr = "Time Out"
Else
ErrStr = ""
End If
Loop Until MSComm1.InBufferCount > 0 Or Tout
End If
Do
rdBuffer = rdBuffer & MSComm1.Input
If Timer - ST > 10 Then
Tout = True
ErrStr = "Time Out"
Else
ErrStr = ""

'Delay for 50 ms if there is no response


'Set 10 seconds for Time Out

'Set 10 seconds for Time Out

Copyright 2003 GOODWILL INSTRUMENT CO., LTD.

End If
Delay 100
Loop Until MSComm1.InBufferCount = 0 Or Tout
ReadCOM = rdBuffer
End Function
'========================== Click Test bottom to execute this test =====================================
Private Sub cmdTest_Click()
Dim R As String
Text1.Text = ""
Text1.SelStart = 0
MSComm1.CommPort = 1
'Use PORT 1
MSComm1.Settings = "57600,N,8,1"
'Baud rate 57600 No parity checkdata bit 8stop bit 1
MSComm1.InputLen = 0
'Read the whole buffer when input is in use
MSComm1.PortOpen = True
'Open COM Port
R = SendQuery("*IDN?")
'Query the unit information
Text1.SelText = R & vbCrLf
'Display the response on text box
SendCMD "MEAS:FREQ:CEN 1000 MHZ"
'Set Center Frequency at 1000MHz
R = SendQuery("MEAS:FREQ:CEN?")
'Query Center Frequency unit to kHz
Text1.SelText = R & vbCrLf
'Display the center frequency on text box
R = SendQuery("MEAS:TRA:READ?")
'Query Trace ADC data
Text1.SelText = R & vbCrLf
'Display the trace data on text box
MSComm1.PortOpen = False
'Terminate COM Port
End Sub

You might also like