The following general safety precautions must be observed during all phases of operation of this
instrument. Failure to comply with these precautions or with specific warnings elsewhere in this
manual violates safety standards of design, manufacture, and intended use of the instrument. We
assume no liability for the customer’s failure to comply with these requirements.
ENVIRONMENTAL CONDITIONS
This instrument is intended for indoor use, pollution degree 2 environments. It is designed to operate
at a maximum relative humidity of 95% and at altitudes of up to 2000 meters. Refer to the
specifications tables for the AC mains voltage requirements and ambient operating temperature range.
BEFORE APPLYING POWER
Verify that all safety precautions are taken. Note the instrument's external markings described under
"Safety Symbols".
GROUND THE INSTRUMENT
This product is a Safety Class 1 instrument (provided with a protective earth terminal). To minimize
shock hazard, the instrument chassis and cover must be connected to an electrical ground. The
instrument must be connected to the AC mains power through a grounded power cable, with the
ground wire firmly connected to an electrical ground (safety ground) at the power outlet. Note: Any
interruption of the protective (grounding) conductor or disconnection of the protective earth terminal
will cause a potential shock hazard that could result in personal injury.
DO NOT OPERATE IN AN EXPLOSIVE ATMOSPHERE
Do not operate the instrument in the presence of fumes or flammable gases.
KEEP AWAY FROM LIVE CIRCUITS
Operating personnel must not remove instrument covers except as instructed in this guide for
installing or removing electronic load modules. Component replacement and internal adjustments
must be made only by qualified service personnel. Do not replace components with power cable
connected. Under certain conditions dangerous voltages may exist even with the power cable
removed. To avoid injuries, always disconnect power, discharge circuits, and remove external voltage
sources before touching components.
DO NOT SERVICE OR ADJUST ALONE
Do not try to do some internal service or adjustment unless another person capable of rendering first
aid resuscitation is present.
Direct current
Safety Symbols
Alternating current
Both direct and alternating current
Protective earth (ground) terminal
Attention (refer to accompanying documents)
WARNING
The WARNING sign denotes a hazard. It calls attention to a procedure, practice, or the like, which,
if not correctly performed or adhered to, could result in personal injury. Do not proceed beyond a
WARNING sign until the indicated conditions are fully understood and met.
CAUTION
The CAUTION sign denotes a hazard. It calls attention to an operating procedure, or the like, which,
if not correctly performed or adhered to, could result in damage to or destruction of part or all of
the product. Do not proceed beyond a CAUTION sign until the indicated conditions are fully
understood and met.
Compliance Statements
Disposal of Old Electrical & Electronic Equipment (Applicable in the European Union and other
European countries with separate collection systems)
This product is subject to Directive 2002/96/EC of the European Parliament and the Council of the
European Union on waste electrical and electronic equipment (WEEE), and in jurisdictions adopting
that Directive, is marked as being put on the market after August 13, 2005, and should not be disposed
of as unsorted municipal waste. Please utilize your local WEEE collection facilities in the disposition of
this product and otherwise observe all applicable requirements.
CE Declaration of Conformity
The DC electronic load meets the requirements of Low Voltage Directive 73/23/EEC and
Electromagnetic Compatibility Directive 89/336/EEC amended by 93/68/EEC.
In local mode, the electronic load is controlled from the front panel but
Group Execute
Trigger
Chapter 1
Introduction to Programming
This guide contains programming information for the B&K Precision MDL Series DC Electronic Load.
Models in this series include the MDL001, MDL002, MDL200, MDL252, MDL305, MDL400, MDL505,
and MDL600. Unless otherwise noted, this document will refer to all of these instruments as
“electronic load”.
1.1 GPIB Capabilities of the Electronic Load
All electronic load functions except for setting the communication parameters are programmable over
the GPIB. The IEEE 488.2 capabilities of the electronic load are described in the table below.
GPIB Capabilities
All electronic load functions except for setting the communication
Talker/Listener
Service Request
Remote/Local
Device Trigger The electronic load will respond to the device trigger function. DT1
parameters are programmable over the GPIB. The electronic load can
send and receive messages over the GPIB. Status information is sent
using a serial poll.
The electronic load sets the SRQ line true if there is an enabled service
will also execute commands sent over the GPIB. The electronic load
powers up in local mode and remains in local mode until it receives a
command over the GPIB. Once the electronic load is in remote mode,
the front panel REM annunciator turns on, all front panel keys (except
Shift + Local) are disabled, and the display is in normal metering mode.
Pressing Shift + Local on the front panel returns the electronic load to
local mode. This can be disabled using local lockout so that only the
controller or the power switch can return the electronic load to local
mode.
Response
AH1, SH1,
T6, L4
SR1
RL1
The electronic load will respond to the group execute trigger function.
GET
6
The electronic load responds to the Device Clear (DCL) and
Selected Device Clear (SDC) interface commands. They cause the
Device Clear
GPIB Address
The electronic load operates from a GPIB address that is set from the front panel. To set the GPIB
address, press Shift + ⑦ (System menu) on the front panel and enter the address using the Entry keys.
The address can be set from 0 to 30. The GPIB address is stored in non-volatile memory.
electronic load to clear any activity that would prevent it from
receiving and executing a new command (including *WAI and
*OPC?). DCL and SDC do not change any programmed settings.
DCL,SDC
1.2 RS-232 Capabilities of the Electronic Load
Use a cable with two serial interfaces (DB9) to connect the electronic load and PC. It can be activated
by selecting <RS-232> in <Communication> of the System menu (Shift + ⑦ on the front panel). NOTE:
There are two serial interfaces on the rear panel of the MDL001: the left 9-pin COM interface is the RS232 communication interface and the right 9-pin COM serial port connection is not for use. All SCPI
commands are available through RS-232 programming. The EIA RS-232 standard defines the
interconnections between data terminal equipment (DTE) and data communications equipment (DCE).
The electronic load is designed to be a DTE and can be connected to another DTE such as a PC COM
port through a null modem cable.
NOTE: The RS-232 settings in your program must match the settings specified in the front panel System
menu. Press Shift + ⑦ on the front panel to enter the System menu if you need to change the
settings. You can break data transmissions by sending a ^C or ^X character string to the electronic load.
This clears any pending operation and discards any pending output.
RS-232 Data Format
The RS-232 data is a 10-bit word with one start bit and one stop bit.
The number of start and stop bits are not programmable. However, the following parameters are
selectable in the System menu using the front panel Shift + ⑦ key.
Parity=None Start Bit 8 Data Bits Stop Bit
7
Baud Rate
The System menu (Shift + ⑦) lets you select one of the following baud rates, which are stored in nonvolatile memory: 4800, 9600, 19200, 38400, 57600, or 115200.
Parity
None - eight data bits without parity
Even - seven data bits with even parity
Odd - seven data bits with odd parity
RS-232 Flow Control
The RS-232 interface supports the following flow control options. For each case, the electronic load will
send a maximum of five characters after hold-off is asserted by the controller. The electronic load is
capable of receiving as many as fifteen additional characters after it asserts hold-off.
• The electronic load asserts its Request to Send (RTS) line to signal hold-off when its input buffer
is almost full, and it interprets its Clear to Send (CTS) line as a hold-off signal from the
controller.
• When the input queue of the electronic load becomes more than ¾ full, the instrument issues
an X-OFF command. The control program should respond to this and stop sending characters
until the electronic load issues the X-ON, which it will do once its input buffer has dropped
below half-full. The electronic load recognizes X_ON and X_OFF sent from the controller. An XOFF will cause the electronic load to stop outputting characters until it sees an X-ON.
• NONE: There is no flow control.
Flow control options are stored in non-volatile memory.
RS-232 Connections
The RS-232 serial port can be connected to the serial port of a controller (i.e., personal computer) using
a null modem RS-232 cable terminated with DB-9 connectors. Figure 1 shows the pinout for the
connector.
If your computer uses a DB-25 connector for the RS-232 interface, you will need a cable or adapter
with a DB-25 connector on one end and a DB-9 connector on the other. It must be a straight-through
(not null modem) cable.
Figure 1 - RS-232 Connector Pinout
8
Pin Signal Description
1
NC
No Connection
2
TXD
Transmit Data
3
RXD
Receive Data
4
NC
No Connection
5
GND
Ground
6
NC
No Connection
7
CTS
Clear to Send
8
RTS
Ready to Send
9
NC
No Connection
RS-232 Troubleshooting
If you are having trouble communicating over the RS-232 interface, check the following:
• The computer and the electronic load must be configured for the same baud rate, parity,
number of data bits, and flow control options. Note that the electronic load is configured for 1
start bit and 1 stop bit (these values are fixed).
• The correct interface cables or adapters must be used, as described under the RS-232
connector. Note that even if the cable has the proper connectors for your system, the internal
wiring may be incorrect.
• The interface cable must be connected to the correct serial port on your computer (COM1,
COM2, etc.) and the correct 9-pin serial port on the mainframe.
1.3 USB-TMC Capabilities of the Electronic Load
All electronic load functions are programmable over the USB.
The USB488 interface capabilities of the electronic load are described below:
• The interface is IEEE 488.2 standard USB488 interface.
• The interface accepts REN_CONTROL, GO_TO_LOCAL, and LOCAL_LOCKOUT requests.
• The interface accepts MsgID = TRIGGER USBTMC command message and forwards TRIGGER
requests to the function layer.
The USB488 device capabilities of the electronic load are described below:
• The device understands all mandatory SCPI commands.
• The device is SR1 capable.
• The device is RL1 capable.
• The device is DT1 capable.
9
1.4 Programming the Status Registers
You can use status register programming to determine the operating condition of the electronic load at
any time. For example, you may program the electronic load to generate an interrupt (assert SRQ)
when an event such as a current protection occurs. When the interrupt occurs, your program can then
act on the event in the appropriate fashion.
The following table defines the status bits. Figure shows the status register structure of the electronic
load. The Standard Event, Status Byte, and Service Request Enable registers and the Output Queue
perform standard GPIB functions as defined in the IEEE 488.2 Standard Digital Interface for Programmable Instrumentation. The Operation Status and Questionable Status registers implement
functions that are specific to the electronic load.
Bit Configurations of Status Registers
Operation Status Group
Bit Signal Meaning
0 CALCalibrating. The electronic load is computing new calibration constants.
5 TRGWaiting. The electronic load is waiting for a trigger.
Channel Status Group
Bit Signal Meaning
Voltage Fault. Either an overvoltage or a reverse voltage has occurred. This bit
0 VF
1 OC
2 RSRemote Sense. When the remote sense is connected, this bit is set.
reflects the active state of the FLT pin on the back of the unit. The bit remains
set until the condition is removed and INP:PROT:CLE is programmed.
Overcurrent. An overcurrent condition has occurred. This occurs if the current
exceeds 102% of the rated current or if it exceeds the user-programmed
current protection level. Removing the overcurrent condition clears the bit. If
the condition persists beyond the user programmable delay time, PS bit is also
set and the input is turned off. Both bits remain set until the condition is
removed and INP:PROT:CLE is programmed.
10
Overpower. An overpower condition has occurred. This occurs if the unit
and PS bit are set and the input is turned off. Both bits remain set until the unit
ense terminals. Both this bit and VF bit are set. Removing the reverse voltage
it remains set until INP:PROT:CLE is
An overvoltage condition has occurred. Both this bit and VF bit 0
an overcurrent, overpower, or overtemperature condition. The bit remains set
exceeds the max power or it exceeds the user-programmed power protection
3 OP
4 OT
7 RUNList run or stop status. When list is running, this bit is set.
8 EPUExtended Power Unavailable. This bit is not used.
9 RRV
level. Removing the overpower condition clears the bit. If the condition
persists beyond the user programmable delay time, PS bit is also set and the
input is turned off. Both bits remain set until the condition is removed and
INP:PROT:CLE is programmed.
Overtemperature. An overtemperature condition has occurred. Both this bit
is cooled down and INP:PROT:CLE is programmed.
Remote Reverse Voltage. A reverse voltage condition has occurred on the
s
clears this bit but does not clear VF bit. VF b
programmed.
10 UNR
11 LRV
12 OV
13 PS
14 VON
Unregulated. The input is unregulated. When the input is regulated this bit is
cleared.
Local Reverse Voltage. A reverse voltage condition has occurred on the input
terminals. Both this bit and VF bit are set. Removing the reverse voltage clears
this bit but does not clear PS bit. PS bit remains set until INP:PROT:CLE is
programmed.
Overvoltage.
are set and the electronic loads are turned off. Both bits remain set until the
condition is removed and INP:PROT:CLE is programmed.
Protection Shutdown. The protection shutdown circuit has tripped because of
until INP:PROT:CLE is programmed.
Voltage of sink current on. When the voltage of input exceeds the userprogrammed Von level, this bit is set.
15 TBF Trace Buffer Full.
11
Operation Complete. The load has completed all pending operations. *OPC
complete.
The output queue was read with no data present or the data was
Command Error. A syntax or semantic error has occurred or the load received
a <get> within a program message. Errors in the range of 199 through 100 can
set this bit.
Bit Signal Meaning
Questionable Status Group
Same as Channel Status Group
Standard Event Status Group
0 OPC
2 QYE
3 DDE
4 EXE
5 CME
7 PON
Bit Signal Meaning
must be programmed for this bit to be set when pending operations are
Query Error.
lost. Errors in the range of 499 through 400 can set this bit.
Device-Dependent Error. Memory was lost or self-test failed. Errors in the
range of 399 through 300 can set this bit.
Execution Error. A command parameter was outside its legal range,
inconsistent with the load's operation, or prevented from executing because
of an operating condition. Errors in the range of 299 through 200 can set this
bit.
Power-On. The unit has been turned off and then on since this bit was last
read.
Status Byte and Service Request Enable Registers
0 CSUMChannel Summary. Indicates if an enabled channel event has occurred.
2 EAVError Available Summary. Indicates if the Error Queue contains data.
3 QUES
4 MAVMessage Available Summary. Indicates if the Output Queue contains data.
5 ESBEvent Status Summary. Indicates if an enabled standard event has occurred.
6 RQS/MSS
7 OPEROperation Status Summary. Indicates if an operation event has occurred.
Questionable Status Summary. Indicates if an enabled questionable event has
occurred.
Request Service. During a serial poll, RQS is returned and cleared.
Master Status Summary. For an *STB? query, MSS is returned without being
cleared.
12
Figure 2 - Load Status Register Structure
13
Condition registers
All status register sets have a condition register. A condition register is a real-time, read-only register
that constantly updates to reflect the current operating conditions of the instrument.
Use the :CONDition? query commands in the STATus Subsystem to read the condition registers. See
Chapter 3 for more information.
Event registers
Each status register set has an event register. An event register is a latched, read-only register whose
bits are set by the corresponding condition register. Once a bit in an event register is set, it remains set
(latched) until the register is cleared by a specific clearing operation. The bits of an event register are
logically ANDed with the bits of the corresponding enable register and applied to an OR gate. The
output of the OR gate is applied to the Status Byte Register.
Use the *ESR? Common Command to read the Standard Event Register. All other event registers are
read using the :EVENt? query commands in the STATus Subsystem. See Chapter 3 for more
information.
An event register is cleared when it is read. The following operations clear all event registers:
• Cycling power
• Sending *CLS
Enable registers
Each status register set has an enable register. An enable register is programmed by you and serves as
a mask for the corresponding event register. An event bit is masked when the corresponding bit in the
enable register is cleared (0). When masked, a set bit in an event register cannot set a bit in the Status
Byte Register (1 AND 0 = 0). To use the Status Byte Register to detect events (i.e., serial poll), you must
unmask the events by setting (1) the appropriate bits of the enable registers. To program and query
*
the Standard Event Status Register, use the
ESE and *ESE? Common Commands respectively. All other
enable registers are programmed and queried using the :ENABle and :ENABLe? commands in the
STATus Subsystem. See Chapter 3 for more information.
An enable register is not cleared when it is read. The following operations affect the enable registers:
• Cycling power clears all enable registers
• :STATus:PREset clears the following enable registers:
o Operation Event Enable Register
o Questionable Event Enable Register
o Channel Summary Event Enable Register
• *ESE 0 clears the Standard Event Status Enable Register.
Output queue
The output queue holds data that pertains to the normal operation of the instrument. For example,
when a query command is sent, the response message is placed on the output queue.
14
When data is placed in the output queue, the Message Available (MAV) bit in the Status Byte Register
gets set. A data message is cleared from the output queue when it is read. The output queue is
considered cleared when it is empty. An empty output queue clears the MAV bit in the Status Byte
Register.
Error queue
The error queue holds error and status messages. When an error or status event occurs, a message
that defines the error/status is placed in the error queue. This queue will hold up to 10 messages.
When a message is placed in the error queue, the Error Available (EAV) bit in the Status Byte Register is
set. An error message is cleared from the Error/Status queue when it is read. The error queue is
considered cleared when it is empty. An empty error queue clears the EAV bit in the Status Byte
Register. Read an error message from the error queue by sending the following SCPI query command:
:SYSTem:ERRor?
Status Byte and Service Request (SRQ)
Service request is controlled by two 8-bit registers: the Status Byte Register and the Service Request
Enable Register.
Status Byte Register
The summary messages from the status registers and queues are used to set or clear the appropriate
bits (B0, B2, B3, B4, B5, and B7) of the Status Byte Register. These bits do not latch, and their states (0
or 1) are solely dependent on the summary messages (0 or 1). For example, if the Standard Event
Status Register is read, its register will clear. As a result, its summary message will reset to 0, which in
turn will clear the ESB bit in the Status Byte Register.
Bit B6 in the Status Byte Register is either:
• The Master Summary Status (MSS) bit, sent in response to the *STB? Command, indicates the
status of any set bits with corresponding enable bits set.
• The Request for Service (RQS) bit, sent in response to a serial poll, indicates which device was
requesting service by pulling on the SRQ line.
For a description of the other bits in the Status Byte Register, see “Common commands, *STB?” The
IEEE-488.2 standard uses the following common query command to read the Status Byte Register:
*STB?
When reading the Status Byte Register using the *STB? command, bit B6 is called the MSS bit. None of
the bits in the Status Byte Register are cleared when using the *STB? command to read it.
The IEEE-488.1 standard has a serial poll sequence that also reads the Status Byte Register and is better
suited to detect a service request (SRQ). When using the serial poll, bit B6 is called the RQS bit. Serial
15
polling causes bit B6 (RQS) to reset. Serial polling is discussed in more detail later in this section
entitled “Serial Poll and SRQ.” Any of the following operations clear all bits of the Status Byte Register:
• Cycling power
• Sending the *CLS common command
Note: The MAV bit may or may not be cleared.
Service request enable register
This register is programmed by you and serves as a mask for the Status Summary Message bits (B0, B2,
B3, B4, B5, and B7) of the Status Byte Register. When masked, a set summary bit in the Status Byte
Register cannot set bit B6 (MSS/RQS) of the Status Byte Register. Conversely, when unmasked, a set
summary bit in the Status Byte Register sets bit B6.
A Status Summary Message bit in the Status Byte Register is masked when the corresponding bit in the
Service Request Enable Register is cleared (0). When the masked summary bit in the Status Byte
Register sets, it is ANDed with the corresponding cleared bit in the Service Request Enable Register.
The logic “1” output of the AND gate is applied to the input of the OR gate and, thus, sets the MSS/RQS
bit in the Status Byte Register. The individual bits of the Service Request Enable Register can be set or
cleared by using the following common command:
*SRE <NRf>
To read the Service Request Enable Register, use the *SRE? query command. The Service Request
Enable Register clears when power is cycled or a parameter (n) value of zero is sent with the *SRE
command (*SRE 0).
Serial poll and SRQ
Any enabled event summary bit that goes from 0 to 1 will set RQS and generate a service request
(SRQ). In your test program, you can periodically read the Status Byte Register to check if a service
request (SRQ) has occurred and what caused it. If an SRQ occurs, the program can, for example, branch
to an appropriate subroutine that will service the request. Typically, service requests (SRQs) are
managed by the serial poll sequence of the electronic load. If an SRQ does not occur, bit B6 (RQS) of
the Status Byte Register will remain cleared and the program will simply proceed normally after the
serial poll is performed. If an SRQ does occur, bit B6 of the Status Byte Register will set and the
program can branch to a service subroutine when the SRQ is detected by the serial poll. The serial poll
automatically resets RQS of the Status Byte Register. This allows subsequent serial polls to monitor bit
B6 for an SRQ occurrence generated by other event types. After a serial poll, the same event can cause
another SRQ, even if the event register that caused the first SRQ has not been cleared.
A serial poll clears RQS but does not clear MSS. The MSS bit stays set until all Status Byte event
summary bits are cleared.
16
Trigger model operation
Once the instrument is taken out of idle, operation proceeds through the trigger model down to the
device action.
Control Source — As shown in Figure 3, a control source is used to hold up operation until the
programmed event occurs. The control source options are explained as follows:
• HOLD — Only the TRIG:IMM command will generate a trigger in HOLD mode. All other trigger
commands are ignored.
• MANual — Event detection is satisfied by pressing the TRIG key.
• TIMer — This generates triggers that are in synchronization with the electronic load's internal
oscillator as the trigger source. The internal oscillator begins running as soon as this command
is executed. Use TRIG:TIM to program the oscillator period.
• EXTernal — Event detection is satisfied when an input trigger via the TRIGGER LINK connector is
received by the electronic load.
• BUS — Event detection is satisfied when a bus trigger (GET or *TRG) is received by the
electronic load.
Delay — A programmable delay is available after the event detection. The delay can be manually set
from 0 to 999999.999 seconds.
17
Chapter 2
Introduction to SCPI
SCPI (Standard Commands for Programmable Instruments) is a programming language for controlling
instrument functions over GPIB, RS-232, USB, and Ethernet interface. SCPI is layered on top of the
hardware portion of IEEE 488.2. The same SCPI commands and parameters control the same functions
in different classes of instruments.
Conventions Used in This Guide
Angle brackets < > Items within angle brackets are parameter abbreviations. For example,
<NR1> indicates a specific form of numerical data.
Vertical bar | Vertical bars separate alternative parameters. For example, NORM | TEXT
indicates that either "NORM" or "TEXT" can be used as a parameter.
Square Brackets [ ] Items within square brackets are optional. The representation [SOURce:]
VOLTage means that SOURce: may be omitted.
Braces { } Braces indicate parameters that may be repeated zero or more times. It is
used especially for showing arrays. The notation <A>{<,B>} shows that
parameter "A" must be entered, while parameter "B" may be omitted or may
be entered one or more times.
2.1 Types of SCPI Commands
SCPI has two types of commands, common and subsystem.
Common:
Common commands generally are not related to specific operation but to controlling overall
electronic load functions, such as reset, status, and synchronization. All common commands
consist of a three-letter mnemonic preceded by an asterisk (ex:*RST, *IDN?, *SRE 8).
Subsystem:
Subsystem commands perform specific electronic load functions. They are organized into an
inverted tree structure with the "root" at the top. The following figure shows a portion of a
subsystem command tree, from which you access the commands located along the various paths.
18
Figure 4 - Partial Command Tree
Multiple Commands in a Message
Multiple SCPI commands can be combined and sent as a single message with one message terminator.
There are two important considerations when sending several commands within a single message:
• Use a semicolon to separate commands within a message.
• There is an implied header path that affects how commands are interpreted by the
electronic load.
The header path can be thought of as a string that gets inserted before each command within a
message. For the first command in a message, the header path is a null string. For each subsequent
command the header path is defined as the characters that make up the headers of the previous
command in the message up to and including the last colon separator. An example of a message with
two commands is:
CURR:LEV 3;PROT:STAT OFF
which shows the use of the semicolon separating the two commands, and also illustrates the header
path concept. Note that with the second command, the leading header "CURR" was omitted because
after the "CURR:LEV 3" command, the header path became defined as "CURR" and thus the instrument
interpreted the second command as:
CURR:PROT:STAT OFF
In fact, it would have been syntactically incorrect to include the "CURR" explicitly in the second
command, since the result after combining it with the header path would be:
CURR:CURR:PROT:STAT OFF
which is incorrect.
19
Moving Among Subsystems
In order to combine commands from different subsystems, you need to be able to reset the header
path to a null string within a message. You do this by beginning the command with a colon (:), which
discards any previous header path. For example, you could clear the output protection and check the
status of the Operation Condition register in one message by using a root specifier as follows:
PROTection:CLEAr; :STATus:OPERation:CONDition?
The following message shows how to combine commands from different subsystems as well as within
the same subsystem:
POWer:LEVel 200; PROTection 28; : CURRent: LEVel 3; PROTection:STATe ON
Observe the use of the optional header LEVel to maintain the correct path within the voltage and
current subsystems, and the use of the root specifier to move between subsystems.
Including Common Commands
You can combine common commands with subsystem commands in the same message. Treat the
common command as a message unit by separating it with a semicolon (the message unit separator).
Common commands do not affect the header path; you may insert them anywhere in the message.
VOLTage 17.5;*TRG
OUTPut OFF;*RCL 2;OUTPut ON
Case Sensitivity
Common commands and SCPI commands are not case sensitive. You can use upper or lower case and
any case combination.
Example:
*RST = *rst
:DATA? = :data?
:SYSTem:PRESet = :system:preset
Long-form and Short-form Versions
A SCPI command word can be sent in its long-form or short-form version. The command subsystem
tables in Chapter 3 provide the long-form version. However, the short-form version is indicated by
upper case characters.
Example:
:SYSTem:PRESet (long-form)
:SYST:PRES (short form)
:SYSTem:PRES (long-form and short-form combination)
20
Note: Each command word must be in long-form or short-form, and not something in between. For
example, :SYSTe:PRESe is illegal and will generate an error. The command will not be executed.
Using Queries
Observe the following precautions with queries:
• Set up the proper number of variables for the returned data. For example, if you are reading
back a measurement array, you must dimension the array according to the number of
measurements that you have placed in the measurement buffer.
• Read back all the results of a query before sending another command to the electronic load.
Otherwise a Query Interrupted error will occur and the unreturned data will be lost.
2.2 Types of SCPI Messages
There are two types of SCPI messages, program and response.
1) A program message consists of one or more properly formatted SCPI commands sent from
the controller to the electronic load. The message, which may be sent at any time, requests
the electronic load to perform some action.
2) A response message consists of data in a specific SCPI format sent from the electronic load
to the controller. The electronic load sends the message only when commanded by a
program message called a "query."
The following figure illustrates SCPI message structure:
Figure 5 - SCPI Message Structure
21
Message Unit
The simplest SCPI command is a single message unit consisting of a command header (or keyword)
followed by a message terminator. The message unit may include a parameter after the header. The
parameter can be numeric or a string.
VOLTage 20<NL>
Headers
Headers, also referred to as keywords, are instructions recognized by the electronic load. Headers may
be either in the long-form or the short-form. In the long-form, the header is completely spelled out,
such as VOLTAGE, STATUS, and DELAY. In the short form, the header has only the first three or four
letters, such as VOLT, STAT, and DEL.
Query Indicator
Following a header with a question mark turns it into a query.
VOLTage?, CURRent:PROTection?
If a query contains a parameter, place the query indicator at the end of the last header.
CURRent:PROTection? MAX
Message Unit Separator
When two or more message units are combined into a compound message, separate the units with a
semicolon.
STATus:OPERation?;QUEStionable?
Root Specifier
When it precedes the first header of a message unit, the colon becomes the root specifier. It tells the
command parser that this is the root or the top node of the command tree.
Message Terminator
A terminator informs SCPI that it has reached the end of a message. Three permitted message
terminators are:
1. Newline (<NL>), which is ASCII decimal 10 or hex 0A.
2. End or identify (<END>).
3. Both of the above (<NL><END>).
In the examples of this guide, there is an assumed message terminator at the end of each message.
22
Command Execution Rules
• Commands execute in the order that they are presented in the program message.
• An invalid command generates an error and is not executed.
• Valid commands that precede an invalid command in a multiple command program
message are executed.
• Valid commands that follow an invalid command in a multiple command program message
are ignored.
2.3 SCPI Data Formats
All data programmed to or returned from the electronic load is ASCII. The data may be numerical or a
character string.
Numerical Data Formats
Symbol Data Form
Talking Formats
<NR1>
<NR2>
<NR3>
Listening Formats
<NRf>
<NRf+>
<Bool>
Digits with an implied decimal point assumed at the right of the least-significant digit.
Example: 273
Digits with an explicit decimal point.
Example: .0273
Digits with an explicit decimal point and an exponent.
Example: 2.73E+2
Extended format that includes <NR1>, <NR2> and <NR3>.
Example: 273 273. 2.73E2
Expanded decimal format that includes <NRf> and MIN MAX DEF.
Example: 273 273. 2.73E2 MAX. MIN and MAX are the minimum and maximum limit
values that are implicit in the range specification for the parameter. DEF is the default
values for the parameter.
Boolean Data.
Example: 0 | 1 or ON | OFF
23
Class
Suffix
Unit
Unit with Multiplier
Suffixes and Multipliers
Amplitude V volt MV (millivolt)
Current A amps MA (milliamp)
Power W watt MW (milliwatt)
Resistance OHM ohm MOHM (megohm)
R ohm MR(megohm)
Slew Rate A/uS amps/microsecond
Time S second MS (millisecond)
Common Multipliers
1E3 K kilo
1E-3 M milli
1E-6 U micro
Response Data Types
Character strings returned by query statements may take either of the following forms, depending on
the length of the returned string:
<CRD> Character Response Data. Permits the return of character strings.
<AARD> Arbitrary ASCII Response Data. Permits the return of undelimited 7-bit ASCII. This data
A response message is the message sent by the instrument to the computer in response to a query
command program message.
Sending a Response Message
After sending a query command, the response message is placed in the Output Queue. When the
electronic load is then addressed to talk, the response message is sent from the Output Queue to the
computer.
Multiple Response Messages
If you send more than one query command in the same program message (see the paragraph entitled,
“Multiple Command Messages”), the multiple response messages for all the queries is sent to the
computer when the electronic load is addressed to talk. The responses are sent in the order that the
query commands were sent and are separated by semicolons (;). Items within the same query are
separated by commas (,). The following example shows the response message for a program message
24
that contains four single item query commands:
0; 1; 1; 0
Response Message Terminator (RMT)
Each response is terminated with an LF (line feed) and EOI (end or identify). The following example
shows how a multiple response message is terminated:
0; 1; 1; 0; <RMT>
Message Exchange Protocol
Two rules summarize the message exchange protocol:
Rule 1. You must always tell the electronic load what to send to the computer.
The following two steps must always be performed to send information from the
computer to the instrument:
1) Send the appropriate query command(s) in a program message.
2) Address the electronic load to talk.
Rule 2. The complete response message must be received by the computer before another
program message can be sent to the electronic load.
2.4 SCPI Command Completion
SCPI commands sent to the electronic load are processed either sequentially or in parallel. Sequential
commands finish execution before a subsequent command begins. Parallel commands allow other
commands to begin executing while the parallel command is still executing. Commands that affect
trigger actions are among the parallel commands.
The *WAI, *OPC, and *OPC? common commands provide different ways of indicating when all
transmitted commands, including any parallel ones, have completed their operations. The syntax and
parameters for these commands are described in Chapter 4. Some practical considerations for using
these commands are as follows:
*WAI This prevents the electronic load from processing subsequent commands until all pending
operations are completed.
*OPC? This places a 1 in the Output Queue when all pending operations have completed. Since it
requires your program to read the returned value before executing the next program
statement, *OPC? can be used to cause the controller to wait for commands to complete
before proceeding with its program.
25
The trigger system must be in the Idle state in order for the status OPC bit to be true. Therefore,
*OPC This sets the OPC status bit when all pending operations have completed. Since your
program can read this status bit on an interrupt basis, *OPC allows subsequent commands
to be executed.
NOTE:
as far as triggers are concerned, OPC is false whenever the trigger system is in the Initiated state.
Using Device Clear
You can send a device clear at any time to abort a SCPI command that may be hanging up the GPIB
interface. The status registers, error queue, and all configuration states are left unchanged when a
device clear message is received. Device clear performs the following actions:
• The input and output buffers of the electronic load are cleared.
• The electronic load is prepared to accept a new command string.
The following statement shows how to send a device clear over the GPIB interface using GW BASIC:
CLEAR 705IEEE-488 Device Clear
The following statement shows how to send a device clear over the GPIB interface using the GPIB
command library for C or QuickBASIC:
IOCLEAR (705)
26
Chapter 3
listed because they are either directly related by function, or because reading
SCPI Commands
This chapter explains in detail the SCPI commands used by the electronic load. The electronic load
conforms to SCPI Version 1995.0.
3.1 Language Dictionary
This section describes the syntax and parameters for all the IEEE 488.2 SCPI subsystem and common
commands used by the electronic loads. Since the SCPI syntax remains the same for all programming
languages, the examples given for each command are generic.
Syntax definitions use the long form, but only short form headers (or
Syntax Forms
Parameters
"keywords") appear in the examples. Use the long form to help make your
program self-documenting.
Most commands require a parameter and all queries will return a parameter.
The range for a parameter may vary according to the model of electronic
load. Parameters for all models are listed in the Specifications table in the
User’s Guide.
Channel
Related Commands
Order of Presentation
Common Commands
Common commands begin with an * and consist of three letters (command) or three letters and a ?
(query). They are defined by the IEEE 488.2 standard to perform common interface functions. Common
commands and queries are categorized under System, Status, or Trigger functions and are listed at the
end of this chapter.
If a command only applies to individual channels of a mainframe, the entry
Channel Selectable will appear in the command description.
Where appropriate, related commands or queries are included. These are
about them will clarify or enhance your understanding of the original
command or query.
The dictionary is organized as follows:
• Subsystem commands, arranged by subsystem
• IEEE 488.2 common commands
27
tion Complete bit in the Standard Event Status
Subsystem Commands
Subsystem commands are specific to functions. They can be a single command or a group of
commands. The groups are comprised of commands that extend one or more levels below the root.
The subsystem command groups are arranged according to function: Calibration, Channel, Input, List,
Measurement, Port, Status, System, Transient, and Trigger. Commands under each function are
grouped alphabetically under the subsystem. Commands followed by a question mark (?) take only the
query form. When commands take both the command and query form, this is noted in the syntax
descriptions.
3.2 Common Commands
Common commands begin with an * and consist of three letters (command) IEEE 488.2 standard to
perform some common interface functions. The electronic loads respond to the required common
commands that control status reporting, synchronization, and internal operations. The electronic loads
also respond to optional common commands that control triggers, power-on conditions, and stored
operating parameters.
Common commands and queries are listed alphabetically. If a command has a corresponding query
that simply returns the data or status specified by the command, then both command and query are
included under the explanation for the command. If a query does not have a corresponding command
or is functionally different from the command, then the query is listed separately. The description for
each common command or query specifies any status registers affected. Refer to Section 1.4 Programming the Status Registers, which explains how to read specific register bits and use the
information that they return.
Common Command Table
Mnemonic Name Description
*CLS Clear status Clears all event registers and Error Queue.
*ESE <NRf> Event enable command Program the Standard Event Enable Register.
*ESE? Event enable query Read the Standard Event Enable Register.
*ESR? Event status query Read the Standard Event Status Register and clear it.
*OPC
Operation complete
command
Set the Opera
Register after all pending commands have been executed.
28
Common Command Table (cont.)
Command Syntax
*CLS
Parameters
None
Service request enable
Service request enable
Mnemonic Name Description
*OPC?
*RCL <NRf> Recall command
*RST Reset command
*SAV <NRf> Save command
*SRE <NRf>
*SRE?
*STB? Read status byte query Read the Status Byte register
*TRG Trigger command Send a trigger to the electronic load.
*TST? Self-test query Wait until all previous commands are executed.
Operation complete
query
command
query
Places an ASCII “1” into the output queue when all
pending selected device operations have been
completed.
Returns the electronic load to the setup configuration
stored in the specified memory location.
Returns the electronic load to the *RST default
conditions.
Saves the current setup to the specified memory
location.
Programs the Service Request Enable register.
Reads the Service Request Enable register.
*WAI
*RDT? Frame query Return the type of electronic frame.
*IDN? Identification query
Wait to continue
command
Wait until all previous commands are executed.
Return the manufacturer, model number, serial number,
and firmware revision levels of the unit.
*CLS — Clear Status
This command clears the bits of the following registers:
• Standard Event Status
• Operation Status Event
• Questionable Status Event
• Status Byte
• Error Queue
29
Command Syntax
*ESE <NRf>
Parameters
0 to 255
Power-On Value
See *PSC
Example
*ESE 129
Query Syntax
*ESE?
Returned Parameters
<NR1>
Related Commands
*ESR? *PSC *STB?
Query Syntax
*ESR?
Parameters
None
Returned Parameters
<NR1> (register value)
Related Commands
*CLS *ESE *ESE? *OPC
Query Syntax
*IDN?
Parameters
None
Returned Parameters
<AARD>
Field
Information
B&K Precision
manufacturer
xxxxxx
model number
xxxxxxxxxxxxxxxxxx
serial number or 0
x.xx
firmware revision
Example: BK PRECISION, MDL001, 600150010677510002, 1.43
*ESE <NRf> — Event Enable
This command programs the Standard Event Status Enable register bits. The programming determines
which events of the Standard Event Status Event Register (see *ESR?) are allowed to set the ESB (Event
Summary Bit) of the Status Byte register. A "1" in the bit position enables the corresponding event. All
of the enabled events of the Standard Event Status Event register are logically ORed to cause the Event
Summary Bit (ESB) of the Status Byte Register to be set. See Section 1.4 Programming the Status Registers for descriptions of the Standard Event Status registers. The query reads the Standard Event
Status Enable register.
*ESR?
This query reads the Standard Event Status register. Reading the register clears it. The bit configuration
of this register is the same as the Standard Event Status Enable register (see *ESE). See Section 1.4
Programming the Status Registers for a detailed explanation of this register.
*IDN?
This query requests the electronic load to identify itself. It returns the data in four fields separated by
commas.
30
Loading...
+ 67 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.