PWS4602, and the PWS4721 Linear DC Power Supplies. With this information, you can write computer programs to perform functions, such as setting the controls, taking measurements, performing statistical calculations, and exporting data for use in other programs. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 8
Preface PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
PC. A USBTMC driver can be installed on your PC by installing a virtual instrument communications API like TekVISA or NIVISA. These VISAs are available for download from the Tektronix or National Instruments Web sites. Once the USBTMC driver is loaded, your PC will establish communication with the power supply upon USB cable connection.
The average time it takes to both send and receive every command is approximately 20 ms. In the case of more complex commands, more time may be required to complete transmission. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
A command message is a command or query name, followed by any information the power supply needs to execute the command or query. Command messages consist of five different element types. (See Table 2-3.) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 14
(:) always returns you to the base of the command tree. Queries Queries cause the power supply to return information about its status or settings. Queries have the structure: [:]<Header> [:]<Header>[<Space><Argument>[<Comma><Argument>]...] PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
The top level of the tree is the root node; it is followed by one or more lower-level nodes. (See Figure 2-2.) Figure 2-2: Example of SCPI subsystem hierarchy tree PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 16
The upper case letters indicate the accepted short form of a command, as shown in the following figure. The accepted short form and the long form are equivalent and request the same action of the instrument. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 17
In the following figure, the second command has the same root node (STAT:QUES) as the first command, so these nodes can be omitted. Figure 2-5: Example of omitting root and lower level nodes PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 18
:source:frequency 10mhz :SOURCE:frequency 10MHZ NOTE. Quoted strings are case sensitive. No embedded spaces are allowed between or within nodes. correct :OUTPUT:FILTER:LPASS:FREQUENCY 200MHZ incorrect :OUTPUT: FILTER: LPASS:FREQUENCY 200MHZ PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
The alphabetical list provides detail on each command. (See page 2-57, Commands Listed in Alphabetical Order.) The power supply interface conforms to Tektronix standard codes and formats except where noted. The GPIB interface also conforms to IEEE Std 488.2–1987 except where noted.
Recall instrument setting from setup memory System Commands Table 2-7: System commands Header Description SYSTem:POSetup Set power-on parameters SYSTem:VERSion? Return version information SYSTem:ERRor? Return error code and error information SYSTem:KEY Set key operation PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Trigger commands are used to determine the timing of list mode sequences. Table 2-10: Trigger commands Header Description TRIGger[:IMMediate] Forces an immediate trigger event TRIGger:SOURce Set/query the source of trigger signal *TRG Generates a trigger event PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Set voltage value [SOURce:]VOLTage:PROTection:STATe Activates overvoltage protection (OVP) [SOURce:]VOLTage:PROTection[:LEVel] Set overvoltage protection (OVP) threshold [SOURce:]OUTPut:PROTection:CLEar Clear a trip condition caused by overvoltage or over-temperature, or reset a latched remote-inhibit state 2-10 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Bus Command Group These commands are used in systems that include a TEK-USB-488 bus adapter module. The TEK-USB-488 adapter module allows a GPIB controller to communicate with the power supply. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-11...
Page 24
Table 2-15: Bus commands Header Description GPIBUsb:ADDress? Allows TEK-USB-488 to query the GPIB Primary Address set for this instrument GPIBUsb:ID? Query the ID string of the TEK-USB-488 bus adapter module 2-12 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
For example, to use the abbreviated form of the command, type MEASure:SCALar:VOLTage:DC? MEAS:SCAL:VOLT:DC? *CLS (No Query Form) The *CLS command clears all event registers and queues. Group Status Syntax *CLS Related Commands *ESR?, *STB? PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-13...
Page 26
The power-on default for ESER is 0 if *PSC is 1. If *PSC is 0, the ESER maintains its value through a power cycle. 2-14 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 27
A new measurement is not initiated by this command. Group Measurement Syntax FETCh:CURRent[:DC]? Related Commands MEASure:CURRent[:DC]? Returns , which gives is the measured output current in amperes. <NR2> PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-15...
Page 28
<NR2> Examples might return 6.01667, which would be the power measured at the FETCh:POW? output of t he power supply in watts. 2-16 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 29
TEK-USB-488 bus adapter module. Group Syntax GPIBUsb:ID? Returns <manufacturer>, <model>, <serial number>, <firmware_version> Examples GPIBU:ID? *IDN? (Query Only) Returns the power supply identification code in IEEE 488.2 notation. Group Status Syntax *IDN? PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-17...
Page 30
MEASure:VOLTage[:DC]? (Query Only) This command initiates and executes a new voltage measurement, and returns the measured output voltage of the power supply. Group Measurement Syntax MEASure:VOLTage[:DC]? Related Commands FETCh:VOLTage[:DC]? 2-18 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 31
SRQ after power on. ≠ 0 sets the power-on status clear flag to true. Sending *PSC 1 therefore <NR1> enables the power-on status clear and prevents any SRQ assertion after power-on. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-19...
Page 32
Sending the *RST command does the following: Returns the power supply settings to the defaults. (See page C-1, Default Setup.) Clears the pending operation flag and associated operations 2-20 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 33
1 to 40. <NR1> Examples *SAV 2 saves the settings in memory location 2. [SOURce:]CURRent[:LEVel] This command sets the current value of the power supply in units of A or mA. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-21...
Page 34
TTL control output to <NR1>::={0|1} low or high state, respectively. Returns is a decimal representation of the state of the rear-panel <NR1>::={0|1|2|3} TTL control output and input. 2-22 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 35
It can read and control the output port DIGital state by command. It configures the TTL input and output for direct control using the [SOURce:]DIGital:DATA command. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-23...
Page 36
FIX|LIST Examples [SOURCE:]FUNCTION:MODE LIST [SOURce:]LIST:COUNt This command configures the number of times the active list will execute before stopping. Group Source Syntax [SOURce:]LIST:COUNt {<NR1>|ONCE|REPeat} [SOURce:]LIST:COUNt? Related Commands [SOURce:]LIST:MODE, [SOURce:]LIST:STEP 2-24 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 37
<NR2> specified in the query. Examples LIST:CURR 1, 3A might respond with 3.0000, which indicates the current level LIST:CURR? 1 setting for step number 1. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-25...
Page 38
1 to 8, representing a list storage location. <NR1> Examples would make the list stored in location 5 the active list for editing LIST:RCL 5 or execution. 2-26 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 39
Returns is the number of steps configured in the active list. <NR1> Examples Examples are provided at the end of this manual. (See page B-1, Programming Examples.) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-27...
Page 40
1 to 80, which is a step number in the active <NR1> list. <duration>::=<NRf><units> where <NRf> is the time duration of the step <units>::={s|ms} 2-28 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 41
This command configures the power supply to power up with its output turned off, or to return the output to the state it was in when it powered down. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-29...
Page 42
This command sets the input mode of the RI (remote inhibit) input pin. In order for this command to be effective, the rear panel TTL input and output must be configured in RI/DFI mode using the [SOURce:]DIGital:FUNCtion command. Group Source 2-30 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 43
This command turns the power supply output channel on or off. Group Source Syntax [SOURce:]OUTPut[:STATe] {0|1|ON|OFF} [SOURce:]OUTPut[:STATe]? Related Commands [SOURce:]OUTPut:TIMer[:STATe] Arguments turns the power supply output off. turns the power supply output on. Returns PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-31...
Page 44
This command turns the output timer function on and off. When the timer is activated and a duration is set, the output of the power supply will turn off 2-32 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 45
Related Commands [SOURce:]CURRent[:LEVel] Arguments <voltage> where <voltage>::=<NRf><units> is a flexible decimal specifying the voltage setting, ranging from 0 to the <NRf> maximum nameplate voltage of the power supply. <units>::={V|mV|kV} PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-33...
Page 46
: sets the OVP level to the default level, which is equal to Returns is the OVP threshold in volts. <NR2> : set to minimum OVP level. : set to maximum OVP level. 2-34 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 47
This command corresponds to the front-panel Max Voltage setting that can be found under the Protection submenu. This function is different from OVP, since it cannot turn the output off. Group Source Syntax [SOURce:]VOLTage:RANGe {<voltage>|MIN|MAX|DEF} [SOURce:]VOLTage:RANGe? PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-35...
Page 48
Using an out-of-range value causes an execution error. The power-on default for SRER is 0 if *PSC is 1. If *PSC is 0, the SRER maintains its value through a power cycle. 2-36 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 49
Status Byte Register (SBR). Details about the status registers are available in this manual. (See page 3-1, Status and Events.) Group Status Syntax STATus:OPERation:ENABle <NR1> STATus:OPERation:ENABle? Related Commands STATus:OPERation:CONDition?, STATus:OPERation[:EVENt]? Arguments <mask>::=<NR1> where PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-37...
Page 50
This command returns the contents of the questionable condition register (QCR). Details about the QCR are available in this manual. (See page 3-1, Status and Events.) Group Status Syntax STATus:QUEStionable:CONDition? 2-38 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 51
? might return , which would indicate that STATUS:QUESTIONABLE:ENABLE only a transition of the Remote Inhibit bit of the QCR would affect the QUES bit of the Status Byte Register. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-39...
Page 52
STATus:QUEStionable:ENABle, STATus:QUEStionable[:EVENt]?, STATus:QUEStionable:CONDition?, STATus:QUEStionable:PTRansition Arguments <mask>::=<NR1> where is a number ranging from 0 through 255. The binary bits of the <NR1> Questionable NTR register are set according to this value. 2-40 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 53
The byte query returns the contents of the Status Byte Register (SBR) using the Master Summary Status (MSS) bit. Refer to the Status and Events chapter for more information. (See page 3-3.) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-41...
Page 54
This command can produce the same effect as pressing one of the front-panel buttons. The instrument must be in local mode in order for this command to simulate a front-panel button press. Group System Syntax SYSTem:KEY <NR1> SYSTem:KEY? 2-42 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 55
Shift key. SYSTEM:KEY 64 SYSTem:LOCal (No Query Form) This command sets the power supply for control from the front-panel. Group System Syntax SYSTem:LOCal PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-43...
Page 56
SYSTem:REMote (No Query Form) This command sets the power supply to remote control mode. Group System Syntax SYSTem:REMote Related Commands SYSTem:LOCal, SYSTem:RWLock 2-44 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 57
<NR2> Examples might return , which is the SCPI version number. SYSTEM:VERSION? 1991.0 *TRG (No Query Form) This command generates a trigger event. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-45...
Page 58
Arguments : When this value is sent, the power supply will wait for a trigger from the MANual front-panel. Press Shift + 3 (Trigger) to trigger the power supply. 2-46 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 59
Self test code descriptions are available. (See Table 3-10 on page 3-10.) *WAI (No Query Form) This command prevents the instrument from executing further commands or queries until all pending commands are complete. Group Synchronization Syntax *WAI Examples *WAI PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 2-47...
Page 60
Commands Listed in Alphabetical Order 2-48 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
The error and event reporting system consists of the following three blocks: Standard/Event Status Operation Status Questionable Status The operations processed in these blocks are summarized in status bytes, which provide the error and event data. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 64
Status and Events Figure 3-1: Error and event handling process PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
7 (MSB) Indicates that an operation Operation Status Bit. event has occurred. Obtained from a serial poll. Shows Request Service. that the power supply requests service from the GPIB controller. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 66
This bit is not used. Request Control. 0 (LSB) Shows that the operation Operation Complete. is complete. This bit is set when all pending operations complete following an *OPC command. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 67
———— This bit is not used. 7 (MSB) ———— This bit is not used. ———— This bit is not used. Protection Shutdown. This bit indicates the state of the Remote Inhibit. Remote Inhibit input. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 68
Various commands set the bits in the Enable Registers. The Enable Registers and the commands used to set them are described below. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 69
QEVR bit is set. Use the STATus:QUEStionable:ENABle command to set the bits in the QENR Use the STATus:QUEStionable:ENABle? query to read the contents of the QENR Figure 3-9: The Questionable Enable Register (QENR) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
PWS4000 Series Linear DC Power Supplies. Table 3-5: No event messages Code Message No events to report; queue empty No events to report; new events pending *ESR? PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 71
Too much data –224 Illegal parameter value –225 Out of memory –270 Macro error –272 Macro execution error –273 Illegal macro label –276 Macro recursion error –277 Macro redefinition not allowed PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 72
Mainframe Initialization Lost Module Calibration Lost Non-volatile RAM STATE section checksum failed Non-volatile RAM RST section checksum failed RAM selftest Flash write failed Flash erase failed Digital I/O selftest error 3-10 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 73
Computed programming cal constants are incorrect Incorrect sequence of calibration commands CV or CC status is incorrect for this command FETCH of data that was not acquired Measurement overrange PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual 3-11...
Page 74
Status and Events 3-12 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
\n", Buffer); SendSCPI("*RST"); //reset the power supply SendSCPI("CURRENT 0.1A"); //set the current to 0.1A SendSCPI("VOLTAGE 3V"); //set the voltage to 3V SendSCPI("OUTPUT 1"); // turn output on PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 80
//Open communication session with the power supply, and put the power supply in remote ErrorStatus = viOpenDefaultRM(& defaultRM); ErrorStatus =viOpen(defaultRM, "USB0::0X0699::0X0391::006002206573001001::INSTR",0,0,&PWS4000); CheckError("Unable to open the port"); SendSCPI("SYSTEM:REMOTE"); void SendSCPI(char* pString) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 82
20 times. It saves the list in location 1, and then places the instrument in list mode and runs the list. SYSTEM:REMOTE *RST TRIGGER:SOURCE BUS LIST:MODE CONT LIST:COUNT 20 LIST:STEP 2 PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 83
ViSession PWS4000; //Identifies the power supply long ErrorStatus; char commandString[256]; char ReadBuffer[256]; // Some compilers do not require that void arguments be declared, however, all should accept declaration of // void argument lists. PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 84
CheckError("Unable to set list count"); ErrorStatus = viPrintf(PWS4000,"LIST:STEP %d\n",List_step); //set the list step CheckError("Unable to set list step"); /*set the list voltage, current and time */ for(i = 1; i<= List_step; i+=1) PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 85
} while (OPERreg & 0x20); printf("List finished\n"); ClosePort(); while(1); //return 0; void OpenPort() //Open communication session with the power supply ErrorStatus = viOpenDefaultRM(& defaultRM); ErrorStatus =viOpen(defaultRM, "USB0::0X0699::0X0391::006002206573001001::INSTR",0,0,&PWS4000); CheckError("Unable to open the port"); SendSCPI("SYSTEM:REMOTE"); PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
The following table lists the settings that are restored when you return the power supply to default settings. Table C-1: Default settings Menu or system Default setting VOLT:PROT VOLT:PROT:STAT OUTP VOLT VOLT:RANG CURR 0.1 A OUTP:TIM OUTP:TIM:STAT PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Page 88
Appendix C: Default Setup PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual...
Need help?
Do you have a question about the PWS4205 and is the answer not in the manual?
Questions and answers