PEAKTECH 4124 A Instructions

SCPI Protocol - Table of Contents
1. Introduction to the SCPI Language ..................................................................................... 1
1.1. Communication Interfaces ........................................................................................ 1
1.2. Command Syntax ....................................................................................................... 1
1.3. Symbol Description .................................................................................................... 2
1.4. Programmed Parameter Type .................................................................................. 2
1.5. Command Abbreviation ............................................................................................. 3
1.6. Available Command for Different Model ................................................................. 4
2. Common Commands ............................................................................................................. 5
1. *IDN .................................................................................................................................. 5
2. *RST ................................................................................................................................. 5
3. :FUNCtion Commands .......................................................................................................... 6
1. :FUNCtion ........................................................................................................................ 6
2. :FUNCtion:SINE:LOAD .................................................................................................. 6
3. :FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:FREQuency ................................. 7
4. :FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:PERiod.......................................... 7
5. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:AMPLitude ....................... 7
6. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:OFFSet ............................ 8
7. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:HIGHt ............................... 8
8. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:LOW ................................. 9
9. :FUNCtion:{SQUare|PULSe}:DTYCycle ..................................................................... 9
10. :FUNCtion:RAMP:SYMMetry .................................................................................... 9
i
11. :FUNCtion:PULSe:WIDTh ....................................................................................... 10
12. :FUNCtion:ARB:BUILtinwform ................................................................................ 10
13. :FUNCtion:ARB:FILE ............................................................................................... 11
14. :FUNCtion:DC:VOLTage .......................................................................................... 11
15. :FUNCtion:{AM|FM|PM|PWM}:SHAPe .................................................................. 11
16. :FUNCtion:{AM|FM|PM|PWM}:FREQuency ......................................................... 12
17. :FUNCtion:AM:DEPTh ............................................................................................. 12
18. :FUNCtion:{AM|FM|PM|FSK|PWM}:SOURce ...................................................... 13
19. :FUNCtion:FM:DEViation ........................................................................................ 13
20. :FUNCtion:PM:PHASe ............................................................................................. 13
21. :FUNCtion:FSK:RATE .............................................................................................. 14
22. :FUNCtion:FSK:HOPFreq ....................................................................................... 14
23. :FUNCtion:PWM:DEViation .................................................................................... 14
24. :FUNCtion:SWEep:SWEeptime ............................................................................. 15
25. :FUNCtion:SWEep:SPACing .................................................................................. 15
26. :FUNCtion:SWEep:STARtfreq ................................................................................ 16
27. :FUNCtion:SWEep:STOPfreq ................................................................................. 16
28. :FUNCtion:SWEep:CENTrefreq ............................................................................. 16
29. :FUNCtion:SWEep:SPAN ........................................................................................ 17
30. :FUNCtion:SWEep:SOURce ................................................................................... 17
31. :FUNCtion: SWEep:TRIGger ......................................................................................... 18
32. :FUNCtion:BURSt:PERiod ...................................................................................... 18
33. :FUNCtion:BURSt:PHASe ....................................................................................... 18
34. :FUNCtion:BURSt:MODE ........................................................................................ 19
ii
35. :FUNCtion:BURSt:NCYCle ..................................................................................... 19
36. :FUNCtion:BURSt:INFinite ...................................................................................... 20
37. :FUNCtion:BURSt:POLarity .................................................................................... 20
38. :FUNCtion:BURSt:SOURce .................................................................................... 20
39. :FUNCtion:BURSt:TRIGger ........................................................................................... 21
4. :FILE Commands.................................................................................................................. 22
1. :FILE:UPLoad................................................................................................................ 22
2. :FILE:DOWNload .......................................................................................................... 22
3. :FILE:FILEname ............................................................................................................ 22
4. :FILE:DELete ..................................................................................................................... 23
5. :SYSTem Commands .......................................................................................................... 24
1. :SYSTem:VERSion ....................................................................................................... 24
2. :SYSTem:CLKSrc ......................................................................................................... 24
3. :SYSTem:LANGuage ................................................................................................... 24
6. :CHANnel Commands ......................................................................................................... 26
1. :CHANnel ....................................................................................................................... 26
2. :CHANnel:CH1 .............................................................................................................. 26
3. :CHANnel:CH2 .............................................................................................................. 26
7. :COUNter Commands .......................................................................................................... 28
1. :COUNter:FREQuency ................................................................................................ 28
2. :COUNter:PERiod ........................................................................................................ 28
3. :COUNter:PWIDth ........................................................................................................ 28
4. :COUNter:DTYCycle .................................................................................................... 29
5. :COUNter:COUPling .................................................................................................... 29
iii
6. :COUNter:SENSitivity .................................................................................................. 29
7. :COUNter:HFR .............................................................................................................. 30
8. :COUNter:TRIGlev ....................................................................................................... 30
8. Application Examples .......................................................................................................... 31
E.g. 1: To Generate a Sine Wave via CH1 ....................................................................... 31
E.g. 2: To Generate a Built-in Arbitrary Wave via CH2 ................................................... 32
E.g. 3: To Generate a FSK Wave via CH1........................................................................ 33
E.g. 4: To Generate a Linear Sweep Wave via CH1 and a Ramp Wave via CH2 ...... 34
Appendix .................................................................................................................................... 36
AppendixⅡ:Commands Reference ........................................................................................ 37
iv
1. Introduction to the SCPI Language
1.1. Communication Interfaces
Computers communicate with the P4120 - 4165 series generator by sending and receiving commands over USB or RS232 interface. Command is sent and identified in the form of ASCII character strings for users to easily control the generator and do user-defined development. Operations that you can do with a computer and a generator include: Set the generator and output waveforms from the generator.
Connection: Please connect the USB Device port at the rear panel of the generator with the corresponding USB interface on the computer using an USB cable, or connect the RS232 port at the rear panel of the generator with the corresponding RS232 interface on the computer using an RS232 cable.
1.2. Command Syntax
The command systems of this series present a hierarchy structure (tree system) and each command consists of a “Root” keyword and one or multiple sub-keywords. The keywords are separated by ":" and are followed by the parameter settings available, "?" is added at the end of the command string to indicate query and the command and parameter are separated by "space".
For example,
:FUNCtion:SQUare:DTYCycle {<percent> }
:FUNCtion:SQUare:DTYCycle? FUNCtion is the root keyword of the command, SQUare and DTYCycle are the
second-level and third-level keywords respectively, all the keywords are separated by “:”. <percent> denotes the parameter that users can set, the default unit of the numerical parameters are listed in Appendix
FUNCtion:SQUare:DTYCycle and parameter are separated by “space”. All the command
strings begin with ":" or "*" and have no terminator ("\n" or "\r \n" can be recognized as terminator also). The commands can be sent continuously (have command execution queue), the program will be executed in sequence. If the command is correct, "->\n" will be returned; if wrong, "=?\n" will be returned. If the parameter is invalid or the command
; “?” denotes query; the command
1
does not work, "NULL\n" will be returned. After one of the complete commands, if the following command has the same first-level
keyword or the same first-level and second-level keywords (keywords have 3 levels most), the same keywords in the following command can be omit, the command can be written as the rest parts.
E.g.
:func:sine:freq 1000 //Complete command
:ampl 2 //Omit first-level func and second-level sine
:squ:offset 1 //Omit first-level func
1.3. Symbol Description
Following symbols are usually used to assist to explain the parameters contained in a command.
a) Braces { }
The options enclosed in a { } are parameters available in the command. Only one
option could be selected every time, and all the options are separated by “|”. For
example, {ON|OFF} indicateds that ON or OFF can be selected.
b) Triangle Brackets < >
The parameter enclosed in < > must be replaced by an effective value.
For example,
:FUNCtion:SINE:FREQuency <value>
wherein, <value> must be a numerical value, such as:
:FUNCtion:SINE:FREQuency 1000
1.4. Programmed Parameter Type
The commands contain 5 kinds of parameters, different parameters have different setting methods.
2
a) Boolean Parameters
The parameters could be “OFF” or “ON” (“0” or “1”), for example,
:CHANnel:CH1 {OFF|ON}
“OFF” denotes disabling the output of CH1. “On” denotes enabling the output of CH1.
b) Consecutive Integer Parameters
The parameters could be a consecutive integer, for example,
:FUNCtion:ARB:BUILtinwform <value>
<value> could be any integer between 0 and 25(including 0 and 25).
c) Consecutive Real Number Parameters
The parameters could be any value within the effective range and with the required precision, for example,
FREQuency {<frequency>}
For sine wave, <frequency> could be any real number between 1uHz and 25MHz.
d) ASCII Character String
The parameters should be the combinations of ASCII characters, for example,
:AM:SOURce <modulation signal source>
<modulation signal source> is a character string defined inside.
1.5. Command Abbreviation
All the commands are case-insensitive, so you can use any kind of them. But if abbreviation is used, all the capital letters specified in commands must be written completely. For example,
FUNCtion:SQUare:AMPLitude? also can be:
FUNC:SQU:AMPL? or func:squ:ampl? or fUnC:sQu:AmPL?
3
1.6. Available Command for Different Model
Note: Not every model of this series has the same functions, as for example some entry-level devices do not have any modulation modes. So all SCPI command for these (not integrated) functions will not work and are invalid. For models without frequency counter, all command for the counter are invalid.
4
1. *IDN
Syntax
*IDN?
Function
Query ID character string of instrument.
Explanations
The query returns 4 character segments separated by commas “,”: manufacturer, model, serial number and the edition number.
Example
*IDN? returns PeakTech,P4120,P41200221331030,V_4.0.1
2. *RST
Syntax
*RST
Function
Restore the instrument to its default value.
Explanations
Example
*RST
2. Common Commands
This Series supports following IEEE488.2 commands:
5
1. :FUNCtion
Syntax
:FUNCtion?
:FUNCtion {SINE|SQUare|RAMP|PULSe|NOISe|ARB|DC|AM|FM|PM|FSK|PWM|S WEep|BURSt}
Function
Query/set the waveform function for current channel.
Explanations
This command work on the current selected channel by default. If you want to set the other channel, you need switch channel first (refer to the command of channel control, such as CHANnel CH2).
Example
:FUNCtion RAMP
2. :FUNCtion:SINE:LOAD
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB|DC}:LOAD?
:FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB|DC}:LOAD {ON|OFF|<ohm>}
Function
Query/set the load of current channel.
Explanations
Ω is the unit of <ohm>, the default is 50Ω. "OFF" sets the output terminal
as “High Z”; "ON" sets it as the setting value.
{SINE|SQUare|RAMP|PULSe|NOISe|ARB|DC} have the public parameter "LOAD". Only take SINE for instance here, other waveforms will not be repeated.
3. :FUNCtion Commands
The control commands of waveform function are as follows:
6
Example
:FUNCtion:SINE:LOAD 123
3. :FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:FREQuency
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:FREQuency?
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:FREQuency {<frequency>}
Function
Query/set the frequency of output function for current channel.
Explanations
<frequency> is the frequency set by user, the default unit is Hz. NOISE does not have frequency parameter. The query returns the frequency set in scientific notation, such as: 1.000000E+04
Example
:FUNCtion:RAMP:FREQuency 10000
4. :FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:PERiod
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:PERiod?
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:PERiod {<period>}
Function
Query/set the period of output function for current channel.
Explanations
<period> is the setting value of period, the default unit is S.
Example
:FUNCtion:RAMP:PERiod? returns 1.000000E-03
5. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:AMPLitude
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:AMPLitude?
7
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:AMPLitude {<amplitude>}
Function
Query/set the amplitude (PK-PK) of output function for current channel.
Explanations
<amplitude> is the amplitude set by users, the default unit is Vpp.
Example
:FUNCtion:RAMP:AMPLitude 2 sets the amplitude as 2Vpp
6. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:OFFSet
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:OFFSet?
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:OFFSet {<offset>}
Function
Query/set the offset voltage of output function for current channel.
Explanations
< offset >is the offset voltage set by users, the default unit is V.
Example
:FUNCtion:RAMP:OFFSet 2 sets the offset voltage as 2V.
7. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:HIGHt
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:HIGHt?
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:HIGHt {<high level>}
Function
Query/set the high level of output function for current channel.
Explanations
<high level> is the high level set by users, the default unit is V.
Example
:FUNCtion:RAMP:HIGHt 2 sets the high level as 2V.
8
8. :FUNCtion:{SINE|SQUare|RAMP|PULSe|NOISe|ARB}:LOW
Syntax
:FUNCtion:{SINE|SQUare|RAMP|PULSe|ARB}:LOW?
:FUNCtion:{SINE|SQUare|RAMP|PULSe |ARB}:LOW {<low level>}
Function
Query/set the low level of output function for current channel.
Explanations
<low level> is the low level set by users, the default unit is V.
Example
:FUNCtion:RAMP:LOW 2 sets the low level as 2V.
9. :FUNCtion:{SQUare|PULSe}:DTYCycle
Syntax
:FUNCtion:{ SQUare|PULSe }:DTYCycle?
:FUNCtion:{ SQUare|PULSe }:DTYCycle {<duty cycle>}
Function
Query/set the duty cycle of square/pulse wave for current channel.
Explanations
<percent> is the percent of duty cycle set by users, the default unit is %.
Example
:FUNCtion:SQUare:DTYCycle 20 sets the duty cycle of square wave as 20%
10. :FUNCtion:RAMP:SYMMetry
Syntax
:FUNCtion:RAMP:SYMMetry?
:FUNCtion:RAMP:SYMMetry {<symmetry>}
Function
Query/set the symmetry of ramp wave for current channel.
Explanations
<symmetry> is the percent of symmetry set by users, the default unit is %.
9
Loading...
+ 30 hidden pages