SDG - Remote Control Manual (Rev1.0)
SDG - Remote Control Manual (Rev1.0)
SDG - Remote Control Manual (Rev1.0)
SDG Series
Function/Arbitrary
Waveform Generator
Remote Control Manual
Contents
This section lists and describes the remote control commands and queries recognized by
the instrument. All commands and queries can be executed in either local or remote state.
Each command or query, with syntax and other information, has some examples listed.
The commands are given in both long and short format at “COMMAND SYNTAX”, and the
subject is indicated as a command or query or both. Queries perform actions such as
obtaining information, and are recognized by the question mark (?) following the header.
The descriptions are listed in alphabetical order according to their short format.
In the descriptions themselves, a brief explanation of the function performed is given. This
is followed by a presentation of the formal syntax, with the header given in
Upper-and-Lower-Case characters and the short form derived from it in ALL
UPPER-CASE characters. Where applicable, the syntax of the query is given with the
format of its response.
The commands and queries listed here can be used for SDGxxxx Series
Function/Arbitrary Waveform Generators.
1
Remote Control Manual
the type and range of values that may be used in a command instead of the
placeholder.
{} Braces enclose a list of choices, one of which must be made.
[] Square brackets enclose optional items.
… An ellipsis indicates that the items both to its left and right may be repeated for a
number of times.
2
Remote Control Manual
1.3.1 IDN
DESCRIPTION The *IDN? query causes the instrument to identify itself. The
response comprises manufacturer, model, serial number,
software version and firmware version.
3
Remote Control Manual
RESPONSE FORMAT *IDN, <device id>,<model>,<serial number>,
<software version>, <firmware version>.
Notes:
1)
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
<firmware version> yes yes yes no
2) Explain for <firmware version>:value1- value2- value3- value4- value5.
value1: PCB version.
value2: Hardware version.
value3: Hardware subversion.
value4: FPGA version.
value5: CPLD version.
1.3.2 OPC
4
Remote Control Manual
1.3.3 CLS
DESCRIPTION The *CLS command clears all the status data registers.
EXAMPLE The following command causes all the status data registers to be
cleared:
*CLS
1.3.4 ESE
DESCRIPTION The *ESE command sets the Standard Event Status Enable
register (ESE). This command allows one or more events in the
ESR register to be reflected in the ESB summary message bit
(bit 5) of the STB register.
The *ESE? query reads the contents of the ESE register.
EXAMPLE The following instruction allows the ESB bit to be set if a user
request (URQ bit 6, i.e. decimal 64) and/or a device dependent
error (DDE bit 3, i.e. decimal 8) occurs. Summing these values
yields the ESE register mask 64+8=72.
*ESE?
Return:
5
Remote Control Manual
*ESE 72
1.3.5 ESR
DESCRIPTION The *ESR? query reads and clears the contents of the Event
Status Register (ESR). The response represents the sum of the
binary values of the register bits 0 to 7.
EXAMPLE The following instruction reads and clears the content of the ESR
register:
*ESR?
Return:
*ESR 0
1.3.6 RST
DESCRIPTION The *RST command initiates a device reset. The *RST sets all of
traces to the GND line and recalls the default setup.
1.3.7 SRE
DESCRIPTION The *SRE command sets the Service Request Enable register
(SRE). This command allows the user to specify which summary
message bit(s) in the STB register will generate a service
request.
6
Remote Control Manual
A summary message bit is enabled by writing a ‘1’ into the
corresponding bit location. Conversely, writing a ‘0’ into a given
bit location prevents the associated event from generating a
service request (SRQ). Clearing the SRE register disables SRQ
interrupts.
The *SRE? query returns a value that, when converted to a
binary number represents the bit settings of the SRE register.
Note that bit 6 (MSS) cannot be set and it’s returned value is
always zero.
1.3.8 STB
DESCRIPTION The *STB? query reads the contents of the 488.2 defined status
register (STB), and the Master Summary Status (MSS).
The response represents the values of bits 0 to 5 and 7 of the
Status Byte register and the MSS summary message.
The response to a *STB? query is identical to the response of a
serial poll except that the MSS summary message appears in bit
6 in place of the RQS message.
UERY SYNTAX *STB?
7
Remote Control Manual
*STB 0
1.3.9 TST
DESCRIPTION The *TST? query performs an internal self-test and the response
indicates whether the self-test has detected any errors. The
self-test includes testing the hardware of all channels, the
time-base and the trigger circuits.
Hardware failures are identified by a unique binary code in the
returned <status> number. A “0” response indicates that no
failures occurred.
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
TST no yes yes yes
1.3.10 WAI
8
Remote Control Manual
1.3.11 DDR
DESCRIPTION The DDR? query reads and clears the contents of the device
dependent or device specific error register (DDR). In case of a
hardware failure, the DDR register specifies the origin of the
failure.
EXAMPLE DDR?
Return:
DDR 0
The following table gives details:
Bit Bit Value Description
15...14 Reserved
13 8192 Time-base hardware failure detected
12 4096 Trigger hardware failure detected
11 Reserved
10 Reserved
9 512 Channel 2 hardware failure detected
8 256 Channel 1 hardware failure detected
7 128 External input overload condition detected
6…4 Reserved
3 Reserved
2 Reserved
1 2 Channel 2 overload condition detected
0 1 Channel 1 overload condition detected
Notes:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
DDR yes yes no yes
1.3.12 CMR
DESCRIPTION The CMR? query reads and clears the contents of the command
error register (CMR) .See the table below which specifies the last
syntax error type detected by the instrument.
9
Remote Control Manual
EXAMPLE CMR?
Return:
CMR 0
Value Description
0
1 Unrecognized command/query header
2 Invalid character
3 Invalid separator
4 Missing parameter
5 Unrecognized keyword
6 String error
7 Parameter can’t allowed
8 Command String Too Long
9 Query cannot allowed
10 Missing Query mask
11 Invalid parameter
12 Parameter syntax error
13 Filename too long
14 Directory not exist
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
CMR yes yes no yes
10
Remote Control Manual
EXAMPLE Set query command format to long.
CHDR LONG
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
CHDR yes yes no yes
DESCRIPTION Enable or disable the output of the [Output] connector at the front
panel corresponding to the channel.
The query returns the output state, load and polarity parameters
value.
11
Remote Control Manual
Set the load to 50.
C1: OUTP LOAD, 50
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
<channel> no yes yes yes
<load>( default unit is 50~10000, 50~100000,
50, HZ 50, HZ
ohm) HZ HZ
12
Remote Control Manual
Note: if the command doesn’t set basic wave type, WVPT parameter will be set to current
wave type.
where: <type>:={SINE, SQUARE, RAMP, PULSE, NOISE, ARB ,DC}
<frequency>:= {Default unit is "Hz". Value depends on the model.}
<amplitude>:= {Default unit is "V". Value depends on the model.}
<offset>:= {Default unit is "V". Value depends on the model.}
<duty>:= {0% to 100%. Value depends on frequency.}
<symmetry> :={ 0% to 100%}
<phase>:= { Value depends on the model.}
<stdev>:= {Default unit is "V". Value depends on the model.}
<mean>:= {Default unit is "V". Value depends on the model.}
<width>:= {Max_width < (Max_duty * 0.01) * period and Min_width >
(Min_duty * 0.01) * period.}
<rise>:= {Value depends on the model.}
<fall>:= {Value depends on the model.}
<delay>:= {Unit is S. Maximal is Pulse period, minimum value is 0.}
13
Remote Control Manual
Change frequency of channel one to 2000 Hz.
C1: BSWV FRQ, 2000
COMMAND <channel>:MDWV(MoDulateWaVe)<parameter>
SYNTAX <channel>:={C1, C2}
<parameter>:= {a parameter from the table below}
Parameters Value Description
Turn on or off modulation. Note: if you want
to set or read other parameters of
STATE <state>
modulation, you must set STATE to ON at
first.
AM, SRC <src> AM signal source.
AM modulation wave. Only when AM sign
AM, MDSP <mod wave shape> al source is set to INT, you can set the
parameter.
AM frequency. Only when AM signal sour
AM, FRQ <AM frequency> ce is set to INT, you can set the paramet
er.
AM depth. Only when AM signal source is set
AM, DEPTH <depth>
to INT, you can set the parameter.
14
Remote Control Manual
15
Remote Control Manual
16
Remote Control Manual
<delay>:= {Default unit is "S".}
Note:
There are some parameters Value depends on the model, You can read
version datasheet to get specific parameters
17
Remote Control Manual
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
<channel> No(single channel) yes yes yes
no(only internal
[type], SRC yes yes yes
source)
CARR, DLY no yes yes yes
CARR, RISE yes no yes yes
CARR, FALL yes no yes yes
[type]:={AM, FM, PM, FSK, ASK, DSBAM, PWM}
18
Remote Control Manual
Note:
There are some parameters Value depends on the model,
You can read version datasheet.
RESPONSE FORMAT <parameter> :={ Return all parameters of the current sweep
wave.}
19
Remote Control Manual
C2: SWWV STATE, ON, TIME, 1S, STOP, 100HZ, START,
100HZ, TRSR, MAN,TRMD, OFF, SWMD, LINE, DIR, UP,
CARR, WVTP, SQUARE,
FRQ, 1000HZ, AMP, 4V, OFST, 0V, DUTY, 50, PHSE, 0
20
Remote Control Manual
TRMD <trig mode> Value of trigger mode. When carrier is NOISE wave,
you can’t set it. When NCYC is chosen you can set
it. When TRSR is set to EXT, you can’t set it.
EDGE <edge> Value of edge. When carrier is NOISE wave, you
can’t set it. When NCYC is chosen and TRSR is set
to EXT, you can set it.
TIME <circle time> Value of Ncycle number. When carrier is NOISE
wave, you can’t set it. When NCYC is chosen you
can set it.
MTRIG <manual trig> Manual trigger. When TRSR is set to MAN, it can be
set.
CARR,
<wave type> Value of carrier type.
WVTP
CARR, FRQ <frequency> Value of carrier frequency
CARR, AMP <amplitude> Value of carrier amplitude.
CARR, OFST <offset> Value of carrier offset.
Value of symmetry. Only Ramp can set this
CARR, SYM <symmetry>
parameter.
CARR, Value of duty cycle. Only Square or Pulse can set
<duty>
DUTY this parameter.
CARR,
<phase> Value of carrier phase.
PHSE
Value of rise edge. Only when carrier is Pulse, the
CARR, RISE <rise>
Value is valid.
Value of fall edge. Only when carrier is Pulse, the
CARR, FALL <fall>
Value is valid.
CARR, Value of stdev. Only when carrier is Noise, the Value
<stdev>
STDEV is valid.
CARR, Value of mean. Only when carrier wave is Noise, the
<mean>
MEAN Value is valid.
Value of delay. Only when carrier is Pulse, the
CARR, DLY <delay>
parameter is valid
Note: If you want to set CARR and STATE, the first parameter has to one of them
21
Remote Control Manual
<edge>:= { RISE, FALL}
<circle time> :={ Value depends on the Model (“INF” means
infinite).}
<wave type>:={SINE ,SQUARE, RAMP, PULSE, NOISE, ARB}
<frequency> :={ Default unit is "HZ". Value depends on the model.}
<amplitude>:= {Default unit is "V". Value depends on the model.}
<offset>:= {Default unit is "V". Value depends on the model.}
<duty>:= {0% to 100%.}
<symmetry> :={ 0% to 100%}
<phase>:={ Value depends on the model.}
<stdev>:= {Default unit is "V". Value depends on the model.}
<mean>:= {Default unit is "V". Value depends on the model.}
<width> :={ Max_width < (Max_duty * 0.01) * period and
Min_width > (Min_duty * 0.01) * period.}
<rise>:= {Value depends on the model.}
<fall>:= {Value depends on the model.}
<delay>:= {Default unit is “S”.}
Note:
There are some parameters Value depends on the model,
You can read version datasheet to get specific parameters.
22
Remote Control Manual
CARR,WVTP,SINE,FRQ,1000HZ,AMP,4V,OFST,0V,PHSE,0
23
Remote Control Manual
COMMAND SYNTAX <channel> ARWV(ArbWaVe) INDEX,<value1>, NAME,<value2>
<channel>:={C1, C2}
< value1>: the table below shows what the index number mean.)
< value2>: see table below.
Notes:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
no(single
<channel> yes yes yes
channel)
24
Remote Control Manual
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
SYNC no yes yes yes
25
Remote Control Manual
Read language
LAGG?
Return:
LAGG EN
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
RU no yes no no
26
Remote Control Manual
COMMAND SYNTAX SCFG(Sys_CFG)<parameter>
<parameter>:= {DEFAULT, LAST}
DESCRIPTION Turns off or sets screen save time (default unit is minutes).
27
Remote Control Manual
Return:
SCSV 5MIN
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
ROSC no yes yes yes
28
Remote Control Manual
< mode >:={AC, DC}
<HFR>:={ON, OFF}
EXAMPLE
Turn on frequency counter:
FCNT STATE,ON
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
FCNT no yes yes yes
29
Remote Control Manual
Return:
C1: INVT ON
Note:
1.
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
no(single
<channel> yes yes yes
channel)
RESPONSE FORMAT COUP < state >,< bsch >,< frq_dev >< pha_dev >
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
Coupling no yes no no
30
Remote Control Manual
<parameter>:= {ON, OFF}
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
VOLTPRT/ command no yes yes no
DESCRIPTION This command is used to read the stored wave data names. If
the store unit is empty, the command will return “EMPTY” string.
Note: M50~ M59 is user defined memory. The name will return
what you defined. If you do not define an arbitrary name, it will
return “EMPTY”(It depends on the model).
31
Remote Control Manual
M28, Chirp, M29, Twotone, M3, StairDn, M30, SNR, M31,
Hamming, M32, Hanning, M33, kaiser, M34, Blackman, M35,
Gausswin, M36, Triang, M37, Harris, M38, Bartlett, M39, Tan,
M4, StairUD, M40, Cot, M41, Sec, M42, Csc, M43, Asin, M44,
Acos, M45, Atan, M46, Acot, M47, Square, M5, Ppulse, M6,
Npulse, M7, Trapezia, M8, Upramp, M9, Dnramp
32
Remote Control Manual
KB_BURST 17 KB_LEFT 44
KB_WAVES 4 KB_RIGHT 40
KB_UTILITY 11 KB_OUTPUT1 153
KB_PARAMETER 5 KB_OUTPUT2 152
KB_STORE_RECALL 70 KB_KNOB_RIGHT 175
KB_NUMBER_0 48 KB_KNOB_LEFT 177
KB_NUMBER_1 49 KB_KNOB_DOWN 176
KB_NUMBER_2 50 KB_HELP 12
KB_NUMBER_3 51 KB_CHANNEL 72
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
KB_STORE_RECALL yes yes yes no
KB_HELP yes yes no no
no(single
KB_CHANNEL yes yes no
channel)
1.25 IP Command
Get IP address.
SYST:COMM:LAN:IPAD?
Return:
“10.11.13.203”
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
SYST:COMM:LAN:IPAD no no yes no
33
Remote Control Manual
DESCRIPTION The Command can set and get system subnet mask.
34
Remote Control Manual
EXAMPLES Set Gateway to 10.11.13.5:
SYSTem:COMMunicate:LAN:GATeway 10.11.13.5
Get gateway:
SYSTem:COMMunicate:LAN:GATeway?
Return:
“10.11.13.5”
Note:
Parameter/command SDG800 SDG1000 SDG2000X SDG5000
SYST:COMM:LAN:GAT no no yes no
35
Remote Control Manual
1.29 Index
*IDN
OPC
*CLS
*ESE
*ESR
*RST
*SRE
*STB
*TST
*WAI
DDR
CMR
A
ARWV ARBWAVE
B
BSWV BASIC_WAVE
BTWV BURSTWAVE
BUZZ BUZZER
C
CHDR COMM_HEADER
COUP COUPLING
F
FCNT FREQCOUNTER
I
IVNT INVERT
L
LAGG LANGUAGE
M
MDWV MODULATEWAVE
N
NBFM NUMBER_FORMAT
36
Remote Control Manual
OUTP OUTPUT
P
PACP PARACOPY
R
ROSC ROSCILLATOR
S
SCFG Sys_CFG
SCSV SCREEN_SAVE
SWWV SWEEPWAVE
SYNC SYNC
STL STORELIST
SYST:COMM:LAN:IPAD SYSTEM:COMMUNICATE:LAN:IPADDRESS
SYST:COMM:LAN:SMAS SYSTem:COMMunicate:LAN:SMASk
SYST: COMM: LAN:GAT SYSTem:COMMunicate:LAN:GATeway
SRATE SAMPLERATE
V
VKEY VIRTUALKEY
2 Programming Demos
37
Remote Control Manual
like: C:\Program Files\IVI Foundation\VISA\WinNT\include. Set this path to
Project---Properties---C/C++---General---Additional Include Directories. See
the picture below.
38
Remote Control Manual
Add the visa.h file into the project source file (xxx.cpp):
39
Remote Control Manual
#include <visa.h>
3. Add your codes:
3.1 Include the header files:
#include "visa.h"
#pragma comment(lib,"visa32.lib") // static way
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
3.2 USBTMC access code:
Write a function Usbtmc_test().
int Usbtmc_test()
{
ViSession defaultRM;
ViSession instr;
ViUInt32 numInstrs;
ViFindList findList;
ViUInt32 retCount;
ViUInt32 writeCount;
ViStatus status;
char instrResourceString[VI_FIND_BUFLEN];
unsigned char buffer[100];
char stringinput[512];
int i;
/* Find all the USBTMC VISA resources in our system and store the
number of resources in the system in numInstrs. */
status = viFindRsrc (defaultRM, "USB?*INSTR", &findList,
&numInstrs, instrResourceString);
if (status < VI_SUCCESS)
{
40
Remote Control Manual
printf ("An error occurred while finding resources.\nHit enter to
continue.");
fflush(stdin);
getchar();
viClose (defaultRM);
return status;
}
/** Now we will attempt to read back a response from the device to
* the identification query that was sent. We will use the viScanf
* function to acquire the data.
* After the data has been read the response is displayed.*/
status = viScanf(instr, "%t", buffer);
if (status < VI_SUCCESS)
{
printf ("Error reading a response from the device %d.\n",
i+1);
}
else
41
Remote Control Manual
{
printf ("\nDevice %d: %*s\n", i+1,retCount, buffer);
}
status = viClose (instr);
}
/** Now we will close the session to the instrument using
* viClose. This operation frees all the system resources. */
status = viClose (defaultRM);
return 0;
}
42
Remote Control Manual
{
printf("viRead failed with error code: %x \n",status);
viClose(defaultRM);
}else
printf ("\ndata read from device: %*s\n", 0,outputBuffer);
status = viClose (instr);
status = viClose (defaultRM);
return 0;
}
3.4 main access code:
int _tmain(int argc, _TCHAR* argv[])
{
printf ("please select the connect type ,input 1 for usbtmc,input 2 for
tcp/ip: ");
fflush (stdin);
int inputchar =getchar();
if(inputchar ==49)
{
Usbtmc_test();
}else if(inputchar ==50)
{
printf("please input tcp/ip address:");
char ip[256];
fflush(stdin);
gets(ip);
TCP_IP_Test(ip);
}
printf("Hit enter to continue.");
fflush(stdin);
getchar();
return 0;
}
4 Run the demo and get result:
Save, compile and run the project. When the instrument connects to the PC correctly, you
can choose USBTMC(1) or TCP/IP(2) to connect the instrument.
43